[OpenSIPS-Users] INVITE BYE Processing and store_dlg_value, fetch_dlg_value

Rajat Ahuja rajatahuja78 at gmail.com
Mon Sep 6 08:42:00 EST 2021


Hello,

I am trying to use Dialog Module in my project, to relate the Invite and
BYE transactions. I am saving the Source Port received in the INVITE
transaction and want to route the Bye Transaction back to the source port.
Call Flow:
Invite: save Source Port 5062
Caller(5062) --> open sip(5060) ---> Server

Bye
Caller(5062)<---(Error)-----OpenSip(5060)<------Server


Script:

loadmodule "/usr/local/lib64/opensips/modules/dialog.so"
modparam("dialog", "profiles_with_value", "caller")

if (is_method("INVITE")) {
create_dialog();
store_dlg_value("Source_port","$sp");
}

if (is_method("BYE")) {
fetch_dlg_value("Source_port","$var(SP)");
$rp = $var(SP);
}


When fetching the Source_port dialog value it returns NULL in Bye
Transaction?

Can you please suggest how to retain the source port in Bye transaction?

Thanks in advance.
Regards,
Rajat Ahuja
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20210906/11fb5305/attachment-0001.html>


More information about the Users mailing list