Call failed when incoming call is coming from my mobile

Hello,
I made my first installation of FreePBX and I have a problem with the incoming calls.
When I call it from different lines (landlines and mobile) there is no problems reaching it and using the IVR it but when I call it from my own mobile line after a few seconds with nothing happening (no ringing) the call is dropped and the iPhone displays “call failed”.
I searched online and it seems someone else had the same problem with the same SIP provider and same mobile phone provider, he said he solved it by setting progressinband=never but I tried it without success.

I also tried to redirect the incoming connection directly to an extension instead of the IVR but without success.

I also tried my SIP trunk directly with a SIP phone to check if it wasn’t a problem from the provider and when I call it from my problematic phone line the issue doesn’t happen.

I tried to see in the logs what’s happening, but when I have this problem there is nothing new showing in it.

My SIP provider is OVH

What could I try to fix this ?

Thanks

without any logs you are on your own. Guessing generally proves fruitless.

2 Likes

Hello,
Unfortunately when it’s not working there is nothing happening in the logs whereas it’s set in verbose mode.
But here is what’s happening when a call from another line is working, maybe it can help to see if everything is working as it should and if the logs settings are good ?

Thanks

95916[2021-05-06 11:04:03] VERBOSE[760857] res_pjsip/pjsip_configuration.c: Endpoint OVH-0493XXXXXX is now Reachable
95917[2021-05-06 11:04:03] VERBOSE[760857] res_pjsip/pjsip_options.c: Contact OVH-0493XXXXXX/sip:[email protected]:5060 is now Reachable. RTT: 54.027 msec
95918[2021-05-06 12:37:49] VERBOSE[1102823][C-0000001d] pbx.c: Executing [s@from-pstn:1] Set(“PJSIP/OVH-0493XXXXXX-00000009”, “__DIRECTION=INBOUND”) in new stack
95919[2021-05-06 12:37:49] VERBOSE[1102823][C-0000001d] pbx.c: Executing [s@from-pstn:2] Gosub(“PJSIP/OVH-0493XXXXXX-00000009”, “sub-record-check,s,1(in,s,dontcare)”) in new stack
95920[2021-05-06 12:37:49] VERBOSE[1102823][C-0000001d] pbx.c: Executing [s@sub-record-check:1] GotoIf(“PJSIP/OVH-0493XXXXXX-00000009”, “0?initialized”) in new stack
95921[2021-05-06 12:37:49] VERBOSE[1102823][C-0000001d] pbx.c: Executing [s@sub-record-check:2] Set(“PJSIP/OVH-0493XXXXXX-00000009”, “__REC_STATUS=INITIALIZED”) in new stack
95922[2021-05-06 12:37:49] VERBOSE[1102823][C-0000001d] pbx.c: Executing [s@sub-record-check:3] Set(“PJSIP/OVH-0493XXXXXX-00000009”, “NOW=1620297469”) in new stack
95923[2021-05-06 12:37:49] VERBOSE[1102823][C-0000001d] pbx.c: Executing [s@sub-record-check:4] Set(“PJSIP/OVH-0493XXXXXX-00000009”, “__DAY=06”) in new stack
95924[2021-05-06 12:37:49] VERBOSE[1102823][C-0000001d] pbx.c: Executing [s@sub-record-check:5] Set(“PJSIP/OVH-0493XXXXXX-00000009”, “__MONTH=05”) in new stack
95925[2021-05-06 12:37:49] VERBOSE[1102823][C-0000001d] pbx.c: Executing [s@sub-record-check:6] Set(“PJSIP/OVH-0493XXXXXX-00000009”, “__YEAR=2021”) in new stack
95926[2021-05-06 12:37:49] VERBOSE[1102823][C-0000001d] pbx.c: Executing [s@sub-record-check:7] Set(“PJSIP/OVH-0493XXXXXX-00000009”, “__TIMESTR=20210506-123749”) in new stack
95927[2021-05-06 12:37:49] VERBOSE[1102823][C-0000001d] pbx.c: Executing [s@sub-record-check:8] Set(“PJSIP/OVH-0493XXXXXX-00000009”, “__FROMEXTEN=unknown”) in new stack
95928[2021-05-06 12:37:49] VERBOSE[1102823][C-0000001d] pbx.c: Executing [s@sub-record-check:9] Set(“PJSIP/OVH-0493XXXXXX-00000009”, “__MON_FMT=wav”) in new stack
95929[2021-05-06 12:37:49] VERBOSE[1102823][C-0000001d] pbx.c: Executing [s@sub-record-check:10] NoOp(“PJSIP/OVH-0493XXXXXX-00000009”, “Recordings initialized”) in new stack
95930[2021-05-06 12:37:49] VERBOSE[1102823][C-0000001d] pbx.c: Executing [s@sub-record-check:11] ExecIf(“PJSIP/OVH-0493XXXXXX-00000009”, “0?Set(ARG3=dontcare)”) in new stack
95931[2021-05-06 12:37:49] VERBOSE[1102823][C-0000001d] pbx.c: Executing [s@sub-record-check:12] Set(“PJSIP/OVH-0493XXXXXX-00000009”, “REC_POLICY_MODE_SAVE=”) in new stack
95932[2021-05-06 12:37:49] VERBOSE[1102823][C-0000001d] pbx.c: Executing [s@sub-record-check:13] ExecIf(“PJSIP/OVH-0493XXXXXX-00000009”, “0?Set(REC_STATUS=NO)”) in new stack
95933[2021-05-06 12:37:49] VERBOSE[1102823][C-0000001d] pbx.c: Executing [s@sub-record-check:14] GotoIf(“PJSIP/OVH-0493XXXXXX-00000009”, “2?checkaction”) in new stack
95934[2021-05-06 12:37:49] VERBOSE[1102823][C-0000001d] pbx_builtins.c: Goto (sub-record-check,s,17)
95935[2021-05-06 12:37:49] VERBOSE[1102823][C-0000001d] pbx.c: Executing [s@sub-record-check:17] GotoIf(“PJSIP/OVH-0493XXXXXX-00000009”, “1?sub-record-check,in,1”) in new stack
95936[2021-05-06 12:37:49] VERBOSE[1102823][C-0000001d] pbx_builtins.c: Goto (sub-record-check,in,1)
95937[2021-05-06 12:37:49] VERBOSE[1102823][C-0000001d] pbx.c: Executing [in@sub-record-check:1] NoOp(“PJSIP/OVH-0493XXXXXX-00000009”, “Inbound Recording Check to s”) in new stack
95938[2021-05-06 12:37:49] VERBOSE[1102823][C-0000001d] pbx.c: Executing [in@sub-record-check:2] Set(“PJSIP/OVH-0493XXXXXX-00000009”, “FROMEXTEN=unknown”) in new stack
95939[2021-05-06 12:37:49] VERBOSE[1102823][C-0000001d] pbx.c: Executing [in@sub-record-check:3] ExecIf(“PJSIP/OVH-0493XXXXXX-00000009”, “10?Set(FROMEXTEN=0756XXXXXX)”) in new stack
95940[2021-05-06 12:37:49] VERBOSE[1102823][C-0000001d] pbx.c: Executing [in@sub-record-check:4] Gosub(“PJSIP/OVH-0493XXXXXX-00000009”, “recordcheck,1(dontcare,in,s)”) in new stack
95941[2021-05-06 12:37:49] VERBOSE[1102823][C-0000001d] pbx.c: Executing [recordcheck@sub-record-check:1] NoOp(“PJSIP/OVH-0493XXXXXX-00000009”, “Starting recording check against dontcare”) in new stack
95942[2021-05-06 12:37:49] VERBOSE[1102823][C-0000001d] pbx.c: Executing [recordcheck@sub-record-check:2] Goto(“PJSIP/OVH-0493XXXXXX-00000009”, “dontcare”) in new stack
95943[2021-05-06 12:37:49] VERBOSE[1102823][C-0000001d] pbx_builtins.c: Goto (sub-record-check,recordcheck,3)
95944[2021-05-06 12:37:49] VERBOSE[1102823][C-0000001d] pbx.c: Executing [recordcheck@sub-record-check:3] Return(“PJSIP/OVH-0493XXXXXX-00000009”, “”) in new stack
95945[2021-05-06 12:37:49] VERBOSE[1102823][C-0000001d] pbx.c: Executing [in@sub-record-check:5] Return(“PJSIP/OVH-0493XXXXXX-00000009”, “”) in new stack
95946[2021-05-06 12:37:49] VERBOSE[1102823][C-0000001d] pbx.c: Executing [s@from-pstn:3] Set(“PJSIP/OVH-0493XXXXXX-00000009”, “CHANNEL(tonezone)=fr”) in new stack
95947[2021-05-06 12:37:49] VERBOSE[1102823][C-0000001d] pbx.c: Executing [s@from-pstn:4] ExecIf(“PJSIP/OVH-0493XXXXXX-00000009”, “1?Set(__FROM_DID=s)”) in new stack
95948[2021-05-06 12:37:49] VERBOSE[1102823][C-0000001d] pbx.c: Executing [s@from-pstn:5] Set(“PJSIP/OVH-0493XXXXXX-00000009”, “returnhere=1”) in new stack
95949[2021-05-06 12:37:49] VERBOSE[1102823][C-0000001d] pbx.c: Executing [s@from-pstn:6] Gosub(“PJSIP/OVH-0493XXXXXX-00000009”, “app-blacklist-check,s,1()”) in new stack
95950[2021-05-06 12:37:49] VERBOSE[1102823][C-0000001d] pbx.c: Executing [s@app-blacklist-check:1] GotoIf(“PJSIP/OVH-0493XXXXXX-00000009”, “0?blacklisted”) in new stack
95951[2021-05-06 12:37:49] VERBOSE[1102823][C-0000001d] pbx.c: Executing [s@app-blacklist-check:2] Set(“PJSIP/OVH-0493XXXXXX-00000009”, “CALLED_BLACKLIST=1”) in new stack
95952[2021-05-06 12:37:49] VERBOSE[1102823][C-0000001d] pbx.c: Executing [s@app-blacklist-check:3] Return(“PJSIP/OVH-0493XXXXXX-00000009”, “”) in new stack
95953[2021-05-06 12:37:49] VERBOSE[1102823][C-0000001d] pbx.c: Executing [s@from-pstn:7] Set(“PJSIP/OVH-0493XXXXXX-00000009”, “CDR(did)=s”) in new stack
95954[2021-05-06 12:37:49] VERBOSE[1102823][C-0000001d] pbx.c: Executing [s@from-pstn:8] GotoIf(“PJSIP/OVH-0493XXXXXX-00000009”, “0?”) in new stack
95955[2021-05-06 12:37:49] VERBOSE[1102823][C-0000001d] pbx.c: Executing [s@from-pstn:9] ExecIf(“PJSIP/OVH-0493XXXXXX-00000009”, “0 ?Set(CALLERID(name)=0756XXXXXX)”) in new stack
95956[2021-05-06 12:37:49] VERBOSE[1102823][C-0000001d] pbx.c: Executing [s@from-pstn:10] Set(“PJSIP/OVH-0493XXXXXX-00000009”, “__MOHCLASS=”) in new stack
95957[2021-05-06 12:37:49] VERBOSE[1102823][C-0000001d] pbx.c: Executing [s@from-pstn:11] Set(“PJSIP/OVH-0493XXXXXX-00000009”, “__REVERSAL_REJECT=FALSE”) in new stack
95958[2021-05-06 12:37:49] VERBOSE[1102823][C-0000001d] pbx.c: Executing [s@from-pstn:12] GotoIf(“PJSIP/OVH-0493XXXXXX-00000009”, “1?post-reverse-charge”) in new stack
95959[2021-05-06 12:37:49] VERBOSE[1102823][C-0000001d] pbx_builtins.c: Goto (from-pstn,s,14)
95960[2021-05-06 12:37:49] VERBOSE[1102823][C-0000001d] pbx.c: Executing [s@from-pstn:14] NoOp(“PJSIP/OVH-0493XXXXXX-00000009”, “”) in new stack
95961[2021-05-06 12:37:49] VERBOSE[1102823][C-0000001d] pbx.c: Executing [s@from-pstn:15] Set(“PJSIP/OVH-0493XXXXXX-00000009”, “__CALLINGNAMEPRES_SV=allowed_not_screened”) in new stack
95962[2021-05-06 12:37:49] VERBOSE[1102823][C-0000001d] pbx.c: Executing [s@from-pstn:16] Set(“PJSIP/OVH-0493XXXXXX-00000009”, “__CALLINGNUMPRES_SV=allowed_not_screened”) in new stack
95963[2021-05-06 12:37:49] VERBOSE[1102823][C-0000001d] pbx.c: Executing [s@from-pstn:17] Set(“PJSIP/OVH-0493XXXXXX-00000009”, “CALLERID(name-pres)=allowed_not_screened”) in new stack
95964[2021-05-06 12:37:49] VERBOSE[1102823][C-0000001d] pbx.c: Executing [s@from-pstn:18] Set(“PJSIP/OVH-0493XXXXXX-00000009”, “CALLERID(num-pres)=allowed_not_screened”) in new stack
95965[2021-05-06 12:37:49] VERBOSE[1102823][C-0000001d] pbx.c: Executing [s@from-pstn:19] NoOp(“PJSIP/OVH-0493XXXXXX-00000009”, “CallerID Entry Point”) in new stack
95966[2021-05-06 12:37:49] VERBOSE[1102823][C-0000001d] pbx.c: Executing [s@from-pstn:20] Set(“PJSIP/OVH-0493XXXXXX-00000009”, “FAX_DEST=custom-fax-iaxmodem^s^1”) in new stack
95967[2021-05-06 12:37:49] VERBOSE[1102823][C-0000001d] pbx.c: Executing [s@from-pstn:21] Set(“PJSIP/OVH-0493XXXXXX-00000009”, “FAXOPT(faxdetect)=yes”) in new stack
95968[2021-05-06 12:37:49] VERBOSE[1102823][C-0000001d] pbx.c: Executing [s@from-pstn:22] Answer(“PJSIP/OVH-0493XXXXXX-00000009”, “”) in new stack
95969[2021-05-06 12:37:49] VERBOSE[1102823][C-0000001d] pbx.c: Executing [s@from-pstn:23] PlayTones(“PJSIP/OVH-0493XXXXXX-00000009”, “ring”) in new stack
95970[2021-05-06 12:37:49] VERBOSE[1102823][C-0000001d] pbx.c: Executing [s@from-pstn:24] Wait(“PJSIP/OVH-0493XXXXXX-00000009”, “5”) in new stack
95971[2021-05-06 12:37:52] VERBOSE[1102823][C-0000001d] pbx.c: Spawn extension (from-pstn, s, 24) exited non-zero on ‘PJSIP/OVH-0493XXXXXX-00000009’
95972[2021-05-06 12:37:52] VERBOSE[1102823][C-0000001d] pbx.c: Executing [h@from-pstn:1] Macro(“PJSIP/OVH-0493XXXXXX-00000009”, “hangupcall,”) in new stack
95973[2021-05-06 12:37:52] VERBOSE[1102823][C-0000001d] pbx.c: Executing [s@macro-hangupcall:1] GotoIf(“PJSIP/OVH-0493XXXXXX-00000009”, “1?theend”) in new stack
95974[2021-05-06 12:37:52] VERBOSE[1102823][C-0000001d] pbx_builtins.c: Goto (macro-hangupcall,s,3)
95975[2021-05-06 12:37:52] VERBOSE[1102823][C-0000001d] pbx.c: Executing [s@macro-hangupcall:3] ExecIf(“PJSIP/OVH-0493XXXXXX-00000009”, “0?Set(CDR(recordingfile)=)”) in new stack
95976[2021-05-06 12:37:52] VERBOSE[1102823][C-0000001d] pbx.c: Executing [s@macro-hangupcall:4] NoOp(“PJSIP/OVH-0493XXXXXX-00000009”, " montior file= ") in new stack
95977[2021-05-06 12:37:52] VERBOSE[1102823][C-0000001d] pbx.c: Executing [s@macro-hangupcall:5] GotoIf(“PJSIP/OVH-0493XXXXXX-00000009”, “1?skipagi”) in new stack
95978[2021-05-06 12:37:52] VERBOSE[1102823][C-0000001d] pbx_builtins.c: Goto (macro-hangupcall,s,7)
95979[2021-05-06 12:37:52] VERBOSE[1102823][C-0000001d] pbx.c: Executing [s@macro-hangupcall:7] Hangup(“PJSIP/OVH-0493XXXXXX-00000009”, “”) in new stack
95980[2021-05-06 12:37:52] VERBOSE[1102823][C-0000001d] app_macro.c: Spawn extension (macro-hangupcall, s, 7) exited non-zero on ‘PJSIP/OVH-0493XXXXXX-00000009’ in macro ‘hangupcall’
95981[2021-05-06 12:37:52] VERBOSE[1102823][C-0000001d] pbx.c: Spawn extension (from-pstn, h, 1) exited non-zero on ‘PJSIP/OVH-0493XXXXXX-00000009’

what does

grep -i reachable /var/log/asterisk/full*

return?

So you need to fix your network, no?

(iax2 devices going unreachable? if they are all ‘local’ you have a bigger problem with your hardware , possible you are in the wrong forum 'cos FreePBX “don’t do that fax over iax2 any more” any attempt to do fax over IAX2 to a remote server is doomed to fail)

I disabled the IAX modules as I don’t need this nor the fax feature.

now the only messages in the log are the ones below.
For the problem of incoming calls failing from a specific mobile provider, there’s still nothing in the logs.

[2021-05-08 02:06:24] VERBOSE[433236] res_pjsip/pjsip_configuration.c: Endpoint 103 is now Reachable

[2021-05-08 02:06:24] VERBOSE[433236] res_pjsip/pjsip_options.c: Contact 103/sip:[email protected]:34826 is now Reachable. RTT: 14.952 msec

[2021-05-08 02:06:31] VERBOSE[433236] res_pjsip/pjsip_configuration.c: Endpoint OVH-04XXXXXXXX is now Reachable

[2021-05-08 02:06:31] VERBOSE[433236] res_pjsip/pjsip_options.c: Contact OVH-04XXXXXXXX/sip:[email protected]:5060 is now Reachable. RTT: 17.543 msec

[2021-05-08 02:06:37] VERBOSE[433236] res_pjsip/pjsip_configuration.c: Endpoint 101 is now Reachable

[2021-05-08 02:06:37] VERBOSE[433236] res_pjsip/pjsip_options.c: Contact 101/sip:[email protected]:5060 is now Reachable. RTT: 69.466 msec

[2021-05-08 02:06:38] VERBOSE[433236] res_pjsip/pjsip_configuration.c: Endpoint 102 is now Reachable

[2021-05-08 02:06:38] VERBOSE[433236] res_pjsip/pjsip_options.c: Contact 102/sip:[email protected]:5060;x-ast-orig-host=192.168.0.15:5060 is now Reachable. RTT: 71.1

Ok I just fixed it, the problem was the codec used by the trunk, it seems the mobile phone provider has difficulties dealing with codecs different than alaw.

For the benefit of others, please provide additional details:

Which codecs did Asterisk offer on the trunk? Which codecs did the trunking provider offer for the failing call?

What went wrong (for example, Asterisk sent 488 Not Acceptable Here)?

What were you trying to accomplish (for example, achieve a wideband connection when the caller is VoLTE capable)?

Here are more details of the setup:

I was calling my SIP line from my mobile phone (Bouygues Telecom (France))
to check everything was working. (connected to the mobile network through VoLTE or VoWIFI)

My SIP provider, OVH offers to automatically switch between g722, g711, g729.

My trunk configuration in Asterisk was g722/ulaw/opus

Now it works with: alaw/g722/ulaw/opus

For Asterisk there was nothing at all in the logs when I was doing these tests, like if the calls were never reaching the trunk.

When I was playing with the codecs, I noticed when calling the line from the Bouygues’ mobile line with the trunk set to alaw, I could hear the 2 ringing tones before the IVR replies, with ulaw there was no tones before the IVR.

I also tried the codecs in the order: G722/alaw in the trunk settings but the calls from Bouygues’s mobile network were failing again, whereas with another mobile on the network of Free Mobile (probably VoLTE) it was working.

Thanks for the update. alaw (a.k.a. G.711A or PCMA) is the standard codec in France and it is not surprising that some calls would fail if that is not in your list. Until mobiles were capable of wideband (HD) voice, all calls on the PSTN used alaw. When the provider and Asterisk have no codecs in common, pjsip will respond to the incoming INVITE with 488 Not Acceptable Here and log an error in /var/log/asterisk/full . If you saw nothing, you may have an issue with logging setup.

OTOH, if Asterisk has g722/alaw and the incoming call is not g722 capable, pjsip should automatically fall back to alaw and the call should succeed. This may or may not be worth troubleshooting and fixing. Do you know whether OVH provides a true wideband connection when the caller is VoLTE capable? If so (and your IP phones or other endpoints are also wideband capable), you would enjoy an HD connection on those calls. However, if OVH would receive alaw from the carrier and just transcode to g722, HD is not possible anyway, so it is easiest to just leave alaw first on the list.

In the customer area OVH indicates the G722 is only available for calls between OVH SIP lines.

I enabled now in Asterisk in the order: G722/alaw and it seems to be working, I tried yesterday that way and the sound had some glitches but they don’t happen anymore so I think I’ll stay with G722/alaw, and with your explanations I see that the problem was that alaw wasn’t activated.

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