Hi all, i'm trying to debug a strange behaviour of dialog mode.
If I use "record_route" in my script, to force any message to toward the
server, dialog module stops to check "timeout_avp", if I comment it out,
when timeout_avp is reached, the dialog module notify me in sylog (as
shown in log.txt)
It seems that dialog module has some problems to work if i use
record_route()...
I try to use version 1.3.1 and 1.3.2, but i see the same behaviour.
So, where i'm wrong? ;)
Here's relevant part of config, and in openser.txt there's my routing
script
----
loadmodule "rr.so"
modparam("rr", "enable_full_lr", 1)
modparam("rr", "append_fromtag", 1)
modparam("rr", "enable_double_rr", 1)
modparam("rr", "add_username", 0)
loadmodule "dialog.so"
modparam("dialog", "enable_stats", 1)
modparam("dialog", "dlg_flag", 4)
modparam("dialog", "timeout_avp", "$avp(s:dlgtimeout)")
modparam("dialog", "dlg_extra_hdrs", "Hint: credit
expired\r\n")
modparam("dialog", "dlg_match_mode", 1)
modparam("dialog", "db_url",
"mysql://dbuser:dbpass@localhost/openser")
modparam("dialog", "db_mode", 1)
----
thanx in advance
k.
# With record_route()
Jun 11 09:36:07 New request - M=INVITE RURI=sip:alice@192.168.27.74
F=sip:bob@192.168.27.74 T=sip:alice@192.168.27.74 IP=192.168.27.82 ID=2112176925
Jun 11 09:36:07 BRANCH - S=<null>
R=sip:alice@192.168.1.201:5060;line=2c542c23af8e7c7 D=<null> F=sip:bob@192.168.27.74
T=sip:alice@192.168.27.74 IP=192.168.27.82 ID=2112176925
Jun 11 09:36:07 Reply - S=101 R=<null> D=Dialog Establishement
F=sip:bob@192.168.27.74 T=sip:alice@192.168.27.74 IP=192.168.27.201 ID=2112176925
Jun 11 09:36:07 Reply - S=100 R=<null> D=Trying F=sip:bob@192.168.27.74
T=sip:alice@192.168.27.74 IP=192.168.27.201 ID=2112176925
Jun 11 09:36:07 Reply - S=180 R=<null> D=Ringing F=sip:bob@192.168.27.74
T=sip:alice@192.168.27.74 IP=192.168.27.201 ID=2112176925
Jun 11 09:36:09 Reply - S=200 R=<null> D=OK F=sip:bob@192.168.27.74
T=sip:alice@192.168.27.74 IP=192.168.27.201 ID=2112176925
Jun 11 09:36:09 New request - M=ACK RURI=sip:alice@192.168.1.201:5060
F=sip:bob@192.168.27.74 T=sip:alice@192.168.27.74 IP=192.168.27.82 ID=2112176925
Jun 11 09:36:26 New request - M=BYE RURI=sip:alice@192.168.1.201:5060
F=sip:bob@192.168.27.74 T=sip:alice@192.168.27.74 IP=192.168.27.82 ID=2112176925
Jun 11 09:36:26 Reply - S=200 R=<null> D=OK F=sip:bob@192.168.27.74
T=sip:alice@192.168.27.74 IP=192.168.27.201 ID=2112176925
# Without record_route()
Jun 11 09:36:49 New request - M=INVITE RURI=sip:alice@192.168.27.74
F=sip:bob@192.168.27.74 T=sip:alice@192.168.27.74 IP=192.168.27.82 ID=1675712119
Jun 11 09:36:49 BRANCH - S=<null>
R=sip:alice@192.168.1.201:5060;line=2c542c23af8e7c7 D=<null> F=sip:bob@192.168.27.74
T=sip:alice@192.168.27.74 IP=192.168.27.82 ID=1675712119
Jun 11 09:36:49 Reply - S=100 R=<null> D=Trying F=sip:bob@192.168.27.74
T=sip:alice@192.168.27.74 IP=192.168.27.201 ID=1675712119
Jun 11 09:36:49 Reply - S=101 R=<null> D=Dialog Establishement
F=sip:bob@192.168.27.74 T=sip:alice@192.168.27.74 IP=192.168.27.201 ID=1675712119
Jun 11 09:36:49 Reply - S=180 R=<null> D=Ringing F=sip:bob@192.168.27.74
T=sip:alice@192.168.27.74 IP=192.168.27.201 ID=1675712119
Jun 11 09:36:51 Reply - S=200 R=<null> D=OK F=sip:bob@192.168.27.74
T=sip:alice@192.168.27.74 IP=192.168.27.201 ID=1675712119
Jun 11 09:36:56 WARNING:dialog:dlg_ontimeout: timeout for dlg with CallID
'1675712119' and tags '53233056' '453709088'
####### Routing Logic ########
route[0]
{
xlog("L_INFO", "New request - M=$rm RURI=$ru F=$fu T=$tu IP=$si
ID=$ci\n");
if(loose_route())
{
if(!has_totag())
{
xlog("L_INFO", "Initial loose-routing rejected - M=$rm RURI=$ru
F=$fu T=$tu IP=$si ID=$ci\n");
sl_send_reply("403", "Initial Loose-Routing Rejected");
exit;
}
t_on_reply("1");
t_on_failure("1");
}
if(!is_method("REGISTER"))
{
#record_route();
}
if(is_method("CANCEL") || is_method("ACK"))
{
t_on_reply("1");
if(t_check_trans()) {
if(!t_relay()) {
sl_reply_error();
}
}
else {
xlog("L_INFO", "Dropping mis-routed request - M=$rm RURI=$ru F=$fu T=$tu
IP=$si ID=$ci\n");
}
exit;
}
t_check_trans();
if(is_method("REGISTER"))
{
sl_send_reply("100", "Trying");
if(!save("location"))
{
xlog("L_ERR", "Register FAIL - M=$rm RURI=$ru F=$fu T=$tu IP=$si
ID=$ci\n");
sl_reply_error();
exit;
}
xlog("L_INFO", "Register OK - M=$rm RURI=$ru F=$fu T=$tu IP=$si
ID=$ci\n");
exit;
}
if(is_method("INVITE"))
{
$avp(s:dlgtimeout)=5;
$avp(s:ringtimeout)=10;
setflag(4);
sl_send_reply("100", "Trying");
}
if(is_method("BYE"))
{
route(1);
}
if (!lookup("location")) {
switch ($retcode) {
case -1:
case -3:
t_newtran();
t_reply("404", "Not Found");
exit;
case -2:
sl_send_reply("405", "Method Not Allowed");
exit;
}
}
route(1);
}
route[1] {
if (is_method("INVITE")) {
t_on_branch("1");
t_on_reply("1");
t_on_failure("1");
}
if (!t_relay()) {
sl_reply_error();
};
exit;
}
branch_route[1] {
xlog("L_INFO", "BRANCH - S=$rs R=$ru D=$rr F=$fu T=$tu IP=$si
ID=$ci\n");
}
onreply_route[1]
{
xlog("L_INFO", "Reply - S=$rs R=$ru D=$rr F=$fu T=$tu IP=$si
ID=$ci\n");
}
failure_route[1] {
if (t_was_cancelled()) {
exit;
}
}