[Home]

Summary:ASTERISK-08962: Asterisk Registering to other SIP servers on non-default port.
Reporter:Bala Neelakantan (neelakantan)Labels:
Date Opened:2007-03-07 15:46:28.000-0600Date Closed:2007-06-30 09:20:08
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Channels/chan_sip/Registration
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:Hello,

I am trying to REGISTER asterisk to a SIP server, which is listening on Port 6060 (not 5060).  

The sip.conf file contains

register=18474201111:quintum@192.168.2.94:6060/18474201111
maxexpirey=3600
defaultexpirey=120

But the REGISTER message is sent to Port 6060, but the Request-URI doesnt contains port 6060.  Per SIP Specification, if no port is present, it is assumed to be Port 5060.  This is being rejected by SIP server.

REGISTER sip:192.168.2.94 SIP/2.0

The request line instead should be like this:

REGISTER sip:192.168.2.94:6060 SIP/2.0

See the attached debug logs.

SIP Debugging enabled
*CLI> reload
Mar  7 13:23:12 NOTICE[17748]: cdr.c:1193 do_reload: CDR simple logging enabled.
Mar  7 13:23:12 NOTICE[17748]: indications.c:505 ast_unregister_indication_country: Removed default indication country 'us'
Mar  7 13:23:12 WARNING[17748]: chan_zap.c:11029 setup_zap: Ignoring signalling
Mar  7 13:23:12 WARNING[17748]: chan_zap.c:11029 setup_zap: Ignoring signalling
*CLI> Mar  7 13:23:12 NOTICE[17759]: chan_sip.c:5465 sip_reregister:    -- Re-registration for  18474201111@192.168.2.94
REGISTER 12 headers, 0 lines
Reliably Transmitting (no NAT) to 192.168.2.94:6060:
REGISTER sip:192.168.2.94 SIP/2.0
Via: SIP/2.0/UDP 192.168.2.96:5060;branch=z9hG4bK1d8de05f;rport
From: <sip:18474201111@192.168.2.94>;tag=as40ac92ca
To: <sip:18474201111@192.168.2.94>
Call-ID: 32e103eb389d6fa76c232e5e7dcb6728@127.0.0.1
CSeq: 102 REGISTER
User-Agent: Asterisk PBX
Max-Forwards: 70
Expires: 120
Contact: <sip:18474201111@192.168.2.96>
Event: registration
Content-Length: 0

Thanks,
Neel




****** ADDITIONAL INFORMATION ******

Sent to asterisk users mailing list and entering a bug based on advice of Olle E Johansson
Comments:By: Olle Johansson (oej) 2007-03-08 01:42:10.000-0600

Yes, we're missing the port on the request uri. Good catch.

Will look into this.

By: Olle Johansson (oej) 2007-03-13 06:46:10

Fixed in rev 58847 of 1.2

By: Olle Johansson (oej) 2007-03-13 06:46:30

Also committed to svn 1.4 and trunk.