Hello:
I have this scenario:
I already rad about the bye2bye, the dialog module, i was not able to see any light there.
Here is the scenario
A--GW--------Kamailio(carrierroute)---------GW1---B |--------------GW2 |--------------GW3 (etc)
the capture
|<-------------BYE---- -<----NOTHING HERE<<<-|
the By does go back if the B user hangs it is not even attempted in the kamailio, per the traces. the BY generates records in the CRD from B side if i hang manually the bye generates CDR records from the A side.
Again the Bye is understood by the kamailio and generates the CDR records, that is Not the problem, the Problem is i have the user A in silence, i am talking about the Signaling Only, not Media, no NAT.
I even tried the mediaproxy (just trying)
the config is like the: http://voipembedded.com/resources/openser_cr.cfg
i added
if (has_totag()) { # sequential request withing a dialog should # take the path determined by record-routing if (loose_route()) { # mark routing logic in request append_hf("P-hint: rr-enforced\r\n"); if (is_method("BYE")) { setflag(1); # do accounting ... setflag(3); # ... even if the transaction fails exit; } route(10); } else { /* uncomment the following lines if you want to enable presence */ ##if (is_method("SUBSCRIBE") && $rd == "your.server.ip.address") { ## # in-dialog subscribe requests ## route(200); ## exit; ##} if ( is_method("ACK") ) { if ( t_check_trans() ) { # non loose-route, but stateful ACK; must be an ACK after a 487 or e.g. 404 from upstream server t_relay(); exit; } else { # ACK without matching transaction ... ignore and discard.\n"); xlog("L_WARN", "[$mi] discarding ACK\n"); exit; }
this is the main difference for now, i changed to use as a basis example the Example 1.45. Configuration example - Routing to user tree. same results.
i tried adding the record_route in the invite also, same result.
At this point i have no clue what i am missing.
Please let me know if this should work or not, and if yes, based in that basic example, what i should add.
On Tuesday 17 February 2009, Omar wrote:
I have this scenario:
I already rad about the bye2bye, the dialog module, i was not able to see any light there.
Here is the scenario
A--GW--------Kamailio(carrierroute)---------GW1---B
|--------------GW2 |--------------GW3 (etc)
the capture
|<-------------BYE----
-<----NOTHING HERE<<<-|
Hi Omar,
just to clarify, you say that your BYE is not forwarded to the GW and then to the user?
the By does go back if the B user hangs it is not even attempted in the kamailio, per the traces. the BY generates records in the CRD from B side if i hang manually the bye generates CDR records from the A side.
Again the Bye is understood by the kamailio and generates the CDR records, that is Not the problem, the Problem is i have the user A in silence, i am talking about the Signaling Only, not Media, no NAT.
I even tried the mediaproxy (just trying)
the config is like the: http://voipembedded.com/resources/openser_cr.cfg
i added
if (has_totag()) { # sequential request withing a dialog should # take the path determined by record-routing if (loose_route()) { # mark routing logic in request append_hf("P-hint: rr-enforced\r\n"); if (is_method("BYE")) { setflag(1); # do accounting ... setflag(3); # ... even if the transaction # fails exit; } route(10); } else {
[..]
Why do you have the "exit;" in the BYE case above? This causes the server to stop processing for in-dialog BYEs gets loose-routed. Perhaps this could be the reason for the issue you face?
Cheers,
Henning
i removed it exit; and same issue, no bye sent back to the GW from where the call come in.
Omar
On Tue, 2009-02-17 at 10:54 +0100, Henning Westerholt wrote:
On Tuesday 17 February 2009, Omar wrote:
I have this scenario:
I already rad about the bye2bye, the dialog module, i was not able to see any light there.
Here is the scenario
A--GW--------Kamailio(carrierroute)---------GW1---B
|--------------GW2 |--------------GW3 (etc)
the capture
|<-------------BYE----
-<----NOTHING HERE<<<-|
Hi Omar,
just to clarify, you say that your BYE is not forwarded to the GW and then to the user?
the By does go back if the B user hangs it is not even attempted in the kamailio, per the traces. the BY generates records in the CRD from B side if i hang manually the bye generates CDR records from the A side.
Again the Bye is understood by the kamailio and generates the CDR records, that is Not the problem, the Problem is i have the user A in silence, i am talking about the Signaling Only, not Media, no NAT.
I even tried the mediaproxy (just trying)
the config is like the: http://voipembedded.com/resources/openser_cr.cfg
i added
if (has_totag()) { # sequential request withing a dialog should # take the path determined by record-routing if (loose_route()) { # mark routing logic in request append_hf("P-hint: rr-enforced\r\n"); if (is_method("BYE")) { setflag(1); # do accounting ... setflag(3); # ... even if the transaction # fails exit; } route(10); } else {
[..]
Why do you have the "exit;" in the BYE case above? This causes the server to stop processing for in-dialog BYEs gets loose-routed. Perhaps this could be the reason for the issue you face?
Cheers,
Henning
Kamailio (OpenSER) - Users mailing list Users@lists.kamailio.org http://lists.kamailio.org/cgi-bin/mailman/listinfo/users http://lists.openser-project.org/cgi-bin/mailman/listinfo/users
On Tuesday 17 February 2009, Omar wrote:
i removed it exit; and same issue, no bye sent back to the GW from where the call come in.
Hi Omar,
you say previously that the BYE is seen from the kamailio server, and also accounted. Have you tried to add some xlog statements to your configuration to check how the messages flow through your script? This could get you further hints where the problem is located. Take a look to the xlog module docs for the function.
Cheers,
Henning
i did
there is no bye leaving from the kamailio at all
the config is i stated before but now without the exit in the BYE condition.
kamailio saves the bye when the bye comes from the B side, yes but it does not send anything back to the Originator GW, as it should. i made the captures and nothing. Kamailio receives and process the bye for CDR, but it does not send the BYE to the originator. i captured in the port 5060 and nothing comes.
it is maybe a bug.?
On Tue, 2009-02-17 at 18:03 +0100, Henning Westerholt wrote:
On Tuesday 17 February 2009, Omar wrote:
i removed it exit; and same issue, no bye sent back to the GW from where the call come in.
Hi Omar,
you say previously that the BYE is seen from the kamailio server, and also accounted. Have you tried to add some xlog statements to your configuration to check how the messages flow through your script? This could get you further hints where the problem is located. Take a look to the xlog module docs for the function.
Cheers,
Henning
Kamailio (OpenSER) - Users mailing list Users@lists.kamailio.org http://lists.kamailio.org/cgi-bin/mailman/listinfo/users http://lists.openser-project.org/cgi-bin/mailman/listinfo/users
On Tuesday 17 February 2009, Omar wrote:
i did
there is no bye leaving from the kamailio at all
the config is i stated before but now without the exit in the BYE condition.
kamailio saves the bye when the bye comes from the B side, yes but it does not send anything back to the Originator GW, as it should. i made the captures and nothing. Kamailio receives and process the bye for CDR, but it does not send the BYE to the originator. i captured in the port 5060 and nothing comes.
it is maybe a bug.?
Hi Omar,
it could be a bug, a misconfiguration, or a user agent which does not act according the standard. Does the BYE reach your forwarding/ t_relay statement in your config, you can check with xlog as well. This gives you the method of the SIP message you actually proceed in the config, just add this before the forwarding statement.
xlog("method: $rm");
Cheers,
Henning
Here is it Basic config for Kamailio 1.4.3
####### Global Parameters ######### debug=9 # change this to 3 log_stderror=yes fork=yes children=4
listen=udp:x.x.x.x:5060
####### Modules Section ########
#set module path mpath="/opt/openser/lib64/kamailio/modules/" loadmodule "db_mysql.so" loadmodule "sl.so" loadmodule "tm.so" loadmodule "rr.so" loadmodule "maxfwd.so" loadmodule "textops.so" loadmodule "mi_fifo.so" #loadmodule "uri_db.so" loadmodule "uri.so" loadmodule "xlog.so" loadmodule "carrierroute.so" # ----------------- setting module-specific parameters ---------------
# ----- mi_fifo params ----- modparam("mi_fifo", "fifo_name", "/tmp/kamailio_fifo")
# ----- carrierroute params ----- modparam("carrierroute", "db_url", "mysql://help:help@localhost/sip") modparam("carrierroute", "config_source", "db")
####### Routing Logic ######## # main request routing logic
route{ if (!mf_process_maxfwd_header("10")) { sl_send_reply("483","Too Many Hops"); exit; };
if (has_totag()) { # sequential request withing a dialog should # take the path determined by record-routing if (loose_route()) { # if (is_method("BYE")) { # with or without BYE i have the same result # if (t_check_trans()) # t_relay(); # } route(10); } else { if ( is_method("ACK") ) { if ( t_check_trans() ) { # non loose-route, but stateful ACK; must be an ACK after a 487 or e.g. 404 from upstream server t_relay(); exit; } else { # ACK without matching transaction ... ignore and discard.\n"); xlog("L_WARN", "[$mi] discarding ACK\n"); exit; } } sl_send_reply("404","Not here"); } exit; }
#initial requests
# CANCEL processing if (is_method("CANCEL")) { if (t_check_trans()) t_relay(); exit; }
t_check_trans();
# record routing if (!is_method("REGISTER|MESSAGE")) record_route();
if (!uri==myself) { append_hf("P-hint: outbound\r\n"); route(10); exit; }
# requests for my domain
if ($rU==NULL) { # request with no Username in RURI sl_send_reply("484","Address Incomplete"); exit; }
if (is_method("INVITE")) { if (cr_route("default", "3", "$rU", "$rU", "call_id")) { t_on_failure("1"); route(10); exit; } exit; } }
route[10] { cr_user_carrier("$fU", "$fd", "$avp(s:carrier)"); $avp(s:domain)="3"; if (!cr_route("$avp(s:carrier)", "$avp(s:domain)", "$rU", "$rU", "call_id")) { xlog("L_ERR", "cr_route failed\n"); exit; } # if you store also the port as part of the rewrite host, # otherwise you can just use $rd later $avp(s:host)= $rd; t_on_failure("1"); # xlog("method: $rm"); if (!t_relay()) { sl_reply_error(); } }
#onreply_route[2] { # xlog("incoming reply\n"); #}
failure_route[1] { revert_uri(); if (!cr_next_domain("$avp(s:carrier)", "$avp(s:domain)", "$rU", "$avp(s:host)", "$T_reply_code", "$avp(s:domain)")) { xlog("L_ERR", "cr_next_domain failed\n"); exit; } if (!cr_route("$avp(s:carrier)", "$avp(s:domain)", "$rU", "$rU", "call_id")) { xlog("L_ERR", "cr_route failed\n"); exit; } # $avp(s:host)= $rd+":"+$rp; $avp(s:host)= $rd; t_on_failure("1"); append_branch(); if (!t_relay()) { xlog("L_ERR", "t_relay failed\n"); exit; } }
i am running solaris 10, 64 bits, then i really don't know if i should not try in this platform.
I somebody has a Working config as an example will be great.
but i still dont have the BYE, is not leaving the server, when i sniff the network.
the kamailio debug shows at least 4 times something like this :
bash-3.00# Feb 17 22:32:11 [15673] DBG:tm:utimer_routine: timer routine:7,tl=fffffffef0293738 next=0, timeout=44300000 Feb 17 22:32:11 [15673] DBG:tm:retransmission_handler: retransmission_handler : request resending (t=fffffffef0293518, BYE sip:4 ... ) Feb 17 22:32:11 [15673] DBG:tm:set_timer: relative timeout is 4000000 Feb 17 22:32:11 [15673] DBG:tm:insert_timer_unsafe: [7]: fffffffef0293738 (48300000) Feb 17 22:32:11 [15673] DBG:tm:retransmission_handler: retransmission_handler : done
bash-3.00# Feb 17 22:32:16 [15673] DBG:tm:utimer_routine: timer routine:7,tl=fffffffef0293738 next=0, timeout=48300000 Feb 17 22:32:16 [15673] DBG:tm:retransmission_handler: retransmission_handler : request resending (t=fffffffef0293518, BYE sip:4 ... ) Feb 17 22:32:16 [15673] DBG:tm:set_timer: relative timeout is 4000000 Feb 17 22:32:16 [15673] DBG:tm:insert_timer_unsafe: [7]: fffffffef0293738 (52300000) Feb 17 22:32:16 [15673] DBG:tm:retransmission_handler: retransmission_handler : done
thanks
F
On Tue, 2009-02-17 at 18:48 +0100, Henning Westerholt wrote:
On Tuesday 17 February 2009, Omar wrote:
i did
there is no bye leaving from the kamailio at all
the config is i stated before but now without the exit in the BYE condition.
kamailio saves the bye when the bye comes from the B side, yes but it does not send anything back to the Originator GW, as it should. i made the captures and nothing. Kamailio receives and process the bye for CDR, but it does not send the BYE to the originator. i captured in the port 5060 and nothing comes.
it is maybe a bug.?
Hi Omar,
it could be a bug, a misconfiguration, or a user agent which does not act according the standard. Does the BYE reach your forwarding/ t_relay statement in your config, you can check with xlog as well. This gives you the method of the SIP message you actually proceed in the config, just add this before the forwarding statement.
xlog("method: $rm");
Cheers,
Henning
any ideas ?
Omar
On Tue, 2009-02-17 at 23:12 -0500, Ferdinandm wrote:
Here is it Basic config for Kamailio 1.4.3
####### Global Parameters ######### debug=9 # change this to 3 log_stderror=yes fork=yes children=4
listen=udp:x.x.x.x:5060
####### Modules Section ########
#set module path mpath="/opt/openser/lib64/kamailio/modules/" loadmodule "db_mysql.so" loadmodule "sl.so" loadmodule "tm.so" loadmodule "rr.so" loadmodule "maxfwd.so" loadmodule "textops.so" loadmodule "mi_fifo.so" #loadmodule "uri_db.so" loadmodule "uri.so" loadmodule "xlog.so" loadmodule "carrierroute.so" # ----------------- setting module-specific parameters ---------------
# ----- mi_fifo params ----- modparam("mi_fifo", "fifo_name", "/tmp/kamailio_fifo")
# ----- carrierroute params ----- modparam("carrierroute", "db_url", "mysql://help:help@localhost/sip") modparam("carrierroute", "config_source", "db")
####### Routing Logic ######## # main request routing logic
route{ if (!mf_process_maxfwd_header("10")) { sl_send_reply("483","Too Many Hops"); exit; };
if (has_totag()) { # sequential request withing a dialog should # take the path determined by record-routing if (loose_route()) { # if (is_method("BYE")) { # with or without BYE i have the same result # if (t_check_trans()) # t_relay(); # } route(10); } else { if ( is_method("ACK") ) { if ( t_check_trans() ) { # non loose-route, but stateful
ACK; must be an ACK after a 487 or e.g. 404 from upstream server t_relay(); exit; } else { # ACK without matching transaction ... ignore and discard.\n"); xlog("L_WARN", "[$mi] discarding ACK\n"); exit; } } sl_send_reply("404","Not here"); } exit; }
#initial requests # CANCEL processing if (is_method("CANCEL")) { if (t_check_trans()) t_relay(); exit; } t_check_trans(); # record routing if (!is_method("REGISTER|MESSAGE")) record_route(); if (!uri==myself) { append_hf("P-hint: outbound\r\n"); route(10); exit; } # requests for my domain if ($rU==NULL) { # request with no Username in RURI sl_send_reply("484","Address Incomplete"); exit; } if (is_method("INVITE")) { if (cr_route("default", "3", "$rU", "$rU", "call_id")) { t_on_failure("1"); route(10); exit; } exit; }
}
route[10] { cr_user_carrier("$fU", "$fd", "$avp(s:carrier)"); $avp(s:domain)="3"; if (!cr_route("$avp(s:carrier)", "$avp(s:domain)", "$rU", "$rU", "call_id")) { xlog("L_ERR", "cr_route failed\n"); exit; } # if you store also the port as part of the rewrite host, # otherwise you can just use $rd later $avp(s:host)= $rd; t_on_failure("1"); # xlog("method: $rm"); if (!t_relay()) { sl_reply_error(); } }
#onreply_route[2] { # xlog("incoming reply\n"); #}
failure_route[1] { revert_uri(); if (!cr_next_domain("$avp(s:carrier)", "$avp(s:domain)", "$rU", "$avp(s:host)", "$T_reply_code", "$avp(s:domain)")) { xlog("L_ERR", "cr_next_domain failed\n"); exit; } if (!cr_route("$avp(s:carrier)", "$avp(s:domain)", "$rU", "$rU", "call_id")) { xlog("L_ERR", "cr_route failed\n"); exit; } # $avp(s:host)= $rd+":"+$rp; $avp(s:host)= $rd; t_on_failure("1"); append_branch(); if (!t_relay()) { xlog("L_ERR", "t_relay failed\n"); exit; } }
i am running solaris 10, 64 bits, then i really don't know if i should not try in this platform.
I somebody has a Working config as an example will be great.
but i still dont have the BYE, is not leaving the server, when i sniff the network.
the kamailio debug shows at least 4 times something like this :
bash-3.00# Feb 17 22:32:11 [15673] DBG:tm:utimer_routine: timer routine:7,tl=fffffffef0293738 next=0, timeout=44300000 Feb 17 22:32:11 [15673] DBG:tm:retransmission_handler: retransmission_handler : request resending (t=fffffffef0293518, BYE sip:4 ... ) Feb 17 22:32:11 [15673] DBG:tm:set_timer: relative timeout is 4000000 Feb 17 22:32:11 [15673] DBG:tm:insert_timer_unsafe: [7]: fffffffef0293738 (48300000) Feb 17 22:32:11 [15673] DBG:tm:retransmission_handler: retransmission_handler : done
bash-3.00# Feb 17 22:32:16 [15673] DBG:tm:utimer_routine: timer routine:7,tl=fffffffef0293738 next=0, timeout=48300000 Feb 17 22:32:16 [15673] DBG:tm:retransmission_handler: retransmission_handler : request resending (t=fffffffef0293518, BYE sip:4 ... ) Feb 17 22:32:16 [15673] DBG:tm:set_timer: relative timeout is 4000000 Feb 17 22:32:16 [15673] DBG:tm:insert_timer_unsafe: [7]: fffffffef0293738 (52300000) Feb 17 22:32:16 [15673] DBG:tm:retransmission_handler: retransmission_handler : done
thanks
F
On Tue, 2009-02-17 at 18:48 +0100, Henning Westerholt wrote:
On Tuesday 17 February 2009, Omar wrote:
i did
there is no bye leaving from the kamailio at all
the config is i stated before but now without the exit in the BYE condition.
kamailio saves the bye when the bye comes from the B side, yes but it does not send anything back to the Originator GW, as it should. i made the captures and nothing. Kamailio receives and process the bye for CDR, but it does not send the BYE to the originator. i captured in the port 5060 and nothing comes.
it is maybe a bug.?
Hi Omar,
it could be a bug, a misconfiguration, or a user agent which does not act according the standard. Does the BYE reach your forwarding/ t_relay statement in your config, you can check with xlog as well. This gives you the method of the SIP message you actually proceed in the config, just add this before the forwarding statement.
xlog("method: $rm");
Cheers,
Henning