[OpenSER-Users] bye from gateway going to local address

Richard Bennett richard.bennett at skynet.be
Thu Oct 25 12:17:01 CEST 2007


On Wed, 24 Oct 2007 09:42:21 +0200, Iñaki Baz Castillo <ibc at aliax.net>  
wrote:

> Could you capture the packet from Cisco to OpenSer in from of the  
> capture you
> show now (that is from OpenSer to 192.168.1.10)?.
> In fact, it could be useful a entire trace:
> - INVITE from client to OpenSer.
> - INVITE from OpenSer to Cisco.
> - ACK
> - BYE from Cisco.

Thanks Iñaki and Bogdan for looking.
I had misread the trace, as you say it seems it is my openser proxy that  
is not handling nat correctly for the bye messages.
However, it works fine when used directly from a natted useragent, like a  
linksys ata.
The following setup is causing the problems:

UA-Linksys -> Openser-Internal-proxy/UAC -> NAT/DSL -> Openser Proxy ->  
Cisco gateway.

So the user agent registers with the internal Openser that is using the  
user agent module to send the call to the Openser proxy on the internet,  
that terminates the call to the cisco.
When the PSTN side then ends the call the cisco sends a bye to the openser  
proxy, but the proxy doesn't use the external ip address when forwarding  
the bye on:

1.2.3.201  = Openser proxy
1.2.3.204 = Cisco gateway
62.1.2.122 = 2nd Openser proxy with user agent module external IP
192.168.1.10 = 2nd Openser proxy with user agent module internal IP
192.168.1.24 = Actual user agent internal IP.

U 62.1.2.122:5060 -> 1.2.3.201:5060
INVITE sip:0222234359 at 1.2.3.201:5060;transport=udp SIP/2.0.
Record-Route: <sip:192.168.1.10;lr=on;ftag=3682a625cb42f09fo0;
vsf=AAAAAEVVQkRwAwABGHFFUV5SAFpCaWVuc2ludmVzdG1lbnQuY29t>.
Via: SIP/2.0/UDP 192.168.1.10;branch=z9hG4bK811a.687048d4.0.
Via: SIP/2.0/UDP 192.168.1.24:5060;branch=z9hG4bK-83909174.

U 1.2.3.201:5060 -> 62.1.2.122:5060
SIP/2.0 407 Proxy Authentication Required.
Via: SIP/2.0/UDP 192.168.1.10;branch=z9hG4bK811a.687048d4.0;
rport=5060;received=62.1.2.122.
Via: SIP/2.0/UDP 192.168.1.24:5060;branch=z9hG4bK-83909174.

U 62.1.2.122:5060 -> 1.2.3.201:5060
ACK sip:0222234359 at 1.2.3.201:5060;transport=udp SIP/2.0.
Via: SIP/2.0/UDP 192.168.1.10;branch=z9hG4bK811a.687048d4.0.

U 62.1.2.122:5060 -> 1.2.3.201:5060
INVITE sip:0222234359 at 1.2.3.201:5060;transport=udp SIP/2.0.
Record-Route: <sip:192.168.1.10;lr=on;ftag=3682a625cb42f09fo0;
vsf=AAAAAEVVQkRwAwABGHFFUV5SAFpCaWVuc2ludmVzdG1lbnQuY29t>.
Via: SIP/2.0/UDP 192.168.1.10;branch=z9hG4bK811a.687048d4.1.
Via: SIP/2.0/UDP 192.168.1.24:5060;branch=z9hG4bK-83909174.

U 1.2.3.201:5060 -> 62.1.2.122:5060
SIP/2.0 100 trying -- your call is important to us.
Via: SIP/2.0/UDP 192.168.1.10;branch=z9hG4bK811a.687048d4.1;
rport=5060;received=62.1.2.122.
Via: SIP/2.0/UDP 192.168.1.24:5060;branch=z9hG4bK-83909174.

U 1.2.3.201:5060 -> 1.2.3.204:5060
INVITE sip:20200222234359 at 1.2.3.204:5060;transport=udp SIP/2.0.
Record-Route: <sip:1.2.3.201:5060;nat=yes;ftag=3682a625cb42f09fo0;lr=on>.
Record-Route: <sip:192.168.1.10;lr=on;ftag=3682a625cb42f09fo0;
vsf=AAAAAEVVQkRwAwABGHFFUV5SAFpCaWVuc2ludmVzdG1lbnQuY29t>.
Via: SIP/2.0/UDP 1.2.3.201;branch=z9hG4bK811a.f3a63b41.0.
Via: SIP/2.0/UDP 192.168.1.10;rport=5060;received=62.1.2.122;
branch=z9hG4bK811a.687048d4.1.
Via: SIP/2.0/UDP 192.168.1.24:5060;branch=z9hG4bK-83909174.

