SIP testing with Windows Messenger

Hi all,

I encounter a problem when testing SIP using Windows Messenger 5.1.

Linux distribution: Ubuntu 7.04 Kernel 2.6.20-16-generic
Asterisk: Asterisk V1.4.11

I follow the instructions from asterisk knowledge base and asterisk guru.

My sip.conf and extensions.conf

I keep getting the following message when connection to the SIP testing account “You have been signed out of SIP communications Service becuase that service has been temporarily shut down. Please try again later

On the Asterisk CLI with “sip set debug” enabled, i can see that Windows messenger did connect to the server but without success. This is the debug message:

[code]<— SIP read from xxx.xxx.xxx.xxx:3229 —>
REGISTER sip:yyy.yyy.yyy.yyy SIP/2.0
Via: SIP/2.0/UDP 192.168.1.254:16707
Max-Forwards: 70
From: sip:test1@yyy.yyy.yyy.yyy;tag=9ff5bff0135948d2b116adf1740eb97e;epid=21896d2193
To: sip:test1@yyy.yyy.yyy.yyy
Call-ID: c44b1440b49b4d7bbbfbd96124ed6d1f
CSeq: 1 REGISTER
Contact: sip:192.168.1.254:16707;methods="INVITE, MESSAGE, INFO, SUBSCRIBE, OPTIONS, BYE, CANCEL, NOTIFY, ACK, REFER, BENOTIFY"
User-Agent: RTC/1.3.5470 (Messenger 5.1.0706)
Event: registration
Allow-Events: presence
Content-Length: 0

<------------->
— (12 headers 0 lines) —
Using latest REGISTER request as basis request
Sending to 192.168.1.254 : 16707 (no NAT)

<— Transmitting (no NAT) to 192.168.1.254:16707 —>
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 192.168.1.254:16707;received=xxx.xxx.xxx.xxx
From: sip:test1@yyy.yyy.yyy.yyy;tag=9ff5bff0135948d2b116adf1740eb97e;epid=21896d2193
To: sip:test1@yyy.yyy.yyy.yyy
Call-ID: c44b1440b49b4d7bbbfbd96124ed6d1f
CSeq: 1 REGISTER
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces
Contact: sip:test1@yyy.yyy.yyy.yyy
Content-Length: 0

<------------>

<— Transmitting (no NAT) to 192.168.1.254:16707 —>
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.1.254:16707;received=xxx.xxx.xxx.xxx
From: sip:test1@yyy.yyy.yyy.yyy;tag=9ff5bff0135948d2b116adf1740eb97e;epid=21896d2193
To: sip:test1@yyy.yyy.yyy.yyy;tag=as153cb6ff
Call-ID: c44b1440b49b4d7bbbfbd96124ed6d1f
CSeq: 1 REGISTER
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces
Expires: 120
Contact: sip:192.168.1.254:16707;expires=120
Date: Fri, 23 May 2008 02:50:45 GMT
Content-Length: 0

<------------>
Scheduling destruction of SIP dialog ‘c44b1440b49b4d7bbbfbd96124ed6d1f’ in 32000 ms (Method: REGISTER)

<— SIP read from xxx.xxx.xxx.xxx:3229 —>
REGISTER sip:yyy.yyy.yyy.yyy SIP/2.0
Via: SIP/2.0/UDP 192.168.1.254:16707
Max-Forwards: 70
From: sip:test1@yyy.yyy.yyy.yyy;tag=9ff5bff0135948d2b116adf1740eb97e;epid=21896d2193
To: sip:test1@yyy.yyy.yyy.yyy
Call-ID: c44b1440b49b4d7bbbfbd96124ed6d1f
CSeq: 1 REGISTER
Contact: sip:192.168.1.254:16707;methods="INVITE, MESSAGE, INFO, SUBSCRIBE, OPTIONS, BYE, CANCEL, NOTIFY, ACK, REFER, BENOTIFY"
User-Agent: RTC/1.3.5470 (Messenger 5.1.0706)
Event: registration
Allow-Events: presence
Content-Length: 0

