Hi, Alexander!

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.

Best regards,

Răzvan Crainea
OpenSIPS Core Developer
http://www.opensips-solutions.com

On 11/08/2013 11:17 AM, Alexander Mustafin wrote:
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
[email protected] <mailto:[email protected]>




08 нояб. 2013 г., в 14:58, Răzvan Crainea <[email protected]
<mailto:[email protected]>> написал(а):

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 <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
[email protected]
<mailto:[email protected]><mailto:[email protected]>






_______________________________________________
Users mailing list
[email protected] <mailto:[email protected]>
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


_______________________________________________
Users mailing list
[email protected] <mailto:[email protected]>
http://lists.opensips.org/cgi-bin/mailman/listinfo/users



_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

Reply via email to