Asterisk calls to a forwarded CME fail

Hi All,

Hopefully someone can point me in the right direction for this, I have recently changed a CME server at one of my clients to an AsteriskNow / Free PBX install and since then when they dial an extension at their head office CME server the call initially works but if not answered and is forwarded to the head office reception the call fails saying the reception extension is unreachable. The call log is below (I have tried to keep it as short as possible without losing too much detail) Any suggestions are appreciated

– Executing [202@from-internal:7] Macro(“SIP/575-000001db”, “dialout-trunk,6,202,off”) in new stack
– Executing [s@macro-dialout-trunk:1] Set(“SIP/575-000001db”, “DIAL_TRUNK=6”) in new stack
– Executing [s@macro-dialout-trunk:4] Set(“SIP/575-000001db”, “DIAL_NUMBER=202”) in new stack
– Executing [s@macro-dialout-trunk:5] Set(“SIP/575-000001db”, “DIAL_TRUNK_OPTIONS=Ttr”) in new stack
– Executing [s@macro-dialout-trunk:6] Set(“SIP/575-000001db”, “OUTBOUND_GROUP=OUT_6”) in new stack
– Executing [s@macro-dialout-trunk:13] Set(“SIP/575-000001db”, “OUTNUM=202”) in new stack
– Executing [s@macro-dialout-trunk:14] Set(“SIP/575-000001db”, “custom=SIP/RRL-SUB”) in new stack
– Executing [s@macro-dialout-trunk:19] ExecIf(“SIP/575-000001db”, “1?Set(CONNECTEDLINE(num,i)=202)”) in new stack
– Executing [s@macro-dialout-trunk:20] ExecIf(“SIP/575-000001db”, “1?Set(CONNECTEDLINE(name,i)=CID:575)”) in new stack
– Executing [s@macro-dialout-trunk:21] GotoIf(“SIP/575-000001db”, “0?customtrunk”) in new stack
– Executing [s@macro-dialout-trunk:22] Dial(“SIP/575-000001db”, “SIP/RRL-SUB/202,300,Ttr”) in new stack
== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
– Called SIP/RRL-SUB/202
– SIP/RRL-SUB-000001dc is ringing
– Got SIP response 302 “Moved Temporarily” back from 172.16.16.34:5060
– Now forwarding SIP/575-000001db to ‘Local/200@from-trunk-sip-RRL-SUB’ (thanks to SIP/RRL-SUB-000001dc)
[2017-04-12 12:05:00] NOTICE[30422][C-000000ff]: app_dial.c:958 do_forward: Not accepting call completion offers from call-forward recipient Local/200@from-trunk-sip-RRL-SUB-00000045;1
– Executing [200@from-trunk-sip-RRL-SUB:1] Set(“Local/200@from-trunk-sip-RRL-SUB-00000045;2”, “GROUP()=OUT_6”) in new stack
– Executing [200@from-trunk-sip-RRL-SUB:2] Goto(“Local/200@from-trunk-sip-RRL-SUB-00000045;2”, “from-trunk,200,1”) in new stack
– Goto (from-trunk,200,1)
– Executing [200@from-trunk:1] Set(“Local/200@from-trunk-sip-RRL-SUB-00000045;2”, “__FROM_DID=200”) in new stack
– Executing [200@from-trunk:2] NoOp(“Local/200@from-trunk-sip-RRL-SUB-00000045;2”, “Received an unknown call with DID set to 200”) in new stack
– Executing [200@from-trunk:3] Goto(“Local/200@from-trunk-sip-RRL-SUB-00000045;2”, “s,a2”) in new stack
– Goto (from-trunk,s,2)
– Executing [s@from-trunk:2] Answer(“Local/200@from-trunk-sip-RRL-SUB-00000045;2”, “”) in new stack
– Local/200@from-trunk-sip-RRL-SUB-00000045;1 answered SIP/575-000001db
> 0xe51fa0 – Probation passed - setting RTP source address to 192.168.91.83:17724
[2017-04-12 12:05:00] WARNING[30428][C-000000ff]: chan_sip.c:22193 func_header_read: This function can only be used on SIP channels.
– Executing [s@from-trunk:3] Log(“Local/200@from-trunk-sip-RRL-SUB-00000045;2”, "WARNING,Friendly Scanner from ") in new stack
[2017-04-12 12:05:00] WARNING[30428][C-000000ff]: Ext. s:3 @ from-trunk: Friendly Scanner from
– Executing [s@from-trunk:4] Wait(“Local/200@from-trunk-sip-RRL-SUB-00000045;2”, “2”) in new stack
– Executing [s@from-trunk:5] Playback(“Local/200@from-trunk-sip-RRL-SUB-00000045;2”, “ss-noservice”) in new stack
– <Local/200@from-trunk-sip-RRL-SUB-00000045;2> Playing ‘ss-noservice.gsm’ (language ‘en’)
– Executing [s@from-trunk:6] SayAlpha(“Local/200@from-trunk-sip-RRL-SUB-00000045;2”, “200”) in new stack
– <Local/200@from-trunk-sip-RRL-SUB-00000045;2> Playing ‘digits/2.gsm’ (language ‘en’)
– <Local/200@from-trunk-sip-RRL-SUB-00000045;2> Playing ‘digits/0.gsm’ (language ‘en’)
– <Local/200@from-trunk-sip-RRL-SUB-00000045;2> Playing ‘digits/0.gsm’ (language ‘en’)

Hello @Mimbanis,

Here is your problem:

-- Called SIP/RRL-SUB/202
-- SIP/RRL-SUB-000001dc is ringing
-- Got SIP response 302 "Moved Temporarily" back from 172.16.16.34:5060
-- Now forwarding SIP/575-000001db to 'Local/200@from-trunk-sip-RRL-SUB' (thanks to SIP/RRL-SUB-000001dc)
[2017-04-12 12:05:00] NOTICE[30422][C-000000ff]: app_dial.c:958 do_forward: Not accepting call completion offers from call-forward recipient Local/200@from-trunk-sip-RRL-SUB-00000045;1 

Check the forwarding settings of the 202 extension (forwards the call to 200 extension for some reason).

Thank you,

Daniel Friedman
Trixton LTD.

Hi Daniel,

Thanks, the forwarding settings are stock standard CME:
call-forward busy 200
call-forward noan 200 timeout 23

Is there a way to get asterisk to follow the forwarding in the same way as the CME was capable of?

Simon

Hi @Mimbanis,

The 202 extension (the CME) returns a sip forwarding to extension 200 (Local/200@from-trunk-sip-RRL-SUB).
Probably your context on the trunk to the CME is set to from-pstn or no context at all (the default context is from-sip-external), and then it goes to the inbound routes of your Freepbx system.

Since there is no specific route to 200 it falls back to the default context from-sip-external.

I suggest to add internal context to your sip trunk settings towards the CME (context=from-internal) and make sure that you have a proper outbound route to the CME’s extensions (2XX).

Thank you,

Daniel Friedman
Trixton LTD.

Hi Daniel,

Thanks I will give that a try.

Simon