<------------->
— (12 headers 0 lines) —
Using latest REGISTER request as basis request
Sending to 192.168.1.254 : 16707 (no NAT)

<— Transmitting (no NAT) to 192.168.1.254:16707 —>
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 192.168.1.254:16707;received=xxx.xxx.xxx.xxx
From: sip:test1@yyy.yyy.yyy.yyy;tag=9ff5bff0135948d2b116adf1740eb97e;epid=21896d2193
To: sip:test1@yyy.yyy.yyy.yyy
Call-ID: c44b1440b49b4d7bbbfbd96124ed6d1f
CSeq: 1 REGISTER
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces
Contact: sip:test1@yyy.yyy.yyy.yyy
Content-Length: 0

<------------>

<— Transmitting (no NAT) to 192.168.1.254:16707 —>
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.1.254:16707;received=xxx.xxx.xxx.xxx
From: sip:test1@yyy.yyy.yyy.yyy;tag=9ff5bff0135948d2b116adf1740eb97e;epid=21896d2193
To: sip:test1@yyy.yyy.yyy.yyy;tag=as153cb6ff
Call-ID: c44b1440b49b4d7bbbfbd96124ed6d1f
CSeq: 1 REGISTER
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces
Expires: 120
Contact: sip:192.168.1.254:16707;expires=120
Date: Fri, 23 May 2008 02:50:49 GMT
Content-Length: 0

<------------>
Scheduling destruction of SIP dialog ‘c44b1440b49b4d7bbbfbd96124ed6d1f’ in 32000 ms (Method: REGISTER)

<— SIP read from xxx.xxx.xxx.xxx:3229 —>
REGISTER sip:yyy.yyy.yyy.yyy SIP/2.0
Via: SIP/2.0/UDP 192.168.1.254:16707
Max-Forwards: 70
From: sip:test1@yyy.yyy.yyy.yyy;tag=9ff5bff0135948d2b116adf1740eb97e;epid=21896d2193
To: sip:test1@yyy.yyy.yyy.yyy
Call-ID: c44b1440b49b4d7bbbfbd96124ed6d1f
CSeq: 1 REGISTER
Contact: sip:192.168.1.254:16707;methods="INVITE, MESSAGE, INFO, SUBSCRIBE, OPTIONS, BYE, CANCEL, NOTIFY, ACK, REFER, BENOTIFY"
User-Agent: RTC/1.3.5470 (Messenger 5.1.0706)
Event: registration
Allow-Events: presence
Content-Length: 0

<------------->
— (12 headers 0 lines) —
Using latest REGISTER request as basis request
Sending to 192.168.1.254 : 16707 (no NAT)

<— Transmitting (no NAT) to 192.168.1.254:16707 —>
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 192.168.1.254:16707;received=xxx.xxx.xxx.xxx
From: sip:test1@yyy.yyy.yyy.yyy;tag=9ff5bff0135948d2b116adf1740eb97e;epid=21896d2193
To: sip:test1@yyy.yyy.yyy.yyy
Call-ID: c44b1440b49b4d7bbbfbd96124ed6d1f
CSeq: 1 REGISTER
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces
Contact: sip:test1@yyy.yyy.yyy.yyy
Content-Length: 0

<------------>

<— Transmitting (no NAT) to 192.168.1.254:16707 —>
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.1.254:16707;received=xxx.xxx.xxx.xxx
From: sip:test1@yyy.yyy.yyy.yyy;tag=9ff5bff0135948d2b116adf1740eb97e;epid=21896d2193
To: sip:test1@yyy.yyy.yyy.yyy;tag=as153cb6ff
Call-ID: c44b1440b49b4d7bbbfbd96124ed6d1f
CSeq: 1 REGISTER
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces
Expires: 120
Contact: sip:192.168.1.254:16707;expires=120
Date: Fri, 23 May 2008 02:50:53 GMT
Content-Length: 0

<------------>
Scheduling destruction of SIP dialog ‘c44b1440b49b4d7bbbfbd96124ed6d1f’ in 32000 ms (Method: REGISTER)

