[asterisk-users] Asterisk replying to wrong port for NOTIFY messages

James Lamanna jlamanna at gmail.com
Fri Jan 7 19:13:24 CST 2011


Hi Jeff,

On Thu, Jan 6, 2011 at 11:28 AM, Jeff LaCoursiere <jeff at sunfone.com> wrote:
>
>
> On Wed, 5 Jan 2011, James Lamanna wrote:
>
>> See the following SIP trace.
>> Where in the world does Asterisk get port 1025 to respond to?
>> This is asterisk 1.6.x.
>>
>
> Hi James,
>
> I'm sure it would be the NAT translated port on the public side of the
> customer's firewall...

Unfortunately its not. All clients are on symmetric NAT.
Here's an ngrep trace, you can see the NAT port in the VIA is the same
as the source port:

U xxx.xxx.xxx.44:8155 -> xx.xxx.xxx.7:5060
  NOTIFY sip:pbx1.warp2biz.com SIP/2.0..Via: SIP/2.0/UDP
192.168.1.127:8155;branch=z9hG4bK-4b50c77d..From: "zzzzzzzzzz"
<sip:zzzzzzzzzz at pbx1.example.com>;tag=5281a88170274fa2o0..To:
<sip:pbx1.example.com>..Call-ID: c914b8d-532f2806 at 192.168.1.127..CSeq:
14492 NOTIFY..Max-Forwards: 70..Con
  tact: "zzzzzzzzzz" <sip:zzzzzzzzzz at 192.168.1.127:8155>..Event:
keep-alive..User-Agent:
Cisco/SPA509G-7.4.6-0002fdff9097..Content-Length: 0....
#
U xx.xxx.xxx.7:5060 -> xx.xxx.xxx.44:1025
  SIP/2.0 200 OK..Via: SIP/2.0/UDP
192.168.1.127:8155;branch=z9hG4bK-4b50c77d;received=xx.xxx.xxx.44..From:
"zzzzzzzzzz" <sip:zzzzzzzzzz at pbx1.example.com>;tag=5281a88170274fa2o0..To:
<sip:pbx1.example.com>;tag=as62dac391..Call-ID:
c914b8d-532f2806 at 192.168.1.127..CSeq: 14492 NOTIFY..User-
  Agent: Asterisk PBX..Allow: INVITE, ACK, CANCEL, OPTIONS, BYE,
REFER, SUBSCRIBE, NOTIFY, INFO..Supported: replaces..Content-Length:
0....


-- James

>
> j
>
>> Thanks.
>>
>> -- James
>>
>>
>> <--- SIP read from zzz.zzz.zzz.44:9363 --->
>> NOTIFY sip:pbx1.mydomain.com SIP/2.0^M
>> Via: SIP/2.0/UDP 192.168.1.140:9363;branch=z9hG4bK-b9a860d3^M
>> From: "xxx-xxx-xxxx"
>> <sip:xxxxxxxxxx at pbx1.mydomain.com>;tag=467525dd6fac949do0^M
>> To: <sip:pbx1.mydomain.com>^M
>> Call-ID: 707176dd-38f4779d at 192.168.1.140^M
>> CSeq: 118907 NOTIFY^M
>> Max-Forwards: 70^M
>> Contact: "xxx-xxx-xxxx" <sip:xxxxxxxxx at 192.168.1.140:9363>^M
>> Event: keep-alive^M
>> User-Agent: Cisco/SPA509G-7.4.6-0002fdff90a4^M
>> Content-Length: 0^M
>> ^M
>>
>> <------------->
>> [Jan  5 13:46:36] VERBOSE[3919] logger.c: --- (11 headers 0 lines) ---
>> [Jan  5 13:46:36] VERBOSE[3919] logger.c:
>> <--- Transmitting (no NAT) to zzz.zzz.zzz.44:1025 --->
>> SIP/2.0 200 OK^M
>> Via: SIP/2.0/UDP
>> 192.168.1.140:9363;branch=z9hG4bK-b9a860d3;received=zzz.zzz.zzz.44^M
>> From: "xxx-xxx-xxxx"
>> <sip:xxxxxxxxx at pbx1.mydomain.com>;tag=467525dd6fac949do0^M
>> To: <sip:pbx1.mydomain.com>;tag=as0493c604^M
>> Call-ID: 707176dd-38f4779d at 192.168.1.140^M
>> CSeq: 118907 NOTIFY^M
>> User-Agent: Asterisk PBX^M
>> Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO^M
>> Supported: replaces^M
>> Content-Length: 0^M
>>
>> --
>> _____________________________________________________________________
>> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>> New to Asterisk? Join us for a live introductory webinar every Thurs:
>>              http://www.asterisk.org/hello
>>
>> asterisk-users mailing list
>> To UNSUBSCRIBE or update options visit:
>>  http://lists.digium.com/mailman/listinfo/asterisk-users
>>
>
> --
> _____________________________________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
> New to Asterisk? Join us for a live introductory webinar every Thurs:
>              http://www.asterisk.org/hello
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>  http://lists.digium.com/mailman/listinfo/asterisk-users
>



More information about the asterisk-users mailing list