Asterisk not connecting with zoiper

Hi i am not able to connect asterisk with zioper. Following are the logs.

<--- SIP read from UDP:203.128.18.19:40431 --->
REGISTER sip:3.13.25.206;transport=UDP SIP/2.0
Via: SIP/2.0/UDP 203.128.18.19:40431;branch=z9hG4bK-524287-1---ac27360bc4bc6c98;rport
Max-Forwards: 70
Contact: <sip:21003@203.128.18.19:40431;rinstance=3af9f3b977c17599;transport=UDP>
To: <sip:21003@3.13.25.206;transport=UDP>
From: <sip:21003@3.13.25.206;transport=UDP>;tag=97072f43
Call-ID: cwpVt14lzkT_jS4Ew3V-Aw..
CSeq: 1 REGISTER
Expires: 70
Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO, SUBSCRIBE
Supported: replaces, norefersub, extended-refer, timer, outbound, path, X-cisco-serviceuri
User-Agent: Z 5.3.7 rv2.9.30-mod
Allow-Events: presence, kpml, talk
Content-Length: 0

<------------->
--- (14 headers 0 lines) ---
Sending to 203.128.18.19:40431 (NAT)
Sending to 203.128.18.19:40431 (NAT)

<--- Transmitting (NAT) to 203.128.18.19:40431 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 203.128.18.19:40431;branch=z9hG4bK-524287-1---ac27360bc4bc6c98;received=203.128.18.19;rport=40431
From: <sip:21003@3.13.25.206;transport=UDP>;tag=97072f43
To: <sip:21003@3.13.25.206;transport=UDP>;tag=as786d6e6b
Call-ID: cwpVt14lzkT_jS4Ew3V-Aw..
CSeq: 1 REGISTER
Server: Asterisk PBX 16.8.0
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
WWW-Authenticate: Digest algorithm=MD5, realm="asterisk", nonce="1b96194c"
Content-Length: 0


<------------>
Scheduling destruction of SIP dialog 'cwpVt14lzkT_jS4Ew3V-Aw..' in 32000 ms (Method: REGISTER)

<--- SIP read from UDP:203.128.18.19:40431 --->
REGISTER sip:3.13.25.206;transport=UDP SIP/2.0
Via: SIP/2.0/UDP 203.128.18.19:40431;branch=z9hG4bK-524287-1---ac27360bc4bc6c98;rport
Max-Forwards: 70
Contact: <sip:21003@203.128.18.19:40431;rinstance=3af9f3b977c17599;transport=UDP>
To: <sip:21003@3.13.25.206;transport=UDP>
From: <sip:21003@3.13.25.206;transport=UDP>;tag=97072f43
Call-ID: cwpVt14lzkT_jS4Ew3V-Aw..
CSeq: 1 REGISTER
Expires: 70
Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO, SUBSCRIBE
Supported: replaces, norefersub, extended-refer, timer, outbound, path, X-cisco-serviceuri
User-Agent: Z 5.3.7 rv2.9.30-mod
Allow-Events: presence, kpml, talk
Content-Length: 0

<------------->
--- (14 headers 0 lines) ---
Sending to 203.128.18.19:40431 (NAT)

<--- Transmitting (NAT) to 203.128.18.19:40431 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 203.128.18.19:40431;branch=z9hG4bK-524287-1---ac27360bc4bc6c98;received=203.128.18.19;rport=40431
From: <sip:21003@3.13.25.206;transport=UDP>;tag=97072f43
To: <sip:21003@3.13.25.206;transport=UDP>;tag=as786d6e6b
Call-ID: cwpVt14lzkT_jS4Ew3V-Aw..
CSeq: 1 REGISTER
Server: Asterisk PBX 16.8.0
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
WWW-Authenticate: Digest algorithm=MD5, realm="asterisk", nonce="1b96194c"
Content-Length: 0


<------------>
Scheduling destruction of SIP dialog 'cwpVt14lzkT_jS4Ew3V-Aw..' in 32000 ms (Method: REGISTER)

<--- SIP read from UDP:203.128.18.19:40431 --->
REGISTER sip:3.13.25.206;transport=UDP SIP/2.0
Via: SIP/2.0/UDP 203.128.18.19:40431;branch=z9hG4bK-524287-1---ac27360bc4bc6c98;rport
Max-Forwards: 70
Contact: <sip:21003@203.128.18.19:40431;rinstance=3af9f3b977c17599;transport=UDP>
To: <sip:21003@3.13.25.206;transport=UDP>
From: <sip:21003@3.13.25.206;transport=UDP>;tag=97072f43
Call-ID: cwpVt14lzkT_jS4Ew3V-Aw..
CSeq: 1 REGISTER
Expires: 70
Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO, SUBSCRIBE
Supported: replaces, norefersub, extended-refer, timer, outbound, path, X-cisco-serviceuri
User-Agent: Z 5.3.7 rv2.9.30-mod
Allow-Events: presence, kpml, talk
Content-Length: 0

