# SIP Configuration in Asterisk and SIP Phone

**URL:** <https://community.asterisk.org/t/sip-configuration-in-asterisk-and-sip-phone/43446>\
**Category:** Asterisk Support\
**Created:** [July 23, 2013, 6:27pm UTC](https://community.asterisk.org/t/sip-configuration-in-asterisk-and-sip-phone/43446 "2013-07-23T18:27:22Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![KBennett](https://sea1.discourse-cdn.com/asterisk/user_avatar/community.asterisk.org/kbennett/32/146_2.png) [@KBennett](https://community.asterisk.org/u/KBennett)\
**Post date:** [July 23, 2013, 6:27pm UTC](https://community.asterisk.org/t/sip-configuration-in-asterisk-and-sip-phone/43446/1 "2013-07-23T18:27:22Z")

</div>

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](http://xxx.xx.xxx.xxx) ;ip for my asterisk box  
Outbound proxy address: [xxx.xx.xxx.xxx](http://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](http://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](http://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](mailto: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](http://xxx.xx.xxx.xxx:5060);branch=z9hG4bK3f47219a;[received=xxx.xx.xxx.xxx](http://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](mailto: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](http://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](http://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.x](mailto:68192523592fa2f0161ad7037f02a62a@xxx.x1.xx8.x)7x: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](http://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.x](mailto:68192523592fa2f0161ad7037f02a62a@xxx.x1.xx8.x)7x: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](http://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.x](mailto:2f8c231e0c7271603f3f93332fdb50db@xxx.x1.xx8.x)7x: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

---

<div class="post-metadata">

**Author:** ![david55](https://avatars.discourse-cdn.com/v4/letter/d/e19adc/32.png) [@david55](https://community.asterisk.org/u/david55)\
**Post date:** [July 24, 2013, 3:30pm UTC](https://community.asterisk.org/t/sip-configuration-in-asterisk-and-sip-phone/43446/2 "2013-07-24T15:30:19Z")

</div>

Never set insecure=invite on devices that may be given toll calling rights.

As well as normally being bad practice, allowguest does not work in device sections.

The phone should resend the register with authentication data. If it doesn’t, it suggests it doesn’t believe it has a password set (or cannot do basic authentication).

---

<div class="post-metadata">

**Author:** ![KBennett](https://sea1.discourse-cdn.com/asterisk/user_avatar/community.asterisk.org/kbennett/32/146_2.png) [@KBennett](https://community.asterisk.org/u/KBennett)\
**Post date:** [July 25, 2013, 3:46pm UTC](https://community.asterisk.org/t/sip-configuration-in-asterisk-and-sip-phone/43446/3 "2013-07-25T15:46:41Z")

</div>

Hi David55, thanks for responding…

I took out allowguest and insecure, but I still can’t get the phone to register. I can see that the phone is trying to register (due to the feedback on its interface). I’m still not sure what the problem is. ☹

Can you take another look? Could it be something else that isn’t set correctly? Or is set incorrectly? I’d appreciate it!

Here is what I have on the phone itself, the sip.conf, debug and sip show peers:

\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* settings on actual phone\*\*\*\*\*\*\*\*\*\*\*\*

Username: nx4  
password: mypass  
server: my.asterisk.box  
outbound proxy address: my.asterisk.box  
port number: 5060  
transportation type: UDP  
Send keep-alive: automatic  
display name:   
authentication username:

**_sip conf_** \*\*\*

[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]

deny = 0.0.0.0/0.0.0.0  
type = friend  
host = dynamic  
context = incoming  
dtmfmode = inband  
username = nx4 ; second part of sip peers --\> channel/username  
fromuser = nx4  
user = nx4  
outboundproxy = [xxx.xx.xxx.xxx](http://xxx.xx.xxx.xxx) ; asterisk box  
secret =mypass  
nat = yes  
transport = udp  
permit = 0.0.0.0/0.0.0.0  
callcounter = yes  
faxdetect = no  
disallow = all  
allow = ulaw  
bindport =5060

**_ship show peers_**  
Really destroying SIP dialog ‘1edaf14b7bd613b16bb168941aa7891a@198.61.168.179:5060’ Method: OPTIONS  
asterisk_CLI\> sip show peers  
Name/username Host Dyn Forcerport ACL Port Status  
1001/1001 (Unspecified) D N 0 UNKNOWN  
kbeezy/xxxxxxxxx xx.xx.xxx.xx N 5060 OK (56 ms)  
nx4/nx4 (Unspecified) D N A 0 UNKNOWN  
office-phone (Unspecified) D N 0 UNKNOWN  
zoiper/zoiper [xx.xx.xx.xxx](http://xx.xx.xx.xxx) D 5060 OK (46 ms)  
5 sip peers [Monitored: 2 online, 3 offline Unmonitored: 0 online, 0 offline]  
asterisk_CLI\>

## **_sip debug output_** \*\*\*\*

Reliably Transmitting (NAT) to xx.xx.xxx.xx :5060:  
OPTIONS sip:xx.xx.xxx.xx SIP/2.0  
Via: SIP/2.0/UDP [xxx.xx.xxx.xxx:5060](http://xxx.xx.xxx.xxx:5060);branch=z9hG4bK20f3ad4a;rport  
Max-Forwards: 70  
From: “asterisk” sip:asterisk@xxx.xx.xxx.xxx;tag=as35b1d57f  
To: sip:xx.xx.xxx.xx  
Contact: sip:asterisk@xxx.xx.xxx.xxx:5060  
Call-ID: [12652ac42817c7205206be18601df5ce@xxx.xx.xxx.xxx](mailto:12652ac42817c7205206be18601df5ce@xxx.xx.xxx.xxx):5060  
CSeq: 102 OPTIONS  
User-Agent: Asterisk PBX 1.8.4.4~dfsg-2ubuntu1.1  
Date: Thu, 25 Jul 2013 15:20:57 GMT  
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH  
Supported: replaces, timer  
Content-Length: 0

\<-------------\>  
— (11 headers 0 lines) —  
Really destroying SIP dialog '12652ac42817c7205206be18601df5ce@xxx.xx.xxx.xxx:5060’ Method: OPTIONS  
Really destroying SIP dialog '305cf6cf6ea54ff642d864c5ebbf9bb3@xx.xx.xxx.xx’ Method: REGISTER

---

<div class="post-metadata">

**Author:** ![david55](https://avatars.discourse-cdn.com/v4/letter/d/e19adc/32.png) [@david55](https://community.asterisk.org/u/david55)\
**Post date:** [July 25, 2013, 4:58pm UTC](https://community.asterisk.org/t/sip-configuration-in-asterisk-and-sip-phone/43446/4 "2013-07-25T16:58:57Z")

</div>

There is no register attempt in the current debug output. The previous one showed an abandoned one. It should go REGISTER, 401, REGISTER, 200, but stopped after the 401. That means that either you provided incomplete logs, or the phone realised that it was unable to authenticate, and gave up.

---

<div class="post-metadata">

**Author:** ![KBennett](https://sea1.discourse-cdn.com/asterisk/user_avatar/community.asterisk.org/kbennett/32/146_2.png) [@KBennett](https://community.asterisk.org/u/KBennett)\
**Post date:** [July 25, 2013, 5:22pm UTC](https://community.asterisk.org/t/sip-configuration-in-asterisk-and-sip-phone/43446/5 "2013-07-25T17:22:03Z")

</div>

My apologies! Zoiper and IPKall work fine, so far. Nx4 is the one I’m having issues with.

Here’s a full one:

\<— SIP read from UDP:xx.xx.xx.xxx:57753 —\>  
REGISTER sip:xxx.xx.xxx.xxx SIP/2.0  
Call-ID: [50d6618f51cfb430c1e047a0f470fd8f@xx.xx.xx.xxx](mailto:50d6618f51cfb430c1e047a0f470fd8f@xx.xx.xx.xxx)  
CSeq: 6386 REGISTER  
From: “nx4” sip:nx4@xxx.xx.xxx.xxx;tag=2778056207  
To: “nx4” sip:nx4@xxx.xx.xxx.xxx  
Via: SIP/2.0/UDP [xx.xx.xx.xxx:57753](http://xx.xx.xx.xxx:57753);branch=z9hG4bK225c148413dd14575ca6993ad7a5484d313631;rport  
Max-Forwards: 70  
User-Agent: SIPAUA/0.1.001  
Contact: \*  
Expires: 0  
Content-Length: 0

\<-------------\>  
— (11 headers 0 lines) —  
Sending to [xx.xx.xx.xxx:57753](http://xx.xx.xx.xxx:57753) (no NAT)

\<— Transmitting (NAT) to [xx.xx.xx.xxx:57753](http://xx.xx.xx.xxx:57753) —\>  
SIP/2.0 401 Unauthorized  
Via: SIP/2.0/UDP [xx.xx.xx.xxx:57753](http://xx.xx.xx.xxx:57753);branch=z9hG4bK225c148413dd14575ca6993ad7a5484d313631;[received=xx.xx.xx.xxx](http://received=xx.xx.xx.xxx);rport=57753  
From: “nx4” sip:nx4@xxx.xx.xxx.xxx;tag=2778056207  
To: “nx4” sip:nx4@xxx.xx.xxx.xxx;tag=as02009c6f  
Call-ID: [50d6618f51cfb430c1e047a0f470fd8f@xx.xx.xx.xxx](mailto:50d6618f51cfb430c1e047a0f470fd8f@xx.xx.xx.xxx)  
CSeq: 6386 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="227edcda"  
Content-Length: 0

\<------------\>  
Scheduling destruction of SIP dialog '50d6618f51cfb430c1e047a0f470fd8f@xx.xx.xx.xxx’ in 32000 ms (Method: REGISTER)

\<— SIP read from UDP:xx.xx.xx.xxx:5060 —\>

\<-------------\>  
Reliably Transmitting (NAT) toxx.xx.xxx.xx:5060:  
OPTIONS sip:xx.xx.xxx.xx SIP/2.0  
Via: SIP/2.0/UDP [xxx.xx.xxx.xxx:5060](http://xxx.xx.xxx.xxx:5060);branch=z9hG4bK192b5810;rport  
Max-Forwards: 70  
From: “asterisk” sip:asterisk@xxx.xx.xxx.xxx;tag=as701fca91  
To: sip:xx.xx.xxx.xx  
Contact: sip:asterisk@xxx.xx.xxx.xxx:5060  
Call-ID: [77208fab2f871c5d04e1382768d71bda@xxx.xx.xxx.xxx](mailto:77208fab2f871c5d04e1382768d71bda@xxx.xx.xxx.xxx):5060  
CSeq: 102 OPTIONS  
User-Agent: Asterisk PBX 1.8.4.4~dfsg-2ubuntu1.1  
Date: Thu, 25 Jul 2013 17:15:22 GMT  
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH  
Supported: replaces, timer  
Content-Length: 0

* * *

Reliably Transmitting (no NAT) to [xx.xx.xx.xxx:5060](http://xx.xx.xx.xxx:5060):  
OPTIONS sip:zoiper@xx.xx.xx.xxx:5060;rinstance=7bc586e32d632a74;transport=UDP SIP/2.0  
Via: SIP/2.0/UDP [xxx.xx.xxx.xxx:5060](http://xxx.xx.xxx.xxx:5060);branch=z9hG4bK21403b8c  
Max-Forwards: 70  
From: “asterisk” sip:asterisk@xxx.xx.xxx.xxx;tag=as56d43c49  
To: sip:zoiper@xx.xx.xx.xxx:5060;rinstance=7bc586e32d632a74;transport=UDP  
Contact: sip:asterisk@xxx.xx.xxx.xxx:5060  
Call-ID: [2bf05a3a6b9b931f5678e44d342d8dfd@xxx.xx.xxx.xxx](mailto:2bf05a3a6b9b931f5678e44d342d8dfd@xxx.xx.xxx.xxx):5060  
CSeq: 102 OPTIONS  
User-Agent: Asterisk PBX 1.8.4.4~dfsg-2ubuntu1.1  
Date: Thu, 25 Jul 2013 17:15:22 GMT  
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH  
Supported: replaces, timer  
Content-Length: 0

* * *

\<— SIP read from UDP:xx.xx.xxx.xx:5060 —\>  
SIP/2.0 404 Not Found  
Via: SIP/2.0/UDP [xxx.xx.xxx.xxx:5060](http://xxx.xx.xxx.xxx:5060);branch=z9hG4bK192b5810;[received=xxx.xx.xxx.xxx](http://received=xxx.xx.xxx.xxx);rport=5060  
From: “asterisk” sip:asterisk@xxx.xx.xxx.xxx;tag=as701fca91  
To: sip:xx.xx.xxx.xx;tag=as3505656d  
Call-ID: [77208fab2f871c5d04e1382768d71bda@xxx.xx.xxx.xxx](mailto:77208fab2f871c5d04e1382768d71bda@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 '77208fab2f871c5d04e1382768d71bda@xxx.xx.xxx.xxx:5060’ Method: OPTIONS

\<— SIP read from UDP:xx.xx.xx.xxx:5060 —\>  
SIP/2.0 200 OK  
Via: SIP/2.0/UDP [xxx.xx.xxx.xxx:5060](http://xxx.xx.xxx.xxx:5060);branch=z9hG4bK21403b8c  
Contact: sip:xx.xx.xx.xxx:5060  
To: sip:zoiper@xx.xx.xx.xxx:5060;rinstance=7bc586e32d632a74;transport=UDP;tag=b7a22458  
From: "asterisk"sip:asterisk@xxx.xx.xxx.xxx;tag=as56d43c49  
Call-ID: [2bf05a3a6b9b931f5678e44d342d8dfd@xxx.xx.xxx.xxx](mailto:2bf05a3a6b9b931f5678e44d342d8dfd@xxx.xx.xxx.xxx):5060  
CSeq: 102 OPTIONS  
Accept: application/sdp, application/sdp  
Accept-Language: en  
Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO, SUBSCRIBE  
Supported: replaces, norefersub, extended-refer, X-cisco-serviceuri  
User-Agent: Zoiper rev.11619  
Allow-Events: presence, kpml  
Content-Length: 0

\<-------------\>  
— (14 headers 0 lines) —  
Really destroying SIP dialog '2bf05a3a6b9b931f5678e44d342d8dfd@xxx.xx.xxx.xxx:5060’ Method: OPTIONS

\<— SIP read from UDP:xx.xx.xx.xxx:57753 —\>  
REGISTER sip:xxx.xx.xxx.xxx SIP/2.0  
Call-ID: [f1ad591c984e6c1fd7e79d09a9596748@xx.xx.xx.xxx](mailto:f1ad591c984e6c1fd7e79d09a9596748@xx.xx.xx.xxx)  
CSeq: 8575 REGISTER  
From: “nx4” sip:nx4@xxx.xx.xxx.xxx;tag=96168691  
To: “nx4” sip:nx4@xxx.xx.xxx.xxx  
Via: SIP/2.0/UDP [xx.xx.xx.xxx:57753](http://xx.xx.xx.xxx:57753);branch=z9hG4bKb63f244a27efe1d3ff6996a361ffac24313631;rport  
Max-Forwards: 70  
User-Agent: SIPAUA/0.1.001  
Contact: “nx4” sip:nx4@xx.xx.xx.xxx:57753;transport=udp  
Expires: 3600  
Content-Length: 0

\<-------------\>  
— (11 headers 0 lines) —  
Sending to [xx.xx.xx.xxx:57753](http://xx.xx.xx.xxx:57753) (no NAT)

\<— Transmitting (NAT) to [xx.xx.xx.xxx:57753](http://xx.xx.xx.xxx:57753) —\>  
SIP/2.0 401 Unauthorized  
Via: SIP/2.0/UDP [xx.xx.xx.xxx:57753](http://xx.xx.xx.xxx:57753);branch=z9hG4bKb63f244a27efe1d3ff6996a361ffac24313631;[received=xx.xx.xx.xxx](http://received=xx.xx.xx.xxx);rport=57753  
From: “nx4” sip:nx4@xxx.xx.xxx.xxx;tag=96168691  
To: “nx4” sip:nx4@xxx.xx.xxx.xxx;tag=as6a01b7cd  
Call-ID: [f1ad591c984e6c1fd7e79d09a9596748@xx.xx.xx.xxx](mailto:f1ad591c984e6c1fd7e79d09a9596748@xx.xx.xx.xxx)  
CSeq: 8575 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="5b605158"  
Content-Length: 0

\<------------\>  
Scheduling destruction of SIP dialog 'f1ad591c984e6c1fd7e79d09a9596748@xx.xx.xx.xxx’ in 32000 ms (Method: REGISTER)  
Really destroying SIP dialog '50d6618f51cfb430c1e047a0f470fd8f@xx.xx.xx.xxx’ Method: REGISTER

\<— SIP read from UDP:xx.xx.xx.xxx:5060 —\>

\<-------------\>

\<— SIP read from UDP:xx.xx.xx.xxx:57753 —\>  
REGISTER sip:xxx.xx.xxx.xxx SIP/2.0  
Call-ID: [10bf44298552e260bc84d1d276c99788@xx.xx.xx.xxx](mailto:10bf44298552e260bc84d1d276c99788@xx.xx.xx.xxx)  
CSeq: 7849 REGISTER  
From: “nx4” sip:nx4@xxx.xx.xxx.xxx;tag=4020576262  
To: “nx4” sip:nx4@xxx.xx.xxx.xxx  
Via: SIP/2.0/UDP [xx.xx.xx.xxx:57753](http://xx.xx.xx.xxx:57753);branch=z9hG4bKd474bf3983b685f00d33eae6216a04c2313631;rport  
Max-Forwards: 70  
User-Agent: SIPAUA/0.1.001  
Contact: “nx4” sip:nx4@xx.xx.xx.xxx:57753;transport=udp  
Expires: 3600  
Content-Length: 0

\<-------------\>  
— (11 headers 0 lines) —  
Sending to [xx.xx.xx.xxx:57753](http://xx.xx.xx.xxx:57753) (no NAT)

\<— Transmitting (NAT) to [xx.xx.xx.xxx:57753](http://xx.xx.xx.xxx:57753) —\>  
SIP/2.0 401 Unauthorized  
Via: SIP/2.0/UDP [xx.xx.xx.xxx:57753](http://xx.xx.xx.xxx:57753);branch=z9hG4bKd474bf3983b685f00d33eae6216a04c2313631;[received=xx.xx.xx.xxx](http://received=xx.xx.xx.xxx);rport=57753  
From: “nx4” sip:nx4@xxx.xx.xxx.xxx;tag=4020576262  
To: “nx4” sip:nx4@xxx.xx.xxx.xxx;tag=as245ea5e6  
Call-ID: [10bf44298552e260bc84d1d276c99788@xx.xx.xx.xxx](mailto:10bf44298552e260bc84d1d276c99788@xx.xx.xx.xxx)  
CSeq: 7849 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="6357a9e2"  
Content-Length: 0

\<------------\>  
Scheduling destruction of SIP dialog '10bf44298552e260bc84d1d276c99788@xx.xx.xx.xxx’ in 32000 ms (Method: REGISTER)

\<— SIP read from UDP:xx.xx.xx.xxx:57753 —\>  
REGISTER sip:xxx.xx.xxx.xxx SIP/2.0  
Call-ID: [10bf44298552e260bc84d1d276c99788@xx.xx.xx.xxx](mailto:10bf44298552e260bc84d1d276c99788@xx.xx.xx.xxx)  
CSeq: 7849 REGISTER  
From: “nx4” sip:nx4@xxx.xx.xxx.xxx;tag=4020576262  
To: “nx4” sip:nx4@xxx.xx.xxx.xxx  
Via: SIP/2.0/UDP [xx.xx.xx.xxx:57753](http://xx.xx.xx.xxx:57753);branch=z9hG4bKd474bf3983b685f00d33eae6216a04c2313631;rport  
Max-Forwards: 70  
User-Agent: SIPAUA/0.1.001  
Contact: “nx4” sip:nx4@xx.xx.xx.xxx:57753;transport=udp  
Expires: 3600  
Content-Length: 0

\<-------------\>  
— (11 headers 0 lines) —  
Sending to [xx.xx.xx.xxx:57753](http://xx.xx.xx.xxx:57753) (NAT)

\<— Transmitting (NAT) to [xx.xx.xx.xxx:57753](http://xx.xx.xx.xxx:57753) —\>  
SIP/2.0 401 Unauthorized  
Via: SIP/2.0/UDP [xx.xx.xx.xxx:57753](http://xx.xx.xx.xxx:57753);branch=z9hG4bKd474bf3983b685f00d33eae6216a04c2313631;[received=xx.xx.xx.xxx](http://received=xx.xx.xx.xxx);rport=57753  
From: “nx4” sip:nx4@xxx.xx.xxx.xxx;tag=4020576262  
To: “nx4” sip:nx4@xxx.xx.xxx.xxx;tag=as245ea5e6  
Call-ID: [10bf44298552e260bc84d1d276c99788@xx.xx.xx.xxx](mailto:10bf44298552e260bc84d1d276c99788@xx.xx.xx.xxx)  
CSeq: 7849 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="6357a9e2"  
Content-Length: 0

---

<div class="post-metadata">

**Author:** ![david55](https://avatars.discourse-cdn.com/v4/letter/d/e19adc/32.png) [@david55](https://community.asterisk.org/u/david55)\
**Post date:** [July 25, 2013, 6:18pm UTC](https://community.asterisk.org/t/sip-configuration-in-asterisk-and-sip-phone/43446/6 "2013-07-25T18:18:36Z")

</div>

As well as the problems that I already mentioned, in relation to the phone, [xx.xx.77.xxx:57120](http://xx.xx.77.xxx:57120) may not be routable from the Asterisk side.

In all cases, the phone is not making an appropriate response to the 401.

---

<div class="post-metadata">

**Author:** ![KBennett](https://sea1.discourse-cdn.com/asterisk/user_avatar/community.asterisk.org/kbennett/32/146_2.png) [@KBennett](https://community.asterisk.org/u/KBennett)\
**Post date:** [July 25, 2013, 6:30pm UTC](https://community.asterisk.org/t/sip-configuration-in-asterisk-and-sip-phone/43446/7 "2013-07-25T18:30:41Z")

</div>

Hi David55,

Thanks again for taking a look. Would a different SIP app on the phone help? I’m currently trying SIPDroid versus the native SIP settings via the phone.

Or, does this mean that the phone won’t work at all?

Can anyone suggest some work-arounds?

Again, thanks for the time and the suggestions! I appreciate it!

---

<div class="post-metadata">

**Author:** ![KBennett](https://sea1.discourse-cdn.com/asterisk/user_avatar/community.asterisk.org/kbennett/32/146_2.png) [@KBennett](https://community.asterisk.org/u/KBennett)\
**Post date:** [July 25, 2013, 10:43pm UTC](https://community.asterisk.org/t/sip-configuration-in-asterisk-and-sip-phone/43446/8 "2013-07-25T22:43:50Z")

</div>

Well…

I changed “secret” to “remotesecret”, reloaded my sip settings and checked my peers. SipDroid only works with [pbxes.org](http://pbxes.org) to tunnel VOIP calls. The Zoiper VoIP app works great!

On to the next step! Wooo-who! 8)

---

<div class="post-metadata">

**Author:** ![david55](https://avatars.discourse-cdn.com/v4/letter/d/e19adc/32.png) [@david55](https://community.asterisk.org/u/david55)\
**Post date:** [July 26, 2013, 7:04am UTC](https://community.asterisk.org/t/sip-configuration-in-asterisk-and-sip-phone/43446/9 "2013-07-26T07:04:36Z")

</div>

Using only remotesecret for a peer that is registering with you effectively disables authentication for that registration!
