So our asterisk is on an Azure server and we can register the sip phone, but don’t hear audio when making calls. We opened ports 15000-19000 on the firewall and changed rtp.conf to start at 15000 and end at 19000. Here is the output I get when calling an extension that is supposed to just hangup immediately. I changed the IP of the computer with the soft phone on it to XXX.XXX.XXX.XXX and the IP of the asterisk server to YY.YY.YYY.YY
<--- SIP read from UDP:XXX.XXX.XXX.XXX:32731 --->
INVITE sip:106@YY.YY.YYY.YY:5060 SIP/2.0
Via: SIP/2.0/UDP 165.0.2.248:52724;branch=z9hG4bK-524287-1---ebef1a0e07d98036;rport
Max-Forwards: 70
Contact: <sip:test@XXX.XXX.XXX.XXX:32731;rinstance=23120e854527371f>
To: <sip:106@YY.YY.YYY.YY:5060>
From: "Adam"<sip:test@YY.YY.YYY.YY:5060>;tag=ffe7ae03
Call-ID: 84253MGFjOGY5ZjRkMWQ3MmZkNmRiNGYxYTUzZjZiYmZkMmM
CSeq: 1 INVITE
Allow: SUBSCRIBE, NOTIFY, INVITE, ACK, CANCEL, BYE, REFER, INFO, OPTIONS, MESSAGE
Content-Type: application/sdp
Supported: replaces
User-Agent: X-Lite release 4.9.8 stamp 84253
Content-Length: 332
v=0
o=- 13141937637581563 1 IN IP4 165.0.2.248
s=X-Lite release 4.9.8 stamp 84253
c=IN IP4 165.0.2.248
t=0 0
m=audio 16778 RTP/AVP 9 8 120 0 84 101
a=rtpmap:120 opus/48000/2
a=fmtp:120 useinbandfec=1; usedtx=1; maxaveragebitrate=64000
a=rtpmap:84 speex/16000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=sendrecv
<------------->
--- (13 headers 12 lines) ---
Sending to XXX.XXX.XXX.XXX:32731 (NAT)
Sending to XXX.XXX.XXX.XXX:32731 (NAT)
Using INVITE request as basis request - 84253MGFjOGY5ZjRkMWQ3MmZkNmRiNGYxYTUzZjZiYmZkMmM
Found peer 'test' for 'test' from XXX.XXX.XXX.XXX:32731
<--- Reliably Transmitting (NAT) to XXX.XXX.XXX.XXX:32731 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 165.0.2.248:52724;branch=z9hG4bK-524287-1---ebef1a0e07d98036;received=XXX.XXX.XXX.XXX;rport=32731
From: "Adam"<sip:test@YY.YY.YYY.YY:5060>;tag=ffe7ae03
To: <sip:106@YY.YY.YYY.YY:5060>;tag=as4d064252
Call-ID: 84253MGFjOGY5ZjRkMWQ3MmZkNmRiNGYxYTUzZjZiYmZkMmM
CSeq: 1 INVITE
Server: Asterisk PBX 14.5.0
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
WWW-Authenticate: Digest algorithm=MD5, realm="asterisk", nonce="1852df8b"
Content-Length: 0
<------------>
Scheduling destruction of SIP dialog '84253MGFjOGY5ZjRkMWQ3MmZkNmRiNGYxYTUzZjZiYmZkMmM' in 6400 ms (Method: INVITE)
<--- SIP read from UDP:XXX.XXX.XXX.XXX:32731 --->
ACK sip:106@YY.YY.YYY.YY:5060 SIP/2.0
Via: SIP/2.0/UDP 165.0.2.248:52724;branch=z9hG4bK-524287-1---ebef1a0e07d98036;rport
Max-Forwards: 70
To: <sip:106@YY.YY.YYY.YY:5060>;tag=as4d064252
From: "Adam"<sip:test@YY.YY.YYY.YY:5060>;tag=ffe7ae03
Call-ID: 84253MGFjOGY5ZjRkMWQ3MmZkNmRiNGYxYTUzZjZiYmZkMmM
CSeq: 1 ACK
Content-Length: 0
<------------->
--- (8 headers 0 lines) ---
<--- SIP read from UDP:XXX.XXX.XXX.XXX:32731 --->
INVITE sip:106@YY.YY.YYY.YY:5060 SIP/2.0
Via: SIP/2.0/UDP 165.0.2.248:52724;branch=z9hG4bK-524287-1---e18d08450544c360;rport
Max-Forwards: 70
Contact: <sip:test@XXX.XXX.XXX.XXX:32731;rinstance=23120e854527371f>
To: <sip:106@YY.YY.YYY.YY:5060>
From: "Adam"<sip:test@YY.YY.YYY.YY:5060>;tag=ffe7ae03
Call-ID: 84253MGFjOGY5ZjRkMWQ3MmZkNmRiNGYxYTUzZjZiYmZkMmM
CSeq: 2 INVITE
Allow: SUBSCRIBE, NOTIFY, INVITE, ACK, CANCEL, BYE, REFER, INFO, OPTIONS, MESSAGE
Content-Type: application/sdp
Supported: replaces
User-Agent: X-Lite release 4.9.8 stamp 84253
Authorization: Digest username="test",realm="asterisk",nonce="1852df8b",uri="sip:106@YY.YY.YYY.YY:5060",response="bcdb67c30a63c2534d79148488b97d11",algorithm=MD5
Content-Length: 332
v=0
o=- 13141937637581563 1 IN IP4 165.0.2.248
s=X-Lite release 4.9.8 stamp 84253
c=IN IP4 165.0.2.248
t=0 0
m=audio 16778 RTP/AVP 9 8 120 0 84 101
a=rtpmap:120 opus/48000/2
a=fmtp:120 useinbandfec=1; usedtx=1; maxaveragebitrate=64000
a=rtpmap:84 speex/16000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=sendrecv
<------------->
--- (14 headers 12 lines) ---
Sending to XXX.XXX.XXX.XXX:32731 (NAT)
Using INVITE request as basis request - 84253MGFjOGY5ZjRkMWQ3MmZkNmRiNGYxYTUzZjZiYmZkMmM
Found peer 'test' for 'test' from XXX.XXX.XXX.XXX:32731
== Using SIP RTP CoS mark 5
Found RTP audio format 9
Found RTP audio format 8
Found RTP audio format 120
Found RTP audio format 0
Found RTP audio format 84
Found RTP audio format 101
Found audio description format opus for ID 120
Found audio description format speex for ID 84
Found audio description format telephone-event for ID 101
Capabilities: us - (ulaw), peer - audio=(ulaw|alaw|g722|speex16|opus)/video=(nothing)/text=(nothing), combined - (ulaw)
Non-codec capabilities (dtmf): us - 0x1 (telephone-event|), peer - 0x1 (telephone-event|), combined - 0x1 (telephone-event|)
Peer audio RTP is at port 165.0.2.248:16778
Looking for 106 in from-internal (domain YY.YY.YYY.YY)
sip_route_dump: route/path hop: <sip:test@XXX.XXX.XXX.XXX:32731;rinstance=23120e854527371f>
<--- Transmitting (NAT) to XXX.XXX.XXX.XXX:32731 --->
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 165.0.2.248:52724;branch=z9hG4bK-524287-1---e18d08450544c360;received=XXX.XXX.XXX.XXX;rport=32731
From: "Adam"<sip:test@YY.YY.YYY.YY:5060>;tag=ffe7ae03
To: <sip:106@YY.YY.YYY.YY:5060>
Call-ID: 84253MGFjOGY5ZjRkMWQ3MmZkNmRiNGYxYTUzZjZiYmZkMmM
CSeq: 2 INVITE
Server: Asterisk PBX 14.5.0
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Contact: <sip:106@YY.YY.YYY.YY:5060>
Content-Length: 0
<------------>
-- Executing [106@from-internal:1] Hangup("SIP/test-00000006", "") in new stack
== Spawn extension (from-internal, 106, 1) exited non-zero on 'SIP/test-00000006'
Scheduling destruction of SIP dialog '84253MGFjOGY5ZjRkMWQ3MmZkNmRiNGYxYTUzZjZiYmZkMmM' in 6400 ms (Method: INVITE)
<--- Reliably Transmitting (NAT) to XXX.XXX.XXX.XXX:32731 --->
SIP/2.0 603 Declined
Via: SIP/2.0/UDP 165.0.2.248:52724;branch=z9hG4bK-524287-1---e18d08450544c360;received=XXX.XXX.XXX.XXX;rport=32731
From: "Adam"<sip:test@YY.YY.YYY.YY:5060>;tag=ffe7ae03
To: <sip:106@YY.YY.YYY.YY:5060>;tag=as121b0602
Call-ID: 84253MGFjOGY5ZjRkMWQ3MmZkNmRiNGYxYTUzZjZiYmZkMmM
CSeq: 2 INVITE
Server: Asterisk PBX 14.5.0
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Length: 0
<------------>
Retransmitting #1 (NAT) to XXX.XXX.XXX.XXX:32731:
SIP/2.0 603 Declined
Via: SIP/2.0/UDP 165.0.2.248:52724;branch=z9hG4bK-524287-1---e18d08450544c360;received=XXX.XXX.XXX.XXX;rport=32731
From: "Adam"<sip:test@YY.YY.YYY.YY:5060>;tag=ffe7ae03
To: <sip:106@YY.YY.YYY.YY:5060>;tag=as121b0602
Call-ID: 84253MGFjOGY5ZjRkMWQ3MmZkNmRiNGYxYTUzZjZiYmZkMmM
CSeq: 2 INVITE
Server: Asterisk PBX 14.5.0
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Length: 0
---
<--- SIP read from UDP:XXX.XXX.XXX.XXX:32731 --->
ACK sip:106@YY.YY.YYY.YY:5060 SIP/2.0
Via: SIP/2.0/UDP 165.0.2.248:52724;branch=z9hG4bK-524287-1---e18d08450544c360;rport
Max-Forwards: 70
To: <sip:106@YY.YY.YYY.YY:5060>;tag=as121b0602
From: "Adam"<sip:test@YY.YY.YYY.YY:5060>;tag=ffe7ae03
Call-ID: 84253MGFjOGY5ZjRkMWQ3MmZkNmRiNGYxYTUzZjZiYmZkMmM
CSeq: 2 ACK
Content-Length: 0
<------------->
--- (8 headers 0 lines) ---
<--- SIP read from UDP:XXX.XXX.XXX.XXX:32731 --->
ACK sip:106@YY.YY.YYY.YY:5060 SIP/2.0
Via: SIP/2.0/UDP 165.0.2.248:52724;branch=z9hG4bK-524287-1---e18d08450544c360;rport
Max-Forwards: 70
To: <sip:106@YY.YY.YYY.YY:5060>;tag=as121b0602
From: "Adam"<sip:test@YY.YY.YYY.YY:5060>;tag=ffe7ae03
Call-ID: 84253MGFjOGY5ZjRkMWQ3MmZkNmRiNGYxYTUzZjZiYmZkMmM
CSeq: 2 ACK
Content-Length: 0
<------------->
--- (8 headers 0 lines) ---
I’m wondering why these ports in the 30000 range are being used when I set rtp.conf to be 15000-19000? The only ports open on the system are those and 5060. I’m probably doing something wrong, I just don’t know what. Any help is appreciated.
Edit: I forgot to include our sip.conf. Here it is:
[general]
context=nowhere
allowguest=no
alwaysauthreject=yes
transport=udp
bindport=5060
bindaddr=0.0.0.0
externip=YY.YY.YYY.YY
localnet=10.0.0.8/255.255.255.0
;qualify=yes
nat=force_rport
[friends_internal](!)
type=friend
host=dynamic
context=from-internal
disallow=all
allow=ulaw
[test](friends_internal)
secret=password ; put a strong, unique password here instead