<— SIP read from xxx.xxx.xxx.xxx:3229 —>
REGISTER sip:yyy.yyy.yyy.yyy SIP/2.0
Via: SIP/2.0/UDP 192.168.1.254:16707
Max-Forwards: 70
From: sip:test1@yyy.yyy.yyy.yyy;tag=9ff5bff0135948d2b116adf1740eb97e;epid=21896d2193
To: sip:test1@yyy.yyy.yyy.yyy
Call-ID: c44b1440b49b4d7bbbfbd96124ed6d1f
CSeq: 1 REGISTER
Contact: sip:192.168.1.254:16707;methods="INVITE, MESSAGE, INFO, SUBSCRIBE, OPTIONS, BYE, CANCEL, NOTIFY, ACK, REFER, BENOTIFY"
User-Agent: RTC/1.3.5470 (Messenger 5.1.0706)
Event: registration
Allow-Events: presence
Content-Length: 0

<------------->
— (12 headers 0 lines) —
Using latest REGISTER request as basis request
Sending to 192.168.1.254 : 16707 (no NAT)

<— Transmitting (no NAT) to 192.168.1.254:16707 —>
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 192.168.1.254:16707;received=xxx.xxx.xxx.xxx
From: sip:test1@yyy.yyy.yyy.yyy;tag=9ff5bff0135948d2b116adf1740eb97e;epid=21896d2193
To: sip:test1@yyy.yyy.yyy.yyy
Call-ID: c44b1440b49b4d7bbbfbd96124ed6d1f
CSeq: 1 REGISTER
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces
Contact: sip:test1@yyy.yyy.yyy.yyy
Content-Length: 0

<------------>

<— Transmitting (no NAT) to 192.168.1.254:16707 —>
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.1.254:16707;received=xxx.xxx.xxx.xxx
From: sip:test1@yyy.yyy.yyy.yyy;tag=9ff5bff0135948d2b116adf1740eb97e;epid=21896d2193
To: sip:test1@yyy.yyy.yyy.yyy;tag=as153cb6ff
Call-ID: c44b1440b49b4d7bbbfbd96124ed6d1f
CSeq: 1 REGISTER
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces
Expires: 120
Contact: sip:192.168.1.254:16707;expires=120
Date: Fri, 23 May 2008 02:50:57 GMT
Content-Length: 0

<------------>
Scheduling destruction of SIP dialog ‘c44b1440b49b4d7bbbfbd96124ed6d1f’ in 32000 ms (Method: REGISTER)

<— SIP read from xxx.xxx.xxx.xxx:3229 —>
REGISTER sip:yyy.yyy.yyy.yyy SIP/2.0
Via: SIP/2.0/UDP 192.168.1.254:16707
Max-Forwards: 70
From: sip:test1@yyy.yyy.yyy.yyy;tag=9ff5bff0135948d2b116adf1740eb97e;epid=21896d2193
To: sip:test1@yyy.yyy.yyy.yyy
Call-ID: c44b1440b49b4d7bbbfbd96124ed6d1f
CSeq: 1 REGISTER
Contact: sip:192.168.1.254:16707;methods="INVITE, MESSAGE, INFO, SUBSCRIBE, OPTIONS, BYE, CANCEL, NOTIFY, ACK, REFER, BENOTIFY"
User-Agent: RTC/1.3.5470 (Messenger 5.1.0706)
Event: registration
Allow-Events: presence
Content-Length: 0

<------------->
— (12 headers 0 lines) —
Using latest REGISTER request as basis request
Sending to 192.168.1.254 : 16707 (no NAT)

<— Transmitting (no NAT) to 192.168.1.254:16707 —>
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 192.168.1.254:16707;received=xxx.xxx.xxx.xxx
From: sip:test1@yyy.yyy.yyy.yyy;tag=9ff5bff0135948d2b116adf1740eb97e;epid=21896d2193
To: sip:test1@yyy.yyy.yyy.yyy
Call-ID: c44b1440b49b4d7bbbfbd96124ed6d1f
CSeq: 1 REGISTER
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces
Contact: sip:test1@yyy.yyy.yyy.yyy
Content-Length: 0

