No audio and no rtp traffic

Hi all, I’m new in voip and asterisk and i really need your help.
I have installed magnusbilling on asterisk 11 and sometime no one of both end hear something, sometime I issued one way audio and sometimes I’m able to talk normally. In this third case i can see the output in “rtp set debug on”, otherwise no. What can be the problem? What do you need for troubleshooting?

Please help

NAT and firewalls. Look at the SDP exchange and make sure all the addresses are correct and all the ports will get through the firewall.

thank you david for your reply.
you mean this?

<— SIP read from UDP:192.168.1.181:39528 —>
INVITE sip:393272421889@192.168.100.221:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.181:39528;branch=z9hG4bK-d87543-793fbd589a1daa4d-1–d 87543-;rport
Max-Forwards: 70
Contact: sip:VOIPTEST@192.168.1.181:39528
To: "393272421889"sip:393272421889@192.168.100.221:5060
From: "VOIPTEST"sip:VOIPTEST@192.168.100.221:5060;tag=8d2c617e
Call-ID: MDIyNzY4MWVmMGYzZTU5MmRiMDA2OTZlOTJiMTFhMzc.
CSeq: 1 INVITE
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INF O
Content-Type: application/sdp
User-Agent: X-Lite release 1011s stamp 41150
Content-Length: 473

v=0
o=- 2 2 IN IP4 192.168.1.181
s=CounterPath X-Lite 3.0
c=IN IP4 192.168.1.181
t=0 0
m=audio 44448 RTP/AVP 107 119 100 106 0 105 98 8 101
a=alt:1 2 : eQpofyBA 4H3455IQ 172.31.80.21 44448
a=alt:2 1 : y5nHv7II FaPO0ir2 192.168.1.181 44448
a=fmtp:101 0-15
a=rtpmap:107 BV32/16000
a=rtpmap:119 BV32-FEC/16000
a=rtpmap:100 SPEEX/16000
a=rtpmap:106 SPEEX-FEC/16000
a=rtpmap:105 SPEEX-FEC/8000
a=rtpmap:98 iLBC/8000
a=rtpmap:101 telephone-event/8000
a=sendrecv
<------------->
— (12 headers 17 lines) —
Sending to 192.168.1.181:39528 (no NAT)
Sending to 192.168.1.181:39528 (no NAT)
Using INVITE request as basis request - MDIyNzY4MWVmMGYzZTU5MmRiMDA2OTZlOTJiMTFh Mzc.
Found peer ‘VOIPTEST’ for ‘VOIPTEST’ from 192.168.1.181:39528
== Using SIP RTP CoS mark 5
Found RTP audio format 107
Found RTP audio format 119
Found RTP audio format 100
Found RTP audio format 106
Found RTP audio format 0
Found RTP audio format 105
Found RTP audio format 98
Found RTP audio format 8
Found RTP audio format 101
Found unknown media description format BV32 for ID 107
Found unknown media description format BV32-FEC for ID 119
Found audio description format SPEEX for ID 100
Found unknown media description format SPEEX-FEC for ID 106
Found unknown media description format SPEEX-FEC for ID 105
Found audio description format iLBC for ID 98
Found audio description format telephone-event for ID 101
Capabilities: us - (gsm|ulaw|alaw), peer - audio=(ulaw|alaw|speex16|ilbc)/video= (nothing)/text=(nothing), combined - (ulaw|alaw)
Non-codec capabilities (dtmf): us - 0x1 (telephone-event|), peer - 0x1 (telephon e-event|), combined - 0x1 (telephone-event|)
Peer audio RTP is at port 192.168.1.181:44448
Looking for 393272421889 in billing (domain 192.168.100.221)
list_route: hop: sip:VOIPTEST@192.168.1.181:39528

<— Transmitting (NAT) to 192.168.1.181:39528 —>
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 192.168.1.181:39528;branch=z9hG4bK-d87543-793fbd589a1daa4d-1–d 87543-;received=192.168.1.181;rport=39528
From: "VOIPTEST"sip:VOIPTEST@192.168.100.221:5060;tag=8d2c617e
To: "393272421889"sip:393272421889@192.168.100.221:5060
Call-ID: MDIyNzY4MWVmMGYzZTU5MmRiMDA2OTZlOTJiMTFhMzc.
CSeq: 1 INVITE
Server: Asterisk PBX 11.25.0
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLIS H, MESSAGE
Supported: replaces, timer
Contact: sip:393272421889@192.168.100.221:5060
Content-Length: 0

<------------>
– Executing [393272421889@billing:1] AGI(“SIP/VOIPTEST-000000b8”, “”/var/ww w/html/mbilling/agi.php"") in new stack
– Launched AGI Script /var/www/html/mbilling/agi.php
== Manager ‘magnus’ logged on from 127.0.0.1
== Manager ‘magnus’ logged off from 127.0.0.1
– AGI Script Executing Application: (DIAL) Options: (sip/GO_VoIP_1/00393272 421889,60,L(2147483647:61000:30000))
== Using SIP RTP CoS mark 5
– Called sip/GO_VoIP_1/00393272421889
– SIP/GO_VoIP_1-000000b9 is making progress passing it to SIP/VOIPTEST-0000 00b8
Audio is at 33636
Adding codec 100004 (alaw) to SDP
Adding codec 100003 (ulaw) to SDP
Adding non-codec 0x1 (telephone-event) to SDP

