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
_______________________________________________
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

Reply via email to