U 1.2.3.204:50364 -> 1.2.3.201:5060
SIP/2.0 100 Trying.
Via: SIP/2.0/UDP 1.2.3.201;branch=z9hG4bK811a.f3a63b41.0,SIP/2.0/UDP  
192.168.1.10;rport=5060;received=62.1.2.122;branch=z9hG4bK811a.687048d4.1,SIP/2.0/UDP  
192.168.1.24:5060;branch=z9hG4bK-83909174.

U 1.2.3.204:50364 -> 1.2.3.201:5060
SIP/2.0 183 Session Progress.
Via: SIP/2.0/UDP 1.2.3.201;branch=z9hG4bK811a.f3a63b41.0,SIP/2.0/UDP  
192.168.1.10;rport=5060;received=62.1.2.122;branch=z9hG4bK811a.687048d4.1,SIP/2.0/UDP  
192.168.1.24:5060;branch=z9hG4bK-83909174.

U 1.2.3.201:5060 -> 62.1.2.122:5060
SIP/2.0 183 Session Progress.
Via: SIP/2.0/UDP  
192.168.1.10;rport=5060;received=62.1.2.122;branch=z9hG4bK811a.687048d4.1,SIP/2.0/UDP  
192.168.1.24:5060;branch=z9hG4bK-83909174.

U 1.2.3.204:50364 -> 1.2.3.201:5060
SIP/2.0 200 OK.
Via: SIP/2.0/UDP 1.2.3.201;branch=z9hG4bK811a.f3a63b41.0,SIP/2.0/UDP  
192.168.1.10;rport=5060;received=62.1.2.122;branch=z9hG4bK811a.687048d4.1,SIP/2.0/UDP  
192.168.1.24:5060;branch=z9hG4bK-83909174.

U 1.2.3.201:5060 -> 62.1.2.122:5060
SIP/2.0 200 OK.
Via: SIP/2.0/UDP  
192.168.1.10;rport=5060;received=62.1.2.122;branch=z9hG4bK811a.687048d4.1,SIP/2.0/UDP  
192.168.1.24:5060;branch=z9hG4bK-83909174.

U 62.1.2.122:5060 -> 1.2.3.201:5060
ACK sip:20200222234359 at 1.2.3.204:5060 SIP/2.0.
Record-Route: <sip:192.168.1.10;lr=on;ftag=3682a625cb42f09fo0>.
Via: SIP/2.0/UDP 192.168.1.10;branch=z9hG4bK811a.687048d4.3.
Via: SIP/2.0/UDP 192.168.1.24:5060;branch=z9hG4bK-c009ea18.

U 1.2.3.201:5060 -> 1.2.3.204:5060
ACK sip:20200222234359 at 1.2.3.204:5060 SIP/2.0.
Record-Route: <sip:1.2.3.201;lr=on;ftag=3682a625cb42f09fo0>.
Record-Route: <sip:192.168.1.10;lr=on;ftag=3682a625cb42f09fo0>.
Via: SIP/2.0/UDP 1.2.3.201;branch=z9hG4bK811a.f3a63b41.2.
Via: SIP/2.0/UDP  
192.168.1.10;received=62.1.2.122;branch=z9hG4bK811a.687048d4.3.
Via: SIP/2.0/UDP 192.168.1.24:5060;branch=z9hG4bK-c009ea18.

U 1.2.3.204:50364 -> 1.2.3.201:5060
BYE sip:test at 62.1.2.122:5060 SIP/2.0.
Via: SIP/2.0/UDP  1.2.3.204:5060;branch=z9hG4bKCF2C1358.

U 1.2.3.201:5060 -> 192.168.1.10:5060
BYE sip:test at 62.1.2.122:5060 SIP/2.0.
Record-Route: <sip:1.2.3.201;lr=on;ftag=EC0DEF7C-ECF>.
Via: SIP/2.0/UDP 1.2.3.201;branch=z9hG4bKb11a.8612b353.0.
Via: SIP/2.0/UDP  1.2.3.204:5060;branch=z9hG4bKCF2C1358.

At this point we get in to lots of repeated byes with the wrong IP address.
The full trace is also attached, and my openser config was in the first  
mail in this thread,

Thanks for any pointers on handling nat for bye messages.

Richard.











-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: calltest.txt
Url: http://lists.kamailio.org/pipermail/users/attachments/20071025/60f0bcb3/attachment.txt 


More information about the Users mailing list