All pastes #903651 Raw Edit

Stuff

public text v1 · immutable
·published 2008-02-14 10:45 UTC
rendered paste body
Hi I make this code for using static trunk for extension where i have pluged fax machines. So in that case all my faxes go through normal ZAP/g0 line. But i have problem with returns to previous context. - i got hangup :<

[outbound-allroutes-custom]
include => outbound-allroutes-custom-custom
exten => _X.,1,ExecIf($["${CALLERID(num)}" = "912"],Set,THROUGH_OUT=1)
exten => _X.,n,ExecIf($["${CALLERID(num)}" = "904"],Set,THROUGH_OUT=1)
exten => _X.,n,ExecIf($["${CALLERID(num)}" = "902"],Set,THROUGH_OUT=1)
exten => _X.,n,ExecIf($["${CALLERID(num)}" = "915"],Set,THROUGH_OUT=2)
exten => _X.,n,ExecIf($["${CALLERID(num)}" = "914"],Set,THROUGH_OUT=2)
exten => _X.,n,ExecIf($["${CALLERID(num)}" = "913"],Set,THROUGH_OUT=2)
exten => _X.,n,GotoIf($["foo${THROUGH_OUT}" != "foo"]?skip-outbound,1) <------ if this fail he should end this context and go to bext steps on outbound-allroutes

exten => skip-outbound,1,Noop(Using Outboud trunk: ${THROUGH_OUT})
exten => skip-outbound,n,Macro(dialout-trunk,2,${EXTEN})

; end of [outbound-allroutes-custom]