[OpenSIPS-Users] Store dialog value and fetch it

Alexander Mustafin mustafin.aleksandr at gmail.com
Fri Nov 8 11:17:25 CET 2013


Hi, Răzvan!

Thanks for your reply.

I’m fetching values after match_dialog function call, but in the other route. 

In this piece of script,  values are fetching successfully, but in the route[BYE] aren’t.

  if(match_dialog()) {
            xlog("Dialog matched for [$dlg_val(outgoing_gate) AND $dlg_val(incoming_gate)] request");
            loose_route();
            if (is_method("BYE")) {
                route(BYE);
           }

Should I to call match_dialog() a second time in route[BYE] for fetching this values?

P.S. Which a best way for extracting all values of dialog (mangled_from_uri, mangled_to_uri, etc.)?

Best regards,
Alexander Mustafin
mustafin.aleksandr at gmail.com




08 нояб. 2013 г., в 14:58, Răzvan Crainea <razvan at opensips.org> написал(а):

> Hi, Alexander!
> 
> Are you fetching the value before the loose_route() function call? It should be available only after loose_route() or match_dialog() are executed on the BYE request.
> 
> Best regards,
> 
> Răzvan Crainea
> OpenSIPS Core Developer
> http://www.opensips-solutions.com
> 
> On 11/08/2013 05:37 AM, Alexander Mustafin wrote:
>> Hi!
>> 
>> I’m want pass to dialog additional values, such as incoming and outgoing
>> gate from drouting.
>> 
>> I’m use store_dlg_value("incoming_gate»,"$avp(gw_id)") and this value
>> successfully pass to dialog (I can see it in dialog table in MySQL) and
>> in log:
>> 
>> Nov  8 04:27:28 ops /usr/sbin/opensips[21074]: DBG:dialog:new_dlg_val:
>> inserting <incoming_gate>=<GW_TEST>
>> 
>> But when I receive BYE - I want to extract this values from dialog and
>> use it in radius function:
>> $var(outgoing_gate) = $dlg_val("incoming_gate»);
>> 
>> I see next messages in log:
>> Nov  8 04:27:31 ops /usr/sbin/opensips[21074]:
>> DBG:dialog:fetch_dlg_value: looking for <"incoming_gate">
>> Nov  8 04:27:31 ops /usr/sbin/opensips[21074]:
>> DBG:dialog:fetch_dlg_value: var NOT found!
>> 
>> I thought that dialog is died before I tried to fetch value, but it
>> still alive at this moment:
>> Nov  8 04:27:31 ops /usr/sbin/opensips[21074]: DBG:dialog:unref_dlg:
>> unref dlg 0x7ffa5a66f2d8 with 2 -> 3 in entry 0x7ffa5a63c318
>> 
>> Need help! ((
>> 
>> Best regards,
>> Alexander Mustafin
>> mustafin.aleksandr at gmail.com <mailto:mustafin.aleksandr at gmail.com>
>> 
>> 
>> 
>> 
>> 
>> 
>> _______________________________________________
>> Users mailing list
>> Users at lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>> 
> 
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20131108/4b850bbf/attachment-0001.htm>


More information about the Users mailing list