Code:
exten => *72,1,NoCDR()
exten => *72,n,Answer
exten => *72,n,Wait(1)
exten => *72,n,Macro(user-callerid,)
exten => *72,n,Playback(call-fwd-unconditional)
exten => *72,n,Playback(please-enter-your&extension)
exten => *72,n,Read(fromext,then-press-pound,,,,)
exten => *72,n,Set(fromext=${IF($["foo${fromext}"="foo"]?${AMPUSER}:${fromext})})
exten => *72,n,Wait(1)
exten => *72,n(startread),Playback(ent-target-attendant)
exten => *72,n,Read(toext,then-press-pound,,,,)
exten => *72,n,GotoIf($["foo${toext}"="foo"]?startread)
exten => *72,n,Wait(1)
exten => *72,n,Set(DB(CFIM/${fromext})=${toext})
exten => *72,n,Set(STATE=BUSY)
exten => *72,n,Gosub(app-cf-on,sstate,1)
exten => *72,n(hook_1),Playback(call-fwd-unconditional&for&extension)
exten => *72,n,SayDigits(${fromext})
exten => *72,n,Playback(is-set-to)
exten => *72,n,SayDigits(${toext})
exten => *72,n,Macro(hangupcall,)
exten => _*72.,1,NoCDR()
exten => _*72.,n,Answer
exten => _*72.,n,Wait(1)
exten => _*72.,n,Macro(user-callerid,)
exten => _*72.,n,Set(fromext=${AMPUSER})
exten => _*72.,n,Set(toext=${EXTEN:3})
exten => _*72.,n,Set(DB(CFIM/${fromext})=${toext})
exten => _*72.,n,Set(STATE=BUSY)
exten => _*72.,n,Gosub(app-cf-on,sstate,1)
exten => _*72.,n(hook_2),Playback(call-fwd-unconditional&for&extension)
exten => _*72.,n,SayDigits(${fromext})
exten => _*72.,n,Playback(is-set-to)
exten => _*72.,n,SayDigits(${toext})
exten => _*72.,n,Macro(hangupcall,)
Si je tape 0*720123456789 pour programmer mon renvoi, voila la CLI :
Code:
-- Executing [*720123456789@DLPN_DialPlan1:1] NoCDR("SIP/301-000000dc", "") in new stack
-- Executing [*720123456789@DLPN_DialPlan1:2] Answer("SIP/301-000000dc", "") in new stack
-- Executing [*720123456789@DLPN_DialPlan1:3] Wait("SIP/301-000000dc", "1") in new stack
-- Executing [*720123456789@DLPN_DialPlan1:4] Macro("SIP/301-000000dc", "user-callerid,") in new stack
[Jul 8 08:52:21] WARNING[18937]: app_macro.c:309 _macro_exec: No such context 'macro-user-callerid' for macro 'user-callerid'
-- Executing [*720123456789@DLPN_DialPlan1:5] Set("SIP/301-000000dc", "fromext=") in new stack
-- Executing [*720123456789@DLPN_DialPlan1:6] Set("SIP/301-000000dc", "toext=0123456789") in new stack
-- Executing [*720123456789@DLPN_DialPlan1:7] Set("SIP/301-000000dc", "DB(CFIM/)=0123456789") in new stack
-- Executing [*720123456789@DLPN_DialPlan1:8] Set("SIP/301-000000dc", "STATE=BUSY") in new stack
-- Executing [*720123456789@DLPN_DialPlan1:9] Gosub("SIP/301-000000dc", "app-cf-on,sstate,1") in new stack
[Jul 8 08:52:21] ERROR[18937]: app_stack.c:420 gosub_exec: Attempt to reach a non-existent destination for gosub: (Context:app-cf-on, Extension:sstate, Priority:1)
== Spawn extension (DLPN_DialPlan1, *720123456789, 10) exited non-zero on 'SIP/301-000000dc'
avec un joli Error. Une idée ? Merci