<— Transmitting (NAT) to 192.168.1.181:39528 —>
SIP/2.0 183 Session Progress
Via: SIP/2.0/UDP 192.168.1.181:39528;branch=z9hG4bK-d87543-793fbd589a1daa4d-1–d 87543-;received=192.168.1.181;rport=39528
From: "VOIPTEST"sip:VOIPTEST@192.168.100.221:5060;tag=8d2c617e
To: "393272421889"sip:393272421889@192.168.100.221:5060;tag=as3da93142
Call-ID: MDIyNzY4MWVmMGYzZTU5MmRiMDA2OTZlOTJiMTFhMzc.
CSeq: 1 INVITE
Server: Asterisk PBX 11.25.0
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLIS H, MESSAGE
Supported: replaces, timer
Contact: sip:393272421889@192.168.100.221:5060
Content-Type: application/sdp
Content-Length: 264

v=0
o=root 565957231 565957231 IN IP4 192.168.100.221
s=Asterisk PBX 11.25.0
c=IN IP4 192.168.100.221
t=0 0
m=audio 33636 RTP/AVP 8 0 101
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=sendrecv

<------------>
== Manager ‘magnus’ logged on from 127.0.0.1
== Manager ‘magnus’ logged off from 127.0.0.1
== Manager ‘magnus’ logged on from 127.0.0.1
== Manager ‘magnus’ logged off from 127.0.0.1
– SIP/GO_VoIP_1-000000b9 is ringing

<— Transmitting (NAT) to 192.168.1.181:39528 —>
SIP/2.0 180 Ringing
Via: SIP/2.0/UDP 192.168.1.181:39528;branch=z9hG4bK-d87543-793fbd589a1daa4d-1–d87543-;received=192.168.1.181;rport=39528
From: "VOIPTEST"sip:VOIPTEST@192.168.100.221:5060;tag=8d2c617e
To: "393272421889"sip:393272421889@192.168.100.221:5060;tag=as3da93142
Call-ID: MDIyNzY4MWVmMGYzZTU5MmRiMDA2OTZlOTJiMTFhMzc.
CSeq: 1 INVITE
Server: Asterisk PBX 11.25.0
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Contact: sip:393272421889@192.168.100.221:5060
Content-Length: 0

<------------>
– SIP/GO_VoIP_1-000000b9 is making progress passing it to SIP/VOIPTEST-000000b8
== Manager ‘magnus’ logged on from 127.0.0.1
== Manager ‘magnus’ logged off from 127.0.0.1
– SIP/GO_VoIP_1-000000b9 answered SIP/VOIPTEST-000000b8
Audio is at 33636
Adding codec 100004 (alaw) to SDP
Adding codec 100003 (ulaw) to SDP
Adding non-codec 0x1 (telephone-event) to SDP

<— Reliably Transmitting (NAT) to 192.168.1.181:39528 —>
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.1.181:39528;branch=z9hG4bK-d87543-793fbd589a1daa4d-1–d87543-;received=192.168.1.181;rport=39528
From: "VOIPTEST"sip:VOIPTEST@192.168.100.221:5060;tag=8d2c617e
To: "393272421889"sip:393272421889@192.168.100.221:5060;tag=as3da93142
Call-ID: MDIyNzY4MWVmMGYzZTU5MmRiMDA2OTZlOTJiMTFhMzc.
CSeq: 1 INVITE
Server: Asterisk PBX 11.25.0
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Contact: sip:393272421889@192.168.100.221:5060
Content-Type: application/sdp
Content-Length: 264

v=0
o=root 565957231 565957231 IN IP4 192.168.100.221
s=Asterisk PBX 11.25.0
c=IN IP4 192.168.100.221
t=0 0
m=audio 33636 RTP/AVP 8 0 101
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=sendrecv

<------------>
– Locally bridging SIP/VOIPTEST-000000b8 and SIP/GO_VoIP_1-000000b9

<— SIP read from UDP:192.168.1.181:39528 —>
ACK sip:393272421889@192.168.100.221:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.181:39528;branch=z9hG4bK-d87543-83341c1f68465833-1–d87543-;rport
Max-Forwards: 70
Contact: sip:VOIPTEST@192.168.1.181:39528
To: "393272421889"sip:393272421889@192.168.100.221:5060;tag=as3da93142
From: "VOIPTEST"sip:VOIPTEST@192.168.100.221:5060;tag=8d2c617e
Call-ID: MDIyNzY4MWVmMGYzZTU5MmRiMDA2OTZlOTJiMTFhMzc.
CSeq: 1 ACK
User-Agent: X-Lite release 1011s stamp 41150
Content-Length: 0

On the information provided, a firewall is the most likely problem.

I’ve tried to open all but same problem

Did you configure Asterisk to know it is behind NAT and to put the external IP address in as well?

@jcolp Can you show me please?

@david551if you think is a firewall problem, which port and which ip address should i permit?

The sip.conf sample config has a large section on how to configure it when Asterisk is behind NAT[1].

[1] https://github.com/asterisk/asterisk/blob/master/configs/samples/sip.conf.sample#L869

I assumed it wasn’t a NAT issue because all the addresses are on 192.168. However, if anything is not on that, you probably have a combination of NAT and an over zealous router.

You need to open the RTP port range configured in rtp.conf, with any remote port number. That’s for UDP.

I forgot that my trunk is on a 172.16 network.
OK. You mean both on my local firewall and the remote firewall?

On every firewall through which the media passes.

I’ve just open all port (5060 and rtp port) and still ringing but no audio.
Also i found that in sip show registry no host is registered.

Host dnsmgr Username Refresh State Reg.Time
0 SIP registrations.