<------------>

<— Transmitting (no NAT) to 192.168.1.254:16707 —>
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.1.254:16707;received=xxx.xxx.xxx.xxx
From: sip:test1@yyy.yyy.yyy.yyy;tag=9ff5bff0135948d2b116adf1740eb97e;epid=21896d2193
To: sip:test1@yyy.yyy.yyy.yyy;tag=as153cb6ff
Call-ID: c44b1440b49b4d7bbbfbd96124ed6d1f
CSeq: 1 REGISTER
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces
Expires: 120
Contact: sip:192.168.1.254:16707;expires=120
Date: Fri, 23 May 2008 02:51:01 GMT
Content-Length: 0

<------------>
Scheduling destruction of SIP dialog ‘c44b1440b49b4d7bbbfbd96124ed6d1f’ in 32000 ms (Method: REGISTER)
Really destroying SIP dialog ‘c44b1440b49b4d7bbbfbd96124ed6d1f’ Method: REGISTER

[/code]

Thanks for help.

Update Asterisk to 1.4.20.1.

extensions.conf
sip.conf

This time i removed the default sip.conf and create myself. The updated sip.conf contains the username and secret which the previous sip.conf does not contain.

I saw the following debug message:

[code]<------------->
— (12 headers 0 lines) —
Using latest REGISTER request as basis request
Sending to 192.168.1.254 : 16187 (no NAT)
<— Transmitting (no NAT) to 192.168.1.254:16187 —>
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 192.168.1.254:16187;received=xxx.xxx.xxx.xxx
From: sip:101@yyy.yyy.yyy.yyy;tag=87d33c8a1ee54c0a97b5bea7ff060686;epid=acd62a549a
To: sip:101@yyy.yyy.yyy.yyy
Call-ID: eed45a4b04d846a39157459c14bc94a5
CSeq: 1 REGISTER
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces
Contact: sip:101@yyy.yyy.yyy.yyy
Content-Length: 0

<------------>
<— Transmitting (no NAT) to 192.168.1.254:16187 —>
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.1.254:16187;received=xxx.xxx.xxx.xxx
From: sip:101@yyy.yyy.yyy.yyy;tag=87d33c8a1ee54c0a97b5bea7ff060686;epid=acd62a549a
To: sip:101@yyy.yyy.yyy.yyy;tag=as4907709c
Call-ID: eed45a4b04d846a39157459c14bc94a5
CSeq: 1 REGISTER
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces
WWW-Authenticate: Digest algorithm=MD5, realm=“asterisk”, nonce="12278a83"
Content-Length: 0

<------------>
Scheduling destruction of SIP dialog ‘eed45a4b04d846a39157459c14bc94a5’ in 32000 ms (Method: REGISTER)
[/code]

I don’t understand why there is unauthorized header there.

By the way, before I updated my asterisk to the latest version, the same problem happened whenever I have username and secret in my sip.conf.

Thanks

Edited 29 May 2008

Hi all,

I can finally use windows messenger v5.1 to test my SIP account!!

However the weird thing is that the windows messenger only works on my home’s pc but when I tried on my office’s pc, it does not work at all. I even tried ask my frens to install windows messenger v5.1, they cannot login to the SIP account as well.

The thing is when my frens tried to login and I viewed the debug log at the same time, the error message is different from what I got if I login from my office’s pc. The error message they got: “Username/auth name mismatch” or “username mismatch”. The error message got when I tried to login from my office’s pc as what I’d posted previously.

I’d tried to ask them to disable the firewall but no use (in fact I didn’t close the firewall when running windows messenger 5.1 on my home’s pc).

Hi all,

The problem has been solved!

This is due to the router’s NAT on my office’s connection.

After appending “nat=yes” (without the quotes) to sip.conf, I can login my SIP account. :laughing:

Cheers!!