Call Forwarding issue (DAHDI)

Hello,

I have a FreePBX 2.10 server that is linked to our Alcatel 4400 PBX.

I have just noticed that if someone rings an Alcatel extension and that extension is forwarded to another Alcatel extension the call fails. For some reason the forwarding request comes back to FreePBX with the correct number but it tries to forward it locally rather than back down the trunk. The call therefore fails with an no service.

Here is CLI info from an IP phone (3001) ringing an Alcatel extension (7909) that’s on a NoReply to 5004 (also an Alcatel Extension)

Any help or advice would be greatly appreciated.

Executing [s@macro-dialout-trunk:22] Dial(“SIP/3001-00001779”, “DAHDI/g0/7909,300,W”) in new stack
– Requested transfer capability: 0x00 - SPEECH
– Called DAHDI/g0/7909
– DAHDI/i1/7909-18d7 is proceeding passing it to SIP/3001-00001779
– DAHDI/i1/7909-18d7 is ringing
– DAHDI/i1/7909-18d7 is making progress passing it to SIP/3001-00001779
– Span 1: DAHDI/i1/7909-18d7 is CallRerouting/CallDeflection to ‘5004’.
– Now forwarding SIP/3001-00001779 to ‘Local/5004@from-zaptel’ (thanks to DAHDI/i1/7909-18d7)
[2012-05-22 14:02:18] NOTICE[19961]: app_dial.c:883 do_forward: Not accepting call completion offers from call-forward recipient Local/5004@from-zaptel-94f5;1
– Hungup ‘DAHDI/i1/7909-18d7’
– Executing [5004@from-zaptel:1] Set(“Local/5004@from-zaptel-94f5;2”, “DID=5004”) in new stack
– Executing [5004@from-zaptel:2] Goto(“Local/5004@from-zaptel-94f5;2”, “s,1”) in new stack
– Goto (from-zaptel,s,1)
– Executing [s@from-zaptel:1] NoOp(“Local/5004@from-zaptel-94f5;2”, “Entering from-dahdi with DID == 5004”) in new stack
– Executing [s@from-zaptel:2] Ringing(“Local/5004@from-zaptel-94f5;2”, “”) in new stack
– Local/5004@from-zaptel-94f5;1 is ringing
– Executing [s@from-zaptel:3] Set(“Local/5004@from-zaptel-94f5;2”, “DID=5004”) in new stack
– Executing [s@from-zaptel:4] NoOp(“Local/5004@from-zaptel-94f5;2”, “DID is now 5004”) in new stack
– Executing [s@from-zaptel:5] GotoIf(“Local/5004@from-zaptel-94f5;2”, “0?dahdiok:checkzap”) in new stack
– Goto (from-zaptel,s,6)
– Executing [s@from-zaptel:6] GotoIf(“Local/5004@from-zaptel-94f5;2”, “0?zapok:neither”) in new stack
– Goto (from-zaptel,s,7)
– Executing [s@from-zaptel:7] Goto(“Local/5004@from-zaptel-94f5;2”, “from-pstn,5004,1”) in new stack
– Goto (from-pstn,5004,1)
– Executing [5004@from-pstn:1] Set(“Local/5004@from-zaptel-94f5;2”, “__FROM_DID=5004”) in new stack
– Executing [5004@from-pstn:2] NoOp(“Local/5004@from-zaptel-94f5;2”, “Received an unknown call with DID set to 5004”) in new stack
– Executing [5004@from-pstn:3] Goto(“Local/5004@from-zaptel-94f5;2”, “s,a2”) in new stack
– Goto (from-pstn,s,2)
– Executing [s@from-pstn:2] Answer(“Local/5004@from-zaptel-94f5;2”, “”) in new stack
– Local/5004@from-zaptel-94f5;1 answered SIP/3001-00001779
– Executing [s@from-pstn:3] Wait(“Local/5004@from-zaptel-94f5;2”, “2”) in new stack
– Executing [s@from-pstn:4] Playback(“Local/5004@from-zaptel-94f5;2”, “ss-noservice”) in new stack
– <Local/5004@from-zaptel-94f5;2> Playing ‘ss-noservice.ulaw’ (language ‘en’)
– Executing [s@from-pstn:5] SayAlpha(“Local/5004@from-zaptel-94f5;2”, “5004”) in new stack
– <Local/5004@from-zaptel-94f5;2> Playing ‘digits/5.ulaw’ (language ‘en’)
– <Local/5004@from-zaptel-94f5;2> Playing ‘digits/0.ulaw’ (language ‘en’)
– <Local/5004@from-zaptel-94f5;2> Playing ‘digits/0.ulaw’ (language ‘en’)
– <Local/5004@from-zaptel-94f5;2> Playing ‘digits/4.ulaw’ (language ‘en’)
– Executing [h@macro-dialout-trunk:1] Macro(“SIP/3001-00001779”, “hangupcall,”) in new stack
– Executing [s@macro-hangupcall:1] GotoIf(“SIP/3001-00001779”, “1?theend”) in new stack
– Goto (macro-hangupcall,s,3)
– Executing [s@macro-hangupcall:3] Hangup(“SIP/3001-00001779”, “”) in new stack
== Spawn extension (macro-hangupcall, s, 3) exited non-zero on ‘SIP/3001-00001779’ in macro ‘hangupcall’
== Spawn extension (macro-dialout-trunk, h, 1) exited non-zero on ‘SIP/3001-00001779’
== Spawn extension (macro-dialout-trunk, s, 22) exited non-zero on ‘SIP/3001-00001779’ in macro ‘dialout-trunk’
== Spawn extension (from-pstn, s, 5) exited non-zero on ‘Local/5004@from-zaptel-94f5;2’
== Spawn extension (from-internal, 7909, 5) exited non-zero on ‘SIP/3001-00001779’
– Executing [h@from-pstn:1] Macro(“Local/5004@from-zaptel-94f5;2”, “hangupcall,”) in new stack
– Executing [s@macro-hangupcall:1] GotoIf(“Local/5004@from-zaptel-94f5;2”, “1?theend”) in new stack
– Goto (macro-hangupcall,s,3)
– Executing [s@macro-hangupcall:3] Hangup(“Local/5004@from-zaptel-94f5;2”, “”) in new stack
== Spawn extension (macro-hangupcall, s, 3) exited non-zero on ‘Local/5004@from-zaptel-94f5;2’ in macro ‘hangupcall’
== Spawn extension (from-pstn, h, 1) exited non-zero on ‘Local/5004@from-zaptel-94f5;2’

I have this same issue… did you find resolution? I’m looking at putting in a special dialplan in the from-custom-trunk context, but not sure where to start. Any help would be appreciated.

I did fix it but to be honest I can’t remember how. There have been a lot of quirky things that i’ve learnt and overcome while developing my system. Something to try would be to check what encoding you have. I had QSIG at the time but recently changed to QSIG/ABC_F to take advantage of more features on the alcatel side from the IP. This cleared up a lot of issues (but also introduced some new ones). My setup is slightly more complicated due to there being 2 cisco routers joining the Alcatel to Asterisk. about 98% of all of my problems were Cisco config related.

My encoding is QSIG. The only other option is ISDN for encoding. We don’t have an Alcatel switch on the other end - I think ours is an NEC with NEAX 2400 IPX circuit card.

It depends how the tie trunk’s context is if it is from-pstn then it won’t have access to internale contexts, try from-internal to start.