[OpenSIPS-Users] Store dialog value and fetch it

Alexander Mustafin mustafin.aleksandr at gmail.com
Mon Nov 11 09:24:10 CET 2013


Hello!

I’ve tried many variants, but unsuccessfully.

After BYE message, dialog change state to [5] and fetch_dlg_val doesn’t export any stored values.

Are the other ways to save dialog-related values after BYE message?

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




09 нояб. 2013 г., в 15:33, Alexander Mustafin <mustafin.aleksandr at gmail.com> написал(а):

> Hi, Răzvan!
> 
> I’m using topology_hiding() function - and loose_route() will always false.
> match_dialog() in this route return TRUE and $DLG_status return 5 (dialog ended)
> 
> route[BYE] {
>         xlog("L_DEBUG", "~~~~~ Enter in [BYE] section ~~~~~");
>         xlog("---- DIALOG status [$DLG_status]"); #DEBUG
> 
>         $avp(radius_user) = $dlg_val("incoming_gate");
>         $var(setup_time) = $dlg_val("start_time»);
> }
> 
> Nov  9 09:23:54 ops /usr/sbin/opensips[26665]: ~~~~~ Enter in [BYE] section ~~~~~
> Nov  9 09:23:54 ops /usr/sbin/opensips[26665]: ---- DIALOG status [5]
> Nov  9 09:23:54 ops /usr/sbin/opensips[26665]: DBG:dialog:fetch_dlg_value: looking for <"incoming_gate">
> Nov  9 09:23:54 ops /usr/sbin/opensips[26665]: DBG:dialog:fetch_dlg_value: var NOT found!
> Nov  9 09:23:54 ops /usr/sbin/opensips[26665]: ERROR:core:do_assign: no value in right expression
> Nov  9 09:23:54 ops /usr/sbin/opensips[26665]: ERROR:core:do_assign: error at line: 501
> Nov  9 09:23:54 ops /usr/sbin/opensips[26665]: DBG:dialog:fetch_dlg_value: looking for <"start_time">
> Nov  9 09:23:54 ops /usr/sbin/opensips[26665]: DBG:dialog:fetch_dlg_value: var NOT found!
> Nov  9 09:23:54 ops /usr/sbin/opensips[26665]: ERROR:core:do_assign: no value in right expression
> Nov  9 09:23:54 ops /usr/sbin/opensips[26665]: ERROR:core:do_assign: error at line: 502
> 
> 
> Best regards,
> Alexander Mustafin
> mustafin.aleksandr at gmail.com
> 
> 
> 
> 
> 08 нояб. 2013 г., в 17:03, Răzvan Crainea <razvan at opensips.org> написал(а):
> 
>> So basically you're saying that after the loose_route() call you can no longer access the dialog variable? Are you sure you are calling the BYE route only in this place?
>> You should check if you are really in a dialog context. Inside the BYE route, just print the $DLG_status variable. If it is NULL, then match_dialog() and loose_route() failed to match a dialog, therefore you won't be able to retrieve the value.
>> Adding the match_dialog() call inside the BYE route only makes sense if the dialog was not mached yet. So in your case, it makes sense only if you call route(BYE); from a different part of script.
>> 
>> You can't really extract internal dialog values, unless you explicitely save them as values, or take them from the request.
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20131111/1ae53ce2/attachment.htm>


More information about the Users mailing list