<------------->
--- (14 headers 0 lines) ---
Sending to 203.128.18.19:40431 (NAT)

<--- Transmitting (NAT) to 203.128.18.19:40431 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 203.128.18.19:40431;branch=z9hG4bK-524287-1---ac27360bc4bc6c98;received=203.128.18.19;rport=40431
From: <sip:21003@3.13.25.206;transport=UDP>;tag=97072f43
To: <sip:21003@3.13.25.206;transport=UDP>;tag=as786d6e6b
Call-ID: cwpVt14lzkT_jS4Ew3V-Aw..
CSeq: 1 REGISTER
Server: Asterisk PBX 16.8.0
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
WWW-Authenticate: Digest algorithm=MD5, realm="asterisk", nonce="1b96194c"
Content-Length: 0


<------------>
Scheduling destruction of SIP dialog 'cwpVt14lzkT_jS4Ew3V-Aw..' in 32000 ms (Method: REGISTER)
Really destroying SIP dialog 'OO7g6VsMgNGsc-unUHm6mg..' Method: REGISTER

<--- SIP read from UDP:203.128.18.19:40431 --->
REGISTER sip:3.13.25.206;transport=UDP SIP/2.0
Via: SIP/2.0/UDP 203.128.18.19:40431;branch=z9hG4bK-524287-1---ac27360bc4bc6c98;rport
Max-Forwards: 70
Contact: <sip:21003@203.128.18.19:40431;rinstance=3af9f3b977c17599;transport=UDP>
To: <sip:21003@3.13.25.206;transport=UDP>
From: <sip:21003@3.13.25.206;transport=UDP>;tag=97072f43
Call-ID: cwpVt14lzkT_jS4Ew3V-Aw..
CSeq: 1 REGISTER
Expires: 70
Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO, SUBSCRIBE
Supported: replaces, norefersub, extended-refer, timer, outbound, path, X-cisco-serviceuri
User-Agent: Z 5.3.7 rv2.9.30-mod
Allow-Events: presence, kpml, talk
Content-Length: 0

<------------->
--- (14 headers 0 lines) ---
Sending to 203.128.18.19:40431 (NAT)

<--- Transmitting (NAT) to 203.128.18.19:40431 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 203.128.18.19:40431;branch=z9hG4bK-524287-1---ac27360bc4bc6c98;received=203.128.18.19;rport=40431
From: <sip:21003@3.13.25.206;transport=UDP>;tag=97072f43
To: <sip:21003@3.13.25.206;transport=UDP>;tag=as786d6e6b
Call-ID: cwpVt14lzkT_jS4Ew3V-Aw..
CSeq: 1 REGISTER
Server: Asterisk PBX 16.8.0
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
WWW-Authenticate: Digest algorithm=MD5, realm="asterisk", nonce="1b96194c"
Content-Length: 0


<------------>
Scheduling destruction of SIP dialog 'cwpVt14lzkT_jS4Ew3V-Aw..' in 32000 ms (Method: REGISTER)

The endpoint is either not receiving or is ignoring the response from Asterisk.

Hi jcolp,
What endpoint are you talking about? My asterisk server is on aws.
Are you talking about my local internet?

It would be Zoiper. Asterisk is sending a response to the call attempt, but Zoiper is not receiving it. It keeps sending the same call attempt over and over.

I get this error in asterisk logs

ERROR[6001]: chan_sip.c:17944 register_verify: 'TCP' is not a valid transport for '21003'. we only use 'UDP,WS'! ending call.
[Mar 13 14:21:05] NOTICE[6001]: chan_sip.c:28959 handle_request_register: Registration from '<sip:21003@3.13.25.206;transport=TCP>' failed for '203.128.18.19:48373' - Device not configured to use this transport type

You seem to have switched it to using TCP in Zoiper, without allowing it in Asterisk. “tcp” has to be added as a transport in the SIP peer/friend/user.

I didn’t do anything in zoiper. This came after some tries.

It, or something else, tried over TCP.

No. Every time i hit using register now using zoiper, the above error comes

Then you’ll need to enable tcp as an allowed transport on it.

1 Like

Does it have any disadvantage? We were testing with udp before. I don’t know why it isn’t detecting udp now.

No, but if UDP packets were not getting through previously I would be concerned that media would not flow since RTP uses UDP.

That mean issue is with zoiper not connecting over udp.

When it was communicating using UDP the packets that Asterisk sent were seemingly never received by it. It’s trying TCP now, but I would be worried that when Asterisk tries to send media which also uses UDP it would not reach Zoiper.

Yeah,that’s a big problem.