Hi
I need some "guidelines" to troubleshoot the following issue:
a) A is behind NAT
b) B is not behind NAT
c) A calls B, SIP INVITE is sent over TCP
d) A's firewall does NAT and changes the source port to let's say p1
e) B releases the call and sends BYE over UDP
f) Kamailio sends the BYE to A, over UDP, to the NATed source port p1 ?!
2 comments: - This scenario works perfectly when A is the one who disconnects the call. and of course when no NAT is involved everything works ok - if works when I comment the line "fix_nated_contact()" in the route[NAT] block:
route[NAT]{ #!ifdef WITH_NAT force_rport(); #if (nat_uac_test("19")) { if (nat_uac_test("3")) { if (method=="REGISTER") { setbflag(10); fix_nated_register(); } else { #fix_nated_contact(); [...]
Any hint is very welcome.
Cheers Pascal
The contact after fix_nated_contact() should also contain ;transport=tcp. Thus, Kamailio should relay the BYE with TCP.
Can you show an ngrep dump (ngrep -W byline -t -q -P "" port 5060) of the problematic scenario?
regards klaus
PS: A more standard-conform way of rewriting the SDP is to use the add_contact_alias() and handle_ruri_alias() functions: http://sip-router.org/docbook/sip-router/branch/master/modules_k/nathelper/n...
regards klaus
Am 14.04.2010 12:06, schrieb Pascal Maugeri:
Hi
I need some "guidelines" to troubleshoot the following issue:
a) A is behind NAT
b) B is not behind NAT
c) A calls B, SIP INVITE is sent over TCP
d) A's firewall does NAT and changes the source port to let's say p1
e) B releases the call and sends BYE over UDP
f) Kamailio sends the BYE to A, over UDP, to the NATed source port p1 ?!
2 comments:
- This scenario works perfectly when A is the one who disconnects the
call. and of course when no NAT is involved everything works ok
- if works when I comment the line "fix_nated_contact()" in the
route[NAT] block:
route[NAT]{ #!ifdef WITH_NAT force_rport(); #if (nat_uac_test("19")) { if (nat_uac_test("3")) { if (method=="REGISTER") { setbflag(10); fix_nated_register(); } else { #fix_nated_contact(); [...]
Any hint is very welcome.
Cheers Pascal
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
On Wed, Apr 14, 2010 at 12:21 PM, Klaus Darilion < klaus.mailinglists@pernau.at> wrote:
The contact after fix_nated_contact() should also contain ;transport=tcp. Thus, Kamailio should relay the BYE with TCP.
Oh I see, do you mean that the INVITE sent by A should includes ;transport=tcp in its Contact header ?
Can you show an ngrep dump (ngrep -W byline -t -q -P "" port 5060) of the
problematic scenario?
I'm not sure if I can share these traces :-/ I will see what I could do.
Regards, Pascal
regards klaus
PS: A more standard-conform way of rewriting the SDP is to use the add_contact_alias() and handle_ruri_alias() functions:
http://sip-router.org/docbook/sip-router/branch/master/modules_k/nathelper/n...
regards klaus
Am 14.04.2010 12:06, schrieb Pascal Maugeri:
Hi
I need some "guidelines" to troubleshoot the following issue:
a) A is behind NAT
b) B is not behind NAT
c) A calls B, SIP INVITE is sent over TCP
d) A's firewall does NAT and changes the source port to let's say p1
e) B releases the call and sends BYE over UDP
f) Kamailio sends the BYE to A, over UDP, to the NATed source port p1 ?!
2 comments:
- This scenario works perfectly when A is the one who disconnects the
call. and of course when no NAT is involved everything works ok
- if works when I comment the line "fix_nated_contact()" in the
route[NAT] block:
route[NAT]{ #!ifdef WITH_NAT force_rport(); #if (nat_uac_test("19")) { if (nat_uac_test("3")) { if (method=="REGISTER") { setbflag(10); fix_nated_register(); } else { #fix_nated_contact(); [...]
Any hint is very welcome.
Cheers Pascal
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Klaus
I attached the ngrep you asked me to this email.
Regards, Pascal
On Wed, Apr 14, 2010 at 12:21 PM, Klaus Darilion < klaus.mailinglists@pernau.at> wrote:
The contact after fix_nated_contact() should also contain ;transport=tcp. Thus, Kamailio should relay the BYE with TCP.
Can you show an ngrep dump (ngrep -W byline -t -q -P "" port 5060) of the problematic scenario?
regards klaus
PS: A more standard-conform way of rewriting the SDP is to use the add_contact_alias() and handle_ruri_alias() functions:
http://sip-router.org/docbook/sip-router/branch/master/modules_k/nathelper/n...
regards klaus
Am 14.04.2010 12:06, schrieb Pascal Maugeri:
Hi
I need some "guidelines" to troubleshoot the following issue:
a) A is behind NAT
b) B is not behind NAT
c) A calls B, SIP INVITE is sent over TCP
d) A's firewall does NAT and changes the source port to let's say p1
e) B releases the call and sends BYE over UDP
f) Kamailio sends the BYE to A, over UDP, to the NATed source port p1 ?!
2 comments:
- This scenario works perfectly when A is the one who disconnects the
call. and of course when no NAT is involved everything works ok
- if works when I comment the line "fix_nated_contact()" in the
route[NAT] block:
route[NAT]{ #!ifdef WITH_NAT force_rport(); #if (nat_uac_test("19")) { if (nat_uac_test("3")) { if (method=="REGISTER") { setbflag(10); fix_nated_register(); } else { #fix_nated_contact(); [...]
Any hint is very welcome.
Cheers Pascal
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
IMO the client is broken as it announces in Contact header that it want's to be contacted via UDP, although it is sending the message via TCP.
As suggest use add_contact_alias() instead of fix_nated_contact() to add the protocol always to the Contact URI. Of course then you have to use handle_ruri_alias() on all in-dialog requests.
regards klaus
Am 14.04.2010 13:53, schrieb Pascal Maugeri:
Klaus
I attached the ngrep you asked me to this email.
Regards, Pascal
On Wed, Apr 14, 2010 at 12:21 PM, Klaus Darilion <klaus.mailinglists@pernau.at mailto:klaus.mailinglists@pernau.at> wrote:
The contact after fix_nated_contact() should also contain ;transport=tcp. Thus, Kamailio should relay the BYE with TCP. Can you show an ngrep dump (ngrep -W byline -t -q -P "" port 5060) of the problematic scenario? regards klaus PS: A more standard-conform way of rewriting the SDP is to use the add_contact_alias() and handle_ruri_alias() functions: http://sip-router.org/docbook/sip-router/branch/master/modules_k/nathelper/nathelper.html#id2601711 regards klaus Am 14.04.2010 12:06, schrieb Pascal Maugeri: Hi I need some "guidelines" to troubleshoot the following issue: a) A is behind NAT b) B is not behind NAT c) A calls B, SIP INVITE is sent over TCP d) A's firewall does NAT and changes the source port to let's say p1 e) B releases the call and sends BYE over UDP f) Kamailio sends the BYE to A, over UDP, to the NATed source port p1 ?! 2 comments: - This scenario works perfectly when A is the one who disconnects the call. and of course when no NAT is involved everything works ok - if works when I comment the line "fix_nated_contact()" in the route[NAT] block: route[NAT]{ #!ifdef WITH_NAT force_rport(); #if (nat_uac_test("19")) { if (nat_uac_test("3")) { if (method=="REGISTER") { setbflag(10); fix_nated_register(); } else { #fix_nated_contact(); [...] Any hint is very welcome. Cheers Pascal _______________________________________________ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org <mailto:sr-users@lists.sip-router.org> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Klaus Darilion writes:
As suggest use add_contact_alias() instead of fix_nated_contact() to add the protocol always to the Contact URI. Of course then you have to use handle_ruri_alias() on all in-dialog requests.
i tried to add alias usage example in sip router wiki, but was not able to create a new page. i tried to log in, but the username and password that works for me in the tracker, didn't work in wiki. perhaps i don't have username/password for the wiki.
-- juha
Klaus Darilion writes:
As suggest use add_contact_alias() instead of fix_nated_contact() to add the protocol always to the Contact URI. Of course then you have to use handle_ruri_alias() on all in-dialog requests.
ok, i managed to get the wiki page done:
http://sip-router.org/wiki/tutorials/alias-example
-- juha
Thank you, I really appreciate ! I will read that carefully.
FYI, we just did the test of sending the INVITE with transport=tcp in contact header and it just works fine: kamailio sends the BYE over TCP.
Regards, Pascal
On Wed, Apr 14, 2010 at 3:36 PM, Juha Heinanen jh@tutpro.com wrote:
Klaus Darilion writes:
As suggest use add_contact_alias() instead of fix_nated_contact() to add the protocol always to the Contact URI. Of course then you have to use handle_ruri_alias() on all in-dialog requests.
ok, i managed to get the wiki page done:
http://sip-router.org/wiki/tutorials/alias-example
-- juha