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.
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: 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.
[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)
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: 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].
[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
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