SIP registration problem with asterisk 1.2.xx

To register with my SIP provider, I need to configure the SIP port to [color=red]5065[/color].

in sip.conf
register => 1XXXXXXXXXX:xxxxxxxx@sip.babytel.ca:[color=red]5065[/color]

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

asterisk -r

Connected to Asterisk 1.2.0 currently running on miller (pid = 10064)
miller*CLI> sip show registry
Host Username Refresh State
sip.babytel.ca:[color=red]5065[/color] 1XXXXXXXXXX 120 Request Sent

Aug 27 23:29:37 NOTICE[10080]: chan_sip.c:5267 sip_reg_timeout: – Registration for '1XXXXXXXXXX@sip.babytel.ca’ timed out, trying again (Attempt #1)

It did not want to register, so I did a tcpdump and it seem that the configured port is not used.

tcpdump -i eth1 host sip.babytel.ca

tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth1, link-type EN10MB (Ethernet), capture size 96 bytes
23:32:49.302965 IP 192.168.1.130.5060 > sip.babytel.ca.[color=red]5060[/color]: SIP, length: 406
23:32:53.303343 IP 192.168.1.130.5060 > sip.babytel.ca.[color=red]5060[/color]: SIP, length: 406
23:32:57.303990 IP 192.168.1.130.5060 > sip.babytel.ca.[color=red]5060[/color]: SIP, length: 406
23:32:58.303810 IP 192.168.1.130.5060 > sip.babytel.ca.[color=red]5060[/color]: SIP, length: 406
23:32:59.303880 IP 192.168.1.130.5060 > sip.babytel.ca.[color=red]5060[/color]: SIP, length: 406

do a solution exist?

Is the problem in bound , outbound ? Also are you suing NAT ? The problem is that it is unable to connect to the provider.

The problem is that I configured asterisk to use port 5065 to register with my provider and it still continiue to use the default port (5060) event if it shows that it use 5065.

miller*CLI> sip show registry
Host Username Refresh State
sip.babytel.ca:[color=darkred]5065[/color] 1XXXXXXXXXX 120 Request Sent

tcpdump -i eth1 host sip.babytel.ca

tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth1, link-type EN10MB (Ethernet), capture size 96 bytes
23:32:49.302965 IP 192.168.1.130.5060 > sip.babytel.ca.[color=red]5060[/color]: SIP, length: 406

It used to work with asterisk 1.0.xx but now seems broken with 1.2.xx,
specifying the port # does not change the port it uses anymore.

you have to set the 5065 in the beging of sip.conf in the general section

I did it, and it still do the same

[general]
context=local ; Default context for incoming calls
;recordhistory=yes ; Record SIP history by default (see sip history / sip no history)
;realm=mydomain.tld ; Realm for digest authentication
; defaults to “asterisk”
; Realms MUST be globally unique according to RFC 3261
port=5065
; Set this to your host name or domain name
bindport=5060 ; UDP Port to bind to (SIP standard port is 5060)
bindaddr=0.0.0.0 ; IP address to bind to (0.0.0.0 binds to all)

See http://www.voip-info.org/wiki/view/Asterisk+config+sip.conf and what it has to say about the change in the use of port and bindport from 1.0 to 1.2. It may help.

I did some test with bindport=5065 and it only changed the source port not the destination port.

[general]
context=local ; Default context for incoming calls
;recordhistory=yes ; Record SIP history by default (see sip history / sip no history)
;realm=mydomain.tld ; Realm for digest authentication
; defaults to “asterisk”
; Realms MUST be globally unique according to RFC 3261
; Set this to your host name or domain name
bindport=[color=red]5065[/color] ; UDP Port to bind to (SIP standard port is 5060)
bindaddr=0.0.0.0 ; IP address to bind to (0.0.0.0 binds to all)
srvlookup=yes ; Enable DNS SRV lookups on outbound calls

tcpdump -i eth1 host sip.babytel.ca

tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth1, link-type EN10MB (Ethernet), capture size 96 bytes
17:10:28.571913 IP 192.168.1.130.[color=red]5065[/color] > sip.babytel.ca.[color=blue]5060[/color]: SIP, length: 406

what I need to change is the destination port to [color=blue]5065[/color].

[quote=“jeanb”]I did it, and it still do the same

[general]
context=local ; Default context for incoming calls
;recordhistory=yes ; Record SIP history by default (see sip history / sip no history)
;realm=mydomain.tld ; Realm for digest authentication
; defaults to “asterisk”
; Realms MUST be globally unique according to RFC 3261
port=5065
; Set this to your host name or domain name
bindport=5060 ; UDP Port to bind to (SIP standard port is 5060)
bindaddr=0.0.0.0 ; IP address to bind to (0.0.0.0 binds to all)[/quote]

The bindport still points to 5060. Can you change to 5065 and try? Also, the port parameter comes under channel definition not in general sip settings.

If found this in the chan_sip.c :
Format for registration is user[:secret[]]@host[color=red][:port][/color][/contact]

in sip.conf:
register => 1XXXXXXXXXX:xxxxxxxx@sip.babytel.ca:5065

I think my configuration is good since it show the good port in the “sip show registery”

asterisk -r

Connected to Asterisk 1.2.0 currently running on miller (pid = 10064)
miller*CLI> sip show registry
Host Username Refresh State
sip.babytel.ca:[color=red]5065[/color] 1XXXXXXXXXX 120 Request Sent

the problem is that it don’t use it.

tcpdump -i eth1 host sip.babytel.ca

tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth1, link-type EN10MB (Ethernet), capture size 96 bytes
23:32:49.302965 IP 192.168.1.130.5060 > sip.babytel.ca.[color=blue]5060[/color]: SIP, length: 406

maybe it’s a problem with chan_sip.c I’ll repost in the Developers Forum

thanks