A past thread (http://www.freepbx.org/support/documentation/howtos/how-to-change-incoming-callerid) talks about how to strip out characters from the caller ID (+1 in our case). We’ve used the technique with asterisk 1.6.2 and FreePBX 2.9 without issue. Our extensions_custom.conf includes:
[from-trunk-sip-DefaultOut-custom]
exten => _X!,1,GotoIf($["${CALLERID(num):0:2}" != “+1”]?noplusatstart)
exten => _X!,n,NoOp(Changing Caller ID number from ${CALLERID(num)} to ${CALLERID(num):2})
exten => _X!,n,Set(CALLERID(num)=${CALLERID(num):2})
exten => _X!,n(noplusatstart),NoOp(Continuing with regular dialplan)
[from-trunk-sip-DefaultOut2-custom]
exten => _X!,1,GotoIf($["${CALLERID(num):0:2}" != “+1”]?noplusatstart)
exten => _X!,n,NoOp(Changing Caller ID number from ${CALLERID(num)} to ${CALLERID(num):2})
exten => _X!,n,Set(CALLERID(num)=${CALLERID(num):2})
exten => _X!,n(noplusatstart),NoOp(Continuing with regular dialplan)
when our trunks are called “DefaultOut” and “DefaultOut2”. When using asterisk 1.8 the custom context is not used even though the trunk name is the same. The dialplan shows the following (MYNUM replaces actual number). It shows that the custom context is not executed.
-- Executing [+1MYNUM@from-trunk-sip-DefaultOut2:1] Set("SIP/DefaultOut2-00000001", "GROUP()=OUT_2") in new stack
-- Executing [+1MYNUM@from-trunk-sip-DefaultOut2:2] Goto("SIP/DefaultOut2-00000001", "from-trunk,+1MYNUM,1") in new stack
-- Goto (from-trunk,+1MYNUM,1)
-- Executing [+1MYNUM@from-trunk:1] Set("SIP/DefaultOut2-00000001", "__FROM_DID=+1MYNUM") in new stack
-- Executing [+1MYNUM@from-trunk:2] NoOp("SIP/DefaultOut2-00000001", "Received an unknown call with DID set to +1MYNUM") in new stack
-- Executing [+1MYNUM@from-trunk:3] Goto("SIP/DefaultOut2-00000001", "s,a2") in new stack
-- Goto (from-trunk,s,2)
-- Executing [s@from-trunk:2] Answer("SIP/DefaultOut2-00000001", "") in new stack
-- Executing [s@from-trunk:3] Wait("SIP/DefaultOut2-00000001", "2") in new stack
-- Executing [s@from-trunk:4] Playback("SIP/DefaultOut2-00000001", "ss-noservice") in new stack
-- <SIP/DefaultOut2-00000001> Playing 'ss-noservice.slin' (language 'en')
Any ideas on why this would be the case?
Rob