Inbound call - phone rings but hangup on answer


(Splows) #1

Testing the connection by placing an inbound call. When I answer the call just hangs up. Log entry below. Can anyone please assist?

[2020-11-05 10:36:35] VERBOSE[11027][C-00000146] app_dial.c: PJSIP/101-00000149 is ringing
[2020-11-05 10:36:35] VERBOSE[11027][C-00000146] app_dial.c: PJSIP/101-00000149 is ringing
[2020-11-05 10:36:38] VERBOSE[7256] res_rtp_asterisk.c: 0x7fa344349160 – Strict RTP learning after remote address set to: 151.225.227.91:46478
[2020-11-05 10:36:38] VERBOSE[11027][C-00000146] app_dial.c: PJSIP/101-00000149 answered PJSIP/anonymous-00000148
[2020-11-05 10:36:38] VERBOSE[7256] res_rtp_asterisk.c: 0x7fa344397e10 – Strict RTP learning after remote address set to: 69.65.34.216:17952
[2020-11-05 10:36:38] WARNING[7256] channel.c: Unable to find a codec translation path: (g723) -> (alaw)
[2020-11-05 10:36:38] WARNING[7256] channel.c: Unable to find a codec translation path: (alaw) -> (g723)
[2020-11-05 10:36:38] VERBOSE[11059][C-00000146] bridge_channel.c: Channel PJSIP/101-00000149 joined ‘simple_bridge’ basic-bridge <9cbfdd8f-cb86-48cd-a785-2f9a07cf6cb3>
[2020-11-05 10:36:38] VERBOSE[11027][C-00000146] bridge_channel.c: Channel PJSIP/anonymous-00000148 joined ‘simple_bridge’ basic-bridge <9cbfdd8f-cb86-48cd-a785-2f9a07cf6cb3>
[2020-11-05 10:36:38] WARNING[11027][C-00000146] channel.c: No path to translate from PJSIP/anonymous-00000148 to PJSIP/101-00000149
[2020-11-05 10:36:38] VERBOSE[11027][C-00000146] bridge_channel.c: Channel PJSIP/anonymous-00000148 left ‘simple_bridge’ basic-bridge <9cbfdd8f-cb86-48cd-a785-2f9a07cf6cb3>
[2020-11-05 10:36:38] VERBOSE[11027][C-00000146] app_macro.c: Spawn extension (macro-dial-one, s, 56) exited non-zero on ‘PJSIP/anonymous-00000148’ in macro ‘dial-one’
[2020-11-05 10:36:38] VERBOSE[11027][C-00000146] app_macro.c: Spawn extension (macro-exten-vm, s, 26) exited non-zero on ‘PJSIP/anonymous-00000148’ in macro ‘exten-vm’
[2020-11-05 10:36:38] VERBOSE[11027][C-00000146] pbx.c: Spawn extension (ext-local, 101, 3) exited non-zero on ‘PJSIP/anonymous-00000148’
[2020-11-05 10:36:38] VERBOSE[11027][C-00000146] pbx.c: Executing [h@ext-local:1] Macro(“PJSIP/anonymous-00000148”, “hangupcall,”) in new stack
[2020-11-05 10:36:38] VERBOSE[11027][C-00000146] pbx.c: Executing [s@macro-hangupcall:1] GotoIf(“PJSIP/anonymous-00000148”, “1?theend”) in new stack
[2020-11-05 10:36:38] VERBOSE[11027][C-00000146] pbx_builtins.c: Goto (macro-hangupcall,s,3)
[2020-11-05 10:36:38] VERBOSE[11027][C-00000146] pbx.c: Executing [s@macro-hangupcall:3] ExecIf(“PJSIP/anonymous-00000148”, “0?Set(CDR(recordingfile)=)”) in new stack
[2020-11-05 10:36:38] VERBOSE[11027][C-00000146] pbx.c: Executing [s@macro-hangupcall:4] NoOp(“PJSIP/anonymous-00000148”, "PJSIP/101-00000149 montior file= ") in new stack
[2020-11-05 10:36:38] VERBOSE[11027][C-00000146] pbx.c: Executing [s@macro-hangupcall:5] GotoIf(“PJSIP/anonymous-00000148”, “1?skipagi”) in new stack
[2020-11-05 10:36:38] VERBOSE[11027][C-00000146] pbx_builtins.c: Goto (macro-hangupcall,s,7)
[2020-11-05 10:36:38] VERBOSE[11027][C-00000146] pbx.c: Executing [s@macro-hangupcall:7] Hangup(“PJSIP/anonymous-00000148”, “”) in new stack
[2020-11-05 10:36:38] VERBOSE[11027][C-00000146] app_macro.c: Spawn extension (macro-hangupcall, s, 7) exited non-zero on ‘PJSIP/anonymous-00000148’ in macro ‘hangupcall’
[2020-11-05 10:36:38] VERBOSE[11027][C-00000146] pbx.c: Spawn extension (ext-local, h, 1) exited non-zero on ‘PJSIP/anonymous-00000148’
[2020-11-05 10:36:38] VERBOSE[11027][C-00000146] app_stack.c: PJSIP/anonymous-00000148 Internal Gosub(crm-hangup,s,1) start
[2020-11-05 10:36:38] VERBOSE[11027][C-00000146] pbx.c: Executing [s@crm-hangup:1] NoOp(“PJSIP/anonymous-00000148”, “Sending Hangup to CRM”) in new stack
[2020-11-05 10:36:38] VERBOSE[11027][C-00000146] pbx.c: Executing [s@crm-hangup:2] NoOp(“PJSIP/anonymous-00000148”, “HANGUP CAUSE: 16”) in new stack
[2020-11-05 10:36:38] VERBOSE[11027][C-00000146] pbx.c: Executing [s@crm-hangup:3] ExecIf(“PJSIP/anonymous-00000148”, “0?Set(__CRM_VOICEMAIL=)”) in new stack
[2020-11-05 10:36:38] VERBOSE[11027][C-00000146] pbx.c: Executing [s@crm-hangup:4] NoOp(“PJSIP/anonymous-00000148”, “MASTER CHANNEL: 1604572594.328 = 1604572594.328”) in new stack
[2020-11-05 10:36:38] VERBOSE[11027][C-00000146] pbx.c: Executing [s@crm-hangup:5] GotoIf(“PJSIP/anonymous-00000148”, “0?return”) in new stack
[2020-11-05 10:36:38] VERBOSE[11027][C-00000146] pbx.c: Executing [s@crm-hangup:6] Set(“PJSIP/anonymous-00000148”, “__CRM_HANGUP=1”) in new stack
[2020-11-05 10:36:38] VERBOSE[11027][C-00000146] pbx.c: Executing [s@crm-hangup:7] AGI(“PJSIP/anonymous-00000148”, “agi://127.0.0.1/sangomacrm.agi”) in new stack
[2020-11-05 10:36:38] VERBOSE[11059][C-00000146] bridge_channel.c: Channel PJSIP/101-00000149 left ‘simple_bridge’ basic-bridge <9cbfdd8f-cb86-48cd-a785-2f9a07cf6cb3>
[2020-11-05 10:36:38] VERBOSE[11059][C-00000146] app_stack.c: PJSIP/101-00000149 Internal Gosub(crm-hangup,s,1) start
[2020-11-05 10:36:38] VERBOSE[11059][C-00000146] pbx.c: Executing [s@crm-hangup:1] NoOp(“PJSIP/101-00000149”, “Sending Hangup to CRM”) in new stack
[2020-11-05 10:36:38] VERBOSE[11059][C-00000146] pbx.c: Executing [s@crm-hangup:2] NoOp(“PJSIP/101-00000149”, “HANGUP CAUSE: 16”) in new stack
[2020-11-05 10:36:38] VERBOSE[11059][C-00000146] pbx.c: Executing [s@crm-hangup:3] ExecIf(“PJSIP/101-00000149”, “0?Set(__CRM_VOICEMAIL=)”) in new stack
[2020-11-05 10:36:38] VERBOSE[11059][C-00000146] pbx.c: Executing [s@crm-hangup:4] NoOp(“PJSIP/101-00000149”, “MASTER CHANNEL: 1604572594.329 = 1604572594.328”) in new stack
[2020-11-05 10:36:38] VERBOSE[11059][C-00000146] pbx.c: Executing [s@crm-hangup:5] GotoIf(“PJSIP/101-00000149”, “1?return”) in new stack
[2020-11-05 10:36:38] VERBOSE[11059][C-00000146] pbx_builtins.c: Goto (crm-hangup,s,8)
[2020-11-05 10:36:38] VERBOSE[11059][C-00000146] pbx.c: Executing [s@crm-hangup:8] Return(“PJSIP/101-00000149”, “”) in new stack
[2020-11-05 10:36:38] VERBOSE[11059][C-00000146] app_stack.c: Spawn extension (from-internal, , 1) exited non-zero on ‘PJSIP/101-00000149’
[2020-11-05 10:36:38] VERBOSE[11059][C-00000146] app_stack.c: PJSIP/101-00000149 Internal Gosub(crm-hangup,s,1) complete GOSUB_RETVAL=
[2020-11-05 10:36:38] VERBOSE[11027][C-00000146] res_agi.c: <PJSIP/anonymous-00000148>AGI Script agi://127.0.0.1/sangomacrm.agi completed, returning 0
[2020-11-05 10:36:38] VERBOSE[11027][C-00000146] pbx.c: Executing [s@crm-hangup:8] Return(“PJSIP/anonymous-00000148”, “”) in new stack
[2020-11-05 10:36:38] VERBOSE[11027][C-00000146] app_stack.c: Spawn extension (ext-local, h, 1) exited non-zero on ‘PJSIP/anonymous-00000148’
[2020-11-05 10:36:38] VERBOSE[11027][C-00000146] app_stack.c: PJSIP/anonymous-00000148 Internal Gosub(crm-hangup,s,1) complete GOSUB_RETVAL=


(Splows) #2

For the above warning I’ve removed all the codecs and enabled these two but still the call hangs up on answer. The new section of the log is below. Your assistance would be greatly appreciated.

[2020-11-05 11:48:27] VERBOSE[4004][C-0000000a] bridge_channel.c: Channel PJSIP/101-0000000b joined ‘simple_bridge’ basic-bridge <8abed926-cbb3-4539-987c-55e888a94455>
[2020-11-05 11:48:27] VERBOSE[3974][C-0000000a] bridge_channel.c: Channel PJSIP/anonymous-0000000a joined ‘simple_bridge’ basic-bridge <8abed926-cbb3-4539-987c-55e888a94455>
[2020-11-05 11:48:27] WARNING[3974][C-0000000a] channel.c: No path to translate from PJSIP/anonymous-0000000a to PJSIP/101-0000000b
[2020-11-05 11:48:27] VERBOSE[3974][C-0000000a] bridge_channel.c: Channel PJSIP/anonymous-0000000a left ‘simple_bridge’ basic-bridge <8abed926-cbb3-4539-987c-55e888a94455>
[2020-11-05 11:48:27] VERBOSE[3974][C-0000000a] app_macro.c: Spawn extension (macro-dial-one, s, 56) exited non-zero on ‘PJSIP/anonymous-0000000a’ in macro ‘dial-one’
[2020-11-05 11:48:27] VERBOSE[3974][C-0000000a] app_macro.c: Spawn extension (macro-exten-vm, s, 26) exited non-zero on ‘PJSIP/anonymous-0000000a’ in macro ‘exten-vm’
[2020-11-05 11:48:27] VERBOSE[3974][C-0000000a] pbx.c: Spawn extension (ext-local, 101, 3) exited non-zero on ‘PJSIP/anonymous-0000000a’
[2020-11-05 11:48:27] VERBOSE[3974][C-0000000a] pbx.c: Executing [h@ext-local:1] Macro(“PJSIP/anonymous-0000000a”, “hangupcall,”) in new stack
[2020-11-05 11:48:27] VERBOSE[3974][C-0000000a] pbx.c: Executing [s@macro-hangupcall:1] GotoIf(“PJSIP/anonymous-0000000a”, “1?theend”) in new stack
[2020-11-05 11:48:27] VERBOSE[3974][C-0000000a] pbx_builtins.c: Goto (macro-hangupcall,s,3)
[2020-11-05 11:48:27] VERBOSE[3974][C-0000000a] pbx.c: Executing [s@macro-hangupcall:3] ExecIf(“PJSIP/anonymous-0000000a”, “0?Set(CDR(recordingfile)=)”) in new stack
[2020-11-05 11:48:27] VERBOSE[3974][C-0000000a] pbx.c: Executing [s@macro-hangupcall:4] NoOp(“PJSIP/anonymous-0000000a”, "PJSIP/101-0000000b montior file= ") in new stack
[2020-11-05 11:48:27] VERBOSE[3974][C-0000000a] pbx.c: Executing [s@macro-hangupcall:5] GotoIf(“PJSIP/anonymous-0000000a”, “1?skipagi”) in new stack
[2020-11-05 11:48:27] VERBOSE[3974][C-0000000a] pbx_builtins.c: Goto (macro-hangupcall,s,7)
[2020-11-05 11:48:27] VERBOSE[3974][C-0000000a] pbx.c: Executing [s@macro-hangupcall:7] Hangup(“PJSIP/anonymous-0000000a”, “”) in new stack
[2020-11-05 11:48:27] VERBOSE[3974][C-0000000a] app_macro.c: Spawn extension (macro-hangupcall, s, 7) exited non-zero on ‘PJSIP/anonymous-0000000a’ in macro ‘hangupcall’
[2020-11-05 11:48:27] VERBOSE[3974][C-0000000a] pbx.c: Spawn extension (ext-local, h, 1) exited non-zero on ‘PJSIP/anonymous-0000000a’
[2020-11-05 11:48:27] VERBOSE[3974][C-0000000a] app_stack.c: PJSIP/anonymous-0000000a Internal Gosub(crm-hangup,s,1) start
[2020-11-05 11:48:27] VERBOSE[3974][C-0000000a] pbx.c: Executing [s@crm-hangup:1] NoOp(“PJSIP/anonymous-0000000a”, “Sending Hangup to CRM”) in new stack
[2020-11-05 11:48:27] VERBOSE[3974][C-0000000a] pbx.c: Executing [s@crm-hangup:2] NoOp(“PJSIP/anonymous-0000000a”, “HANGUP CAUSE: 16”) in new stack
[2020-11-05 11:48:27] VERBOSE[3974][C-0000000a] pbx.c: Executing [s@crm-hangup:3] ExecIf(“PJSIP/anonymous-0000000a”, “0?Set(__CRM_VOICEMAIL=)”) in new stack
[2020-11-05 11:48:27] VERBOSE[3974][C-0000000a] pbx.c: Executing [s@crm-hangup:4] NoOp(“PJSIP/anonymous-0000000a”, “MASTER CHANNEL: 1604576899.10 = 1604576899.10”) in new stack
[2020-11-05 11:48:27] VERBOSE[3974][C-0000000a] pbx.c: Executing [s@crm-hangup:5] GotoIf(“PJSIP/anonymous-0000000a”, “0?return”) in new stack
[2020-11-05 11:48:27] VERBOSE[3974][C-0000000a] pbx.c: Executing [s@crm-hangup:6] Set(“PJSIP/anonymous-0000000a”, “__CRM_HANGUP=1”) in new stack
[2020-11-05 11:48:27] VERBOSE[3974][C-0000000a] pbx.c: Executing [s@crm-hangup:7] AGI(“PJSIP/anonymous-0000000a”, “agi://127.0.0.1/sangomacrm.agi”) in new stack
[2020-11-05 11:48:27] WARNING[2627] res_pjsip_registrar.c: Endpoint ‘anonymous’ has no configured AORs
[2020-11-05 11:48:27] VERBOSE[4004][C-0000000a] bridge_channel.c: Channel PJSIP/101-0000000b left ‘simple_bridge’ basic-bridge <8abed926-cbb3-4539-987c-55e888a94455>
[2020-11-05 11:48:27] VERBOSE[4004][C-0000000a] app_stack.c: PJSIP/101-0000000b Internal Gosub(crm-hangup,s,1) start
[2020-11-05 11:48:27] VERBOSE[4004][C-0000000a] pbx.c: Executing [s@crm-hangup:1] NoOp(“PJSIP/101-0000000b”, “Sending Hangup to CRM”) in new stack
[2020-11-05 11:48:27] VERBOSE[4004][C-0000000a] pbx.c: Executing [s@crm-hangup:2] NoOp(“PJSIP/101-0000000b”, “HANGUP CAUSE: 16”) in new stack
[2020-11-05 11:48:27] VERBOSE[4004][C-0000000a] pbx.c: Executing [s@crm-hangup:3] ExecIf(“PJSIP/101-0000000b”, “0?Set(__CRM_VOICEMAIL=)”) in new stack
[2020-11-05 11:48:27] VERBOSE[4004][C-0000000a] pbx.c: Executing [s@crm-hangup:4] NoOp(“PJSIP/101-0000000b”, “MASTER CHANNEL: 1604576899.11 = 1604576899.10”) in new stack
[2020-11-05 11:48:27] VERBOSE[4004][C-0000000a] pbx.c: Executing [s@crm-hangup:5] GotoIf(“PJSIP/101-0000000b”, “1?return”) in new stack
[2020-11-05 11:48:27] VERBOSE[4004][C-0000000a] pbx_builtins.c: Goto (crm-hangup,s,8)
[2020-11-05 11:48:27] VERBOSE[4004][C-0000000a] pbx.c: Executing [s@crm-hangup:8] Return(“PJSIP/101-0000000b”, “”) in new stack
[2020-11-05 11:48:27] VERBOSE[4004][C-0000000a] app_stack.c: Spawn extension (from-internal, , 1) exited non-zero on ‘PJSIP/101-0000000b’
[2020-11-05 11:48:27] VERBOSE[4004][C-0000000a] app_stack.c: PJSIP/101-0000000b Internal Gosub(crm-hangup,s,1) complete GOSUB_RETVAL=
[2020-11-05 11:48:27] WARNING[2627] res_pjsip_registrar.c: Endpoint ‘anonymous’ has no configured AORs
[2020-11-05 11:48:27] WARNING[2627] res_pjsip_registrar.c: Endpoint ‘anonymous’ has no configured AORs
[2020-11-05 11:48:27] WARNING[2627] res_pjsip_registrar.c: Endpoint ‘anonymous’ has no configured AORs
[2020-11-05 11:48:27] WARNING[2627] res_pjsip_registrar.c: Endpoint ‘anonymous’ has no configured AORs
[2020-11-05 11:48:27] VERBOSE[3974][C-0000000a] res_agi.c: <PJSIP/anonymous-0000000a>AGI Script agi://127.0.0.1/sangomacrm.agi completed, returning 0


(Itzik) #3

Still a codec issue.

Google “Asterisk No path to translate from” you’ll get a ton of posts.

Also, in the future, please post pastebin links, or select preformatted text. Otherwise, it’s very hard to read.


(Splows) #4

Thanks. Not sure if the pastebin is embedded but it’s here:

<iframe src=“https://pastebin.com/embed_iframe/MsxK6EYH” style=“border:none;width:100%”></iframe>

Still get the messages despite changing my phone to use PCMU as the prefered codec. I believe that is the same as ulaw.

Changed the sip settings to only have ulaw as well as the trunk but still the above. Am I missing a setting?


(Dave Burgess) #6

The elephant in the room is why are you allowing anonymous calls into your PBX? That should be stopping your calls way before the phones get involved. This is a trunk issue and with the recent spate of PBX Sangoma is seeing from Iran, Turkey, and Russia, it would really be a good idea to get your configuration under control.


(Splows) #7

Thanks. Yes, I will change once I’ve got things working. In the mean time why am I getting g723 references when I’ve disabled these codecs in my trunk and route?


#8

…and your phone?


(Splows) #9

Grandstream DP750.


#10

From the manual

Preferred Vocoder Configures vocoders in a preference list (up to 8 preferred vocoders) that
will be included with same order in SDP message. Vocoder types are G.711
A-/U-law, G.722, G.726-32, G.723, G.729, iLBC and OPUS

Make sure only G.711 is enabled


(Splows) #11

On the phone I only have PCMU enabled.


#12

I would use sngrep and see what codecs are being offered in the SDP negotiations and by whom, g723 is not usually used by VSP’s but maybe this one?


#13

At the Asterisk command prompt, type
pjsip set logger on
make a failing incoming call, paste the Asterisk log for the call (which will now include a SIP trace) at pastebin.freepbx.org and post the link here.


(Splows) #14

Thank you.
https://pastebin.freepbx.org/view/d13bb47f


#15

680513 [2020-11-05 17:46:03] VERBOSE[15996][C-00000004] pbx.c: Executing [441827818721@from-sip-external:1] NoOp(“PJSIP/anonymous-00000006”, “Received incoming SIP connection from unknown peer to 441827818721”) in new stack

OK, so FreePBX did not recognize the call as from your SIPgate trunk and it applied the default codec list, which apparently included G.723 at or near the top.

In Asterisk SIP Settings, General tab, scroll down to the Codec list, uncheck everything but ulaw and alaw, move alaw to the top, Submit, Apply Config, restart Asterisk and test.

You should also fix your trunk settings, because allowing anonymous calls is a security risk. Set the Match (Permit) field to include all IP addresses from which the provider can send you calls.


(Splows) #16

https://pastebin.freepbx.org/view/5cec4bd1

The trunk should be Diamondcard which is a pjsip trunk. My sipgate trunk is disabled at the moment.
I already only had ulaw enabled in the main general area but I have enabled u and a and moved alaw to the top.

Kind regards.


#17

In your DiamondCard pjsip trunk, set Match (Permit) to
69.65.34.202,69.65.34.219

and retest. With luck, it will at least recognize the trunk. If you post a new log, you must reissue
pjsip set logger on
because a reload cancels that setting.


(Splows) #18

Thanks. Done. Results here:
https://pastebin.freepbx.org/view/5141f888


#19

Diamondcard’s documentation seems to have a problem.

I looked at http://wiki.diamondcard.us/podwiki?page=PersNumbersSup
and found that sip.diamondcard.us has SRV records pointing to sip.diamondcard.us [69.65.34.202] and sip2.diamondcard.us [69.65.34.219]. But your call came from 69.65.34.216.
So, based on https://whois.domaintools.com/69.65.34.216
change Match (Permit) for the trunk to 69.65.34.192/27 and retest.


(Splows) #20

Thanks again Stewart.
That fixed the issue!

I’ve attached the log file below as I’d really like to know what the problem was for future reference and of course to help others should they experience the same.

Why the reference to codecs?

Results here:
https://pastebin.freepbx.org/view/78de5a9b