No audio for external unreachable calls

Hello,
I have a problem, if I call a reachable number everything is ok.
But if I call an unattainable or nonexistent number, I do not receive audio, silent for minutes. In the old version of freepbx this did not happen, which module or configuration blocks audio ringing ?

does anyone have any ideas?
Thanks

Logs, specifically /var/log/asterisk/full should give us the clues we need to help you with this.

I I identified this error:

[2019-02-25 21:44:47] VERBOSE[3239][C-00000019] chan_iax2.c: Hungup ‘IAX2/10-5836’
[2019-02-25 21:44:49] VERBOSE[3279][C-0000001a] app_dial.c: SIP/08100XXXXX-0000001c is making progress passing it to IAX2/10-12067
[2019-02-25 21:44:57] VERBOSE[3279][C-0000001a] app_dial.c: SIP/08100XXXXX-0000001c redirecting info has changed, passing it to IAX2/10-12067
[2019-02-25 21:44:57] VERBOSE[3279][C-0000001a] app_dial.c: SIP/08100XXXXX-0000001c is busy
[2019-02-25 21:44:57] VERBOSE[3279][C-0000001a] app_dial.c: Everyone is busy/congested at this time (1:1/0/0)
[2019-02-25 21:44:57] VERBOSE[3279][C-0000001a] pbx.c: Executing [s@macro-dialout-trunk:26] NoOp(“IAX2/10-12067”, “Dial failed for some reason with DIALSTATUS = BUSY and HANGUPCAUSE = 19”) in new stack
[2019-02-25 21:44:57] VERBOSE[3279][C-0000001a] pbx.c: Executing [s@macro-dialout-trunk:27] GotoIf(“IAX2/10-12067”, “0?continue,1:s-BUSY,1”) in new stack
[2019-02-25 21:44:57] VERBOSE[3279][C-0000001a] pbx_builtins.c: Goto (macro-dialout-trunk,s-BUSY,1)
[2019-02-25 21:44:57] VERBOSE[3279][C-0000001a] pbx.c: Executing [s-BUSY@macro-dialout-trunk:1] NoOp(“IAX2/10-12067”, “Dial failed due to trunk reporting BUSY - giving up”) in new stack
[2019-02-25 21:44:57] VERBOSE[3279][C-0000001a] pbx.c: Executing [s-BUSY@macro-dialout-trunk:2] PlayTones(“IAX2/10-12067”, “busy”) in new stack
[2019-02-25 21:44:57] VERBOSE[3279][C-0000001a] pbx.c: Executing [s-BUSY@macro-dialout-trunk:3] Busy(“IAX2/10-12067”, “20”) in new stack
[2019-02-25 21:45:17] VERBOSE[3279][C-0000001a] app_macro.c: Spawn extension (macro-dialout-trunk, s-BUSY, 3) exited non-zero on ‘IAX2/10-12067’ in macro ‘dialout-trunk’
[2019-02-25 21:45:17] VERBOSE[3279][C-0000001a] pbx.c: Spawn extension (prova, 33XXXXXXXX, 5) exited non-zero on ‘IAX2/10-12067’
[2019-02-25 21:45:17] VERBOSE[3279][C-0000001a] pbx.c: Executing [h@prova:1] Macro(“IAX2/10-12067”, “hangupcall,”) in new stack
[2019-02-25 21:45:17] VERBOSE[3279][C-0000001a] pbx.c: Executing [s@macro-hangupcall:1] GotoIf(“IAX2/10-12067”, “1?theend”) in new stack
[2019-02-25 21:45:17] VERBOSE[3279][C-0000001a] pbx_builtins.c: Goto (macro-hangupcall,s,3)
[2019-02-25 21:45:17] VERBOSE[3279][C-0000001a] pbx.c: Executing [s@macro-hangupcall:3] ExecIf(“IAX2/10-12067”, “0?Set(CDR(recordingfile)=)”) in new stack
[2019-02-25 21:45:17] VERBOSE[3279][C-0000001a] pbx.c: Executing [s@macro-hangupcall:4] NoOp(“IAX2/10-12067”, " monior file= ") in new stack
[2019-02-25 21:45:17] VERBOSE[3279][C-0000001a] pbx.c: Executing [s@macro-hangupcall:5] AGI(“IAX2/10-12067”, “attendedtransfer-rec-restart.php,”) in new stack
[2019-02-25 21:45:17] VERBOSE[3279][C-0000001a] res_agi.c: Launched AGI Script /var/lib/asterisk/agi-bin/attendedtransfer-rec-restart.php
[2019-02-25 21:45:18] VERBOSE[3279][C-0000001a] res_agi.c: <IAX2/10-12067>AGI Script attendedtransfer-rec-restart.php completed, returning 0
[2019-02-25 21:45:18] VERBOSE[3279][C-0000001a] pbx.c: Executing [s@macro-hangupcall:6] Hangup(“IAX2/10-12067”, “”) in new stack
[2019-02-25 21:45:18] VERBOSE[3279][C-0000001a] app_macro.c: Spawn extension (macro-hangupcall, s, 6) exited non-zero on ‘IAX2/10-12067’ in macro ‘hangupcall’
[2019-02-25 21:45:18] VERBOSE[3279][C-0000001a] pbx.c: Spawn extension (prova, h, 1) exited non-zero on ‘IAX2/10-12067’
[2019-02-25 21:45:18] VERBOSE[3279][C-0000001a] chan_iax2.c: Hungup ‘IAX2/10-12067’

here this:
“Dial failed for some reason with DIALSTATUS = BUSY and HANGUPCAUSE = 19”

the number is not reachable, but I do not receive the provider’s audio. The call is terminated
How do I receive the provider’s audio?
Many thanks

Do I understand correctly, trunk is chan_sip but extension is IAX? If not (more than one PBX involved, etc., please provide details).

Otherwise, does this also fail when using a chan_sip or pjsip extension?

Do you have the RTP port range forwarded in your router/firewall?

If you still have trouble, possible approaches:

At the Asterisk command prompt, type
sip set debug on
and make a test call. The SIP trace will appear in the log and may have clues as to whether the provider was directed to send audio correctly to the PBX.

Or, run tcpdump on the PBX, make a test call, stop the capture, move the file to your PC and open it in Wireshark. You can see whether the provider is sending audio, whether it’s in the correct format and not silent and whether it’s being passed to the extension.

Or, configure an IP phone or softphone to connect to the provider directly, bypassing the PBX. Confirm that audio is indeed present when calling the unreachable number.

I rehearsed with the voip provider directly, and it works
although I use everything in chain_sip is the same, does not change anything.
I do not receive the audio “the number called is temporarily unavailable” or “the number called can be turned off or unreachable”
I tried a freepbx connection directly to the main router, but not working.

Probably the easiest way to troubleshoot this is to capture a failing call with tcpdump and post the capture file. Please use a chan_sip extension for making the call.

|Time | 192.168.1.10 | 62.94.199.43 |
| | | 83.211.227.21 |
|0.158472 | INVITE SDP (g711A g7 | |SIP INVITE From: sip:[email protected] To:sip:[email protected] Call-ID:[email protected]:5060 CSeq:102
| |(5060) ------------------> (5060) | |
|0.158472 | INVITE SDP (g711A g7 | |SIP INVITE From: sip:[email protected] To:sip:[email protected] Call-ID:[email protected]:5060 CSeq:102
| |(5060) ------------------> (5060) | |
|0.201038 | 407 Proxy Authentica | |SIP Status 407 Proxy Authentication Required
| |(5060) <------------------ (5060) | |
|0.201038 | 407 Proxy Authentica | |SIP Status 407 Proxy Authentication Required
| |(5060) <------------------ (5060) | |
|0.201705 | ACK | | |SIP ACK From: sip:[email protected] To:sip:[email protected] CSeq:102
| |(5060) ------------------> (5060) | |
|0.201705 | ACK | | |SIP ACK From: sip:[email protected] To:sip:[email protected] CSeq:102
| |(5060) ------------------> (5060) | |
|0.202361 | INVITE SDP (g711A g7 | |SIP INVITE From: sip:[email protected] To:sip:[email protected] Call-ID:[email protected]:5060 CSeq:103
| |(5060) ------------------> (5060) | |
|0.202361 | INVITE SDP (g711A g7 | |SIP INVITE From: sip:[email protected] To:sip:[email protected] Call-ID:[email protected]:5060 CSeq:103
| |(5060) ------------------> (5060) | |
|0.259059 | 100 Giving a try | |SIP Status 100 Giving a try
| |(5060) <------------------ (5060) | |
|0.259059 | 100 Giving a try | |SIP Status 100 Giving a try
| |(5060) <------------------ (5060) | |
|11.452390| 183 Session Progress | |SIP Status 183 Session Progress
| |(5060) <------------------ (5060) | |
|11.452390| 183 Session Progress | |SIP Status 183 Session Progress
| |(5060) <------------------ (5060) | |
|11.517158| RTP (g711A) | |RTP, 385 packets. Duration: 7.679s SSRC: 0x79BABDBD
| |(12152) --------------------------------------> (53412) |
|11.573608| RTP (g711A) | |RTP, 381 packets. Duration: 7.598s SSRC: 0xFDF9128F
| |(12152) <-------------------------------------- (53412) |
|19.202229| 480 Temporarily not | |SIP Status 480 Temporarily not Available
| |(5060) <------------------ (5060) | |
|19.202229| 480 Temporarily not | |SIP Status 480 Temporarily not Available
| |(5060) <------------------ (5060) | |
|19.203348| ACK | | |SIP ACK From: sip:[email protected] To:sip:[email protected] CSeq:103
| |(5060) ------------------> (5060) | |
|19.203348| ACK | | |SIP ACK From: sip:[email protected] To:sip:[email protected] CSeq:103
| |(5060) ------------------> (5060) | |

SIP Status 480 Temporarily not Available, the called number is off, but I do not receive the return audio from the external provider.
as a last resort, I will try to delete and redo the database asterisk, with the latest upgrades and backups of previous versions of freepbx I think something happened in the recovery configuration.

The trace you posted is essentially unreadable – the forum replaced multiple spaces with one and broke lines into multiple. If you post another, please paste it at https://pastebin.freepbx.org/ and post a link here.

We see only communications between PBX and trunk provider? Surely packets between extension and PBX should have appeared.

And every SIP request and response appears twice? Do you know what may be causing that? It’s not retransmissions, because the timestamps are identical.

However, we do see alaw audio packets in both directions. If the extension traffic can be shown, you can see whether audio from the trunk is being properly passed to the extension. If it is, you can capture the raw packets with tcpdump and open the capture in Wireshark. Then, play the incoming audio and confirm that it is not silent or corrupted.

https://pastebin.freepbx.org/view/874e85cf

Has anyone considered that there is no early media being sent back (that would be a 183 reply not a 100, 180 or 181)?

You should trying making sure the rR settings on in the Dial() to the provider

It does appear that Busy Tones are being put on the IAX channel, now how that gets passed back to the Chan_SIP channel. Not sure. I don’t use IAX.

There needs to be a better debug of this call. Like the full call, not just a piece.

We have a moving target here. In post 7, Eutelia sent a 183 with some audio, but your capture did not include enough info to know why it wasn’t sent on to the extension, or why it was not heard.

In post 9, Eutelia sent a 480 without any prior audio. In this case, it’s up to the extension to play a busy signal and/or indicate a failed call on its display.

If both of these test calls were to the same number, it’s possible that the provider was using different upstreams, or that the MNO treated the calls differently, e.g. in one case the mobile was registered on the network but did not respond to the page.

I installed on another freepbx machine and inserted a trunk and an extension, and everything works perfectly.
But as soon as I installed the Extension Settings module, I had the same problem on the new machine. Removed this form everything works fine.
I do not know why!

Thanks anyway

Well, that’s odd. If this is reproducible you might want to report it: issues.freepbx.org

yes, now working with chan_sip, but not work with IAX2 extension.
I’m looking for what makes the audio pass only if the called is reachable. If the called not reachable IAX2 remains silent!

Why are you using IAX?

IAX is a more powerful protocol, I can use it on remote phones, softphones, and I do not need to open ports on the router to work.
In recent years, ISP operators block a lot of network traffic and reserve port 5060 for their VoIP router, I’m having a lot of difficulties on Freepbx systems that I have installed and that have been working for years, because of the Fibra ADSL. IAX has met me so far, and it works great, only I have this little problem that does it on the latest Freepbx releases even when it is installed, and I would like to solve it. Convenient to have an extension on the mobile phone so you have the office wherever you go!

1 Like

That is highly debatable, however, IAX has not seen any real development or improvements for the past 6+ years or so. Anything that is done with it now is due to community members making those changes. There isn’t anything being actively done with it.

It is also a protocol that only exists if you have Asterisk or FreeSWITCH. This isn’t a globally used protocol and it has a lot of limitations compared to SIP.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.