Hi,
I’m running Asterisk 1.8.4.4. on Ubuntu 11.10. I am trying to get my Nexus 4 to sink with my Asterisk box via SIP. I can’t seem to figure out where the problem is. My phone keeps saying “Account Registration is unsuccessful”.
Here are my details. Any suggestions or directions would be appreciated! Thanks for your time!
sip.conf
[nx4]
type = friend
allowguest = yes
context = incoming
host = dynamic
nat = yes
udpbindaddr = 0.0.0.0
username = nx4
secret = XXXXXX
bindport = 5060
canreinvite = no
insecure = invite
dialplan.conf*
[incoming]
exten => 4242, 1, Goto(google, start, 1)
[google]
exten => start, 1, Answer()
same => n, Playback(tt-monkeysintro)
same => n, Playback(hello-world)
same => n, Playback(vm-goodbye)
same => n, Hangup()
*Sip settings on phone
Username: nx4
password: XXXXXX
Server: xxx.xx.xxx.xxx ;ip for my asterisk box
Outbound proxy address: xxx.xx.xxx.xxx ;ip for my asterisk box
Port Number: 5060
Transportation type: UDP
Send keep-alive: Automatic
CLI> sip show peers
Name/username Host Dyn Forcerport ACL Port Status
1001/1001 (Unspecified) D N 0 UNKNOWN
kbeezy/0000000070 xx.xx.xxx.xx N 5060 OK (55 ms)
nx4/nx4 (Unspecified) D N 0 Unmonitored
office-phone (Unspecified) D N 0 UNKNOWN
zoiper/zoiper xx.xx.xx.xxx D 5060 Unmonitored
5 sip peers [Monitored: 1 online, 2 offline Unmonitored: 1 online, 1 offline]
******* sip debug*********
<— SIP read from UDP:xx.xx.77.xxx:5060 —>
<------------->
Reliably Transmitting (NAT) to xx.x4.xx0.xx:5060:
OPTIONS sip:xx.x4.xx0.xx SIP/2.0
Via: SIP/2.0/UDP xxx.xx.xxx.xxx:5060;branch=z9hG4bK3f47219a;rport
Max-Forwards: 70
From: “asterisk” sip:asterisk@1xxx.xx.xxx.xxx;tag=as7313814a
To: sip:xx.x4.xx0.xx
Contact: sip:asterisk@xxx.xx.xxx.xxx:5060
Call-ID: 4d7bb95b6b6904094c4eda5510a8c7ac@xxx.xx.xxx.xxx:5060
CSeq: 102 OPTIONS
User-Agent: Asterisk PBX 1.8.4.4~dfsg-2ubuntu1.1
Date: Tue, 23 Jul 2013 18:03:46 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Content-Length: 0
<— SIP read from UDP:xx.x4.xx0.xx:5060 —>
SIP/2.0 404 Not Found
Via: SIP/2.0/UDP xxx.xx.xxx.xxx:5060;branch=z9hG4bK3f47219a;received=xxx.xx.xxx.xxx;rport=5060
From: “asterisk” sip:asterisk@xxx.xx.xxx.xxx;tag=as7313814a
To: sip:xx.x4.xx0.xx;tag=as6793089d
Call-ID: 4d7bb95b6b6904094c4eda5510a8c7ac@xxx.xx.xxx.xxx:5060
CSeq: 102 OPTIONS
User-Agent: IPKall
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces
Accept: application/sdp
Content-Length: 0
<------------->
— (11 headers 0 lines) —
Really destroying SIP dialog '4d7bb95b6b6904094c4eda5510a8c7ac@xxx.xx.xxx.xxx:5060’ Method: OPTIONS
Really destroying SIP dialog ‘4eba1837cab8596cf822587f2b8f46b0@:xx.xx.77.xxx’ Method: REGISTER
<— SIP read from UDP::xx.xx.77.xxx:57120 —>
REGISTER sip:xxx.xx.xxx.xxx SIP/2.0
Call-ID: 2ed25e42a5dbecde0244eba5c6c1c637@:xx.xx.77.xxx
CSeq: 7516 REGISTER
From: “nx4” sip:nx4@xxx.xx.xxx.xxx;tag=1453620334
To: “nx4” sip:nx4@xxx.xx.xxx.xxx
Via: SIP/2.0/UDP:xx.xx.77.xxx:57120;branch=z9hG4bK015b3fd1093f830d5c3963d7449cda6c323939;rport
Max-Forwards: 70
User-Agent: SIPAUA/0.1.001
Contact: “nx4” sip:nx4@:57120:xx.xx.77.xxx;transport=udp
Expires: 3600
Content-Length: 0
<------------->
— (11 headers 0 lines) —
Sending to x.xx.77.xxx:57120 (no NAT)
<— Transmitting (NAT) to x.xx.77.xxx:57120 —>
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 24.90.77.182:57120;branch=z9hG4bK015b3fd1093f830d5c3963d7449cda6c323939;received=:xx.xx.77.xxx;rport=57120
From: “nx4” sip:nx4@xxx.xx.xxx.xxx;tag=1453620334
To: “nx4” sip:nx4@xxx.xx.xxx.xxx;tag=as7a11e87e
Call-ID: 2ed25e42a5dbecde0244eba5c6c1c637@:xx.xx.77.xxx
CSeq: 7516 REGISTER
Server: Asterisk PBX 1.8.4.4~dfsg-2ubuntu1.1
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
WWW-Authenticate: Digest algorithm=MD5, realm=“asterisk”, nonce="21f9bff1"
Content-Length: 0
<------------>
Scheduling destruction of SIP dialog ‘2ed25e42a5dbecde0244eba5c6c1c637@:xx.xx.77.xxx’ in 32000 ms (Method: REGISTER)
Really destroying SIP dialog ‘9795944343362fbb2ff976c7b5838f86@:xx.xx.77.xxx’ Method: REGISTER
<— SIP read from UDP::xx.xx.77.xxx:5060 —>
<------------->
Really destroying SIP dialog ‘2ed25e42a5dbecde0244eba5c6c1c637@:xx.xx.77.xxx’ Method: REGISTER
<— SIP read from UDP:24.90.77.182:5060 —>
<------------->
EDIT******
I made the following changes, but still cannot get the sip phone to register. When I take the secret off, the IP shows up, but the device is still unreachable.
It looks like the ports are different, despite what I set them up to port 5060. I added this to my sip and reloaded (not shown here) and still have trouble with registering. help!
SIP****
[general]
context = unauthenticated
language = en
allowguest = no
srvlookup = yes
udpbindaddr = 0.0.0.0
tcpenable = no
pedantic = no
host = dynamic
registertimeout = 20 ;
allowoverlap = no ;
bindport = 5060 ;
qualify = yes ;
nat = force_rport, comedia
disallow= all
allow = ulaw
allow = alaw
allow = gsm
allow = g729
[nx4] ; call out
deny = 0.0.0.0/0.0.0.0
type = friend
host = dynamic
context = incoming
dtmfmode = inband ; changed from rfc… and worked
username = nx4 ; second part of sip peers --> channel/username
fromuser = nx4
user = nx4
outboundproxy = xxx.x1.xx8.x7x
secret = xxxxxxxx
canreinvite = no
nat = yes
transport = udp
permit = 0.0.0.0/0.0.0.0
callcounter = yes
faxdetect = no
disallow = all
allow = ulaw
Sip show peers*
Really destroying SIP dialog ‘70c72cc928c9254a313579c64ed53d04@ xxx.x1.xx8.x7x:5060’ Method: OPTIONS
asterisk*CLI> sip show peers
Name/username Host Dyn Forcerport ACL Port Status
1001/1001 (Unspecified) D N 0 UNKNOWN
kbeezy/x0xxxx000 xx.xx.xx0.xx N 5060 OK (55 ms)
nx4/nx4 (Unspecified) D N A 0 UNKNOWN
office-phone (Unspecified) D N 0 UNKNOWN
zoiper/zoiper xx.xx.x7.xxx D 5060 OK (40 ms)
5 sip peers [Monitored: 2 online, 3 offline Unmonitored: 0 online, 0 offline]
Really destroying SIP dialog ‘a0bbbefba59005b27993cb0f4a957ee6@24.90.77.182’ Method: REGISTER
Sip debug****
Retransmitting #3 (NAT) to xx.xx.xx.xxx:58078:
OPTIONS sip:nx4@xx.xx.xx.xxx:58078;transport=udp SIP/2.0
Via: SIP/2.0/UDP xxx.x1.xx8.x7x:5060;branch=z9hG4bK2185d521;rport
Max-Forwards: 70
From: “asterisk” sip:asterisk@xxx.x1.xx8.x7x;tag=as032e6299
To: sip:nx4@xx.xx.xx.xxx:58078;transport=udp
Contact: sip:asterisk@xxx.x1.xx8.x7x:5060
Call-ID: 68192523592fa2f0161ad7037f02a62a@xxx.x1.xx8.x7x:5060
CSeq: 102 OPTIONS
User-Agent: Asterisk PBX 1.8.4.4~dfsg-2ubuntu1.1
Date: Tue, 23 Jul 2013 22:32:25 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Content-Length: 0
Retransmitting #4 (NAT) to xx.xx.xx.xxx:58078:
OPTIONS sip:nx4@xx.xx.xx.xxx:58078;transport=udp SIP/2.0
Via: SIP/2.0/UDP xxx.x1.xx8.x7x:5060;branch=z9hG4bK2185d521;rport
Max-Forwards: 70
From: “asterisk” sip:asterisk@xxx.x1.xx8.x7x;tag=as032e6299
To: sip:nx4@xx.xx.xx.xxx:58078;transport=udp
Contact: sip:asterisk@xxx.x1.xx8.x7x:5060
Call-ID: 68192523592fa2f0161ad7037f02a62a@xxx.x1.xx8.x7x:5060
CSeq: 102 OPTIONS
User-Agent: Asterisk PBX 1.8.4.4~dfsg-2ubuntu1.1
Date: Tue, 23 Jul 2013 22:32:25 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Content-Length: 0
Really destroying SIP dialog '68192523592fa2f0161ad7037f02a62a@1xxx.x1.xx8.x7x:5060’ Method: OPTIONS
Really destroying SIP dialog '1a7a3d03c36ec8bbf28723c76d86e901@xx.xx.xx.xxx’ Method: REGISTER
Reliably Transmitting (NAT) to xx.xx.xx.xxx:58078:
OPTIONS sip:nx4@xx.xx.xx.xxx:58078;transport=udp SIP/2.0
Via: SIP/2.0/UDP xxx.x1.xx8.x7x:5060;branch=z9hG4bK43c75f32;rport
Max-Forwards: 70
From: “asterisk” sip:asterisk@xxx.x1.xx8.x7x;tag=as3263bd55
To: sip:nx4@xx.xx.xx.xxx:58078;transport=udp
Contact: sip:asterisk@xxx.x1.xx8.x7x:5060
Call-ID: 2f8c231e0c7271603f3f93332fdb50db@xxx.x1.xx8.x7x:5060
CSeq: 102 OPTIONS
User-Agent: Asterisk PBX 1.8.4.4~dfsg-2ubuntu1.1
Date: Tue, 23 Jul 2013 22:32:39 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Content-Length: 0