Summary:ASTERISK-09317: Sip registration on port different then 5060 fails Asterisk 1.2xx CentOS
Reporter:witekprytek (witekprytek)Labels:
Date Opened:2007-04-26 05:58:26Date Closed:2011-06-07 14:08:24
Versions:Frequency of
Environment:Attachments:( 0) asterisk_debug_sip.log
Description:Asterisk 1.2.13 svn rev 47264
on a i686 running Linux on 2006-12-31

Asterisk SIP peer registration fails when SIP port is set t different than 5060 eg. 5065

in sip.conf
register => 22XXXXXXXXXX:xxxxxxxx@pbx.evoice.pl:5065

in the asterisk console it's show that the port is correctly set to 5065

asterisk1*CLI> sip show registry
Host                            Username       Refresh State
pbx.evoice.pl:5060              223977383          105 Registered
pbx.evoice.pl:5065              717125723          120 Request Sent

sip debug peer shows nothing
Comments:By: Joshua C. Colp (jcolp) 2007-04-26 14:36:47

I have labbed this up using the latest 1.2 from subversion against another Asterisk machine with SIP listening on port 5061. This works fine. Can you please try the latest 1.2 SVN. Can you also confirm that the remote side is indeed listening on port 5065?

By: witekprytek (witekprytek) 2007-04-26 15:17:53

Remote side is listening on porst 5060-6000

I have made some test with Linksys (sipura) VoIP gateway and there was no problem with registering two accounts on two different SIP ports: 5060 and 5065

I dont know why asterisk shows peers on different port than registry:
asterisk1*CLI> sip show peers
Name/username              Host            Dyn Nat ACL Port     Status
evoice-wa-2/717125723             5060     Unmonitored

asterisk1*CLI> sip show registry
Host                            Username       Refresh State
pbx.evoice.pl:5065              717125723          120 Request Sent

By: Olle Johansson (oej) 2007-04-27 03:18:41

Please retest with latest 1.2. This was fixed a while ago.

By: witekprytek (witekprytek) 2007-04-27 07:01:59

# cd /usr/src/
# svn checkout http://svn.digium.com/svn/asterisk/branches/1.2 asterisk-1.2
# mv  /usr/lib/asterisk/modules/ /bakupall/
# cd /usr/src/asterisk-1.2/
# make clean; make install

#/etc/rcd/init.d/asterisk start
Apr 27 13:48:39 WARNING[17669] loader.c: Loading module format_mp3.so failed!

(no module present!!!)
# cp /backup_all/usr_lib_asterisk/modules/format_mp3.so /usr/lib/asterisk/modules/
# chmod 644 /usr/lib/asterisk/modules/format_mp3.so

#/etc/rcd/init.d/asterisk start
Apr 27 13:54:07 VERBOSE[17690] logger.c: Asterisk Ready.

#asterisk -r

asterisk1*CLI> sip show registry
Host                            Username       Refresh State
pbx.evoice.pl:5064              717125723          120 Request Sent

asterisk1*CLI> sip show peers
evoice-wa-2/717125723             5060     Unmonitored
120/120              D   N      5060     OK (4 ms)
111/111             D   N      26244    OK (56 ms)
110/110              D          12514    OK (5 ms)

#tail -f /var/log/asterisk.full
Apr 27 13:58:07 NOTICE[17704] chan_sip.c:    -- Registration for '717125723@pbx.evoice.pl' timed out, trying again (Attempt ASTERISK-8)
Apr 27 13:59:27 NOTICE[17704] chan_sip.c:    -- Registration for '717125723@pbx.evoice.pl' timed out, trying again (Attempt ASTERISK-12)

and again and again
this is for sip port 5064 but the same result on any ports different than 5060
tests provided with some hardware boxes (sipura, grandstream) with sip peer as above on ports 5060 to 5070 have ended with success

By: Olle Johansson (oej) 2007-04-27 08:45:26

You need to provide us with a complete log including the SIP messaging.

By: witekprytek (witekprytek) 2007-04-27 10:13:06

Log attached. I have found similar problem without solution at Asterisk forum:

By: witekprytek (witekprytek) 2007-05-11 08:31:43

Does not work with latest 1.2 :-(

By: Joshua C. Colp (jcolp) 2007-05-14 11:43:45

I have been unable to reproduce this yet again under latest SVN. Any thoughts oej?

By: Joshua C. Colp (jcolp) 2007-06-19 11:48:30

I'm closing this out for now because after both testing it (and confirming it works) and looking at the debug which clearly shows it is going out to the corrent port I'm confident chan_sip is working fine and something else is at fault.