[macro-trunkdial] ; Trunk dial macro (hangs up on a dialstatus that should terminate call) ; ${ARG1} - What to dial exten => s,1,Dial(${ARG1},90,Tt) exten => s,2,Goto(s-${DIALSTATUS},1) exten => s-NOANSWER,1,Hangup() exten => s-BUSY,1,Answer() exten => s-BUSY,2,Wait(0.3) exten => s-CHANUNAVAIL,1,Answer() exten => s-CHANUNAVAIL,2,Wait(0.3) exten => _s-.,1,NoOp [incoming] exten => s,1,Macro(trunkdial,DAHDI/1&DAHDI/2&DAHDI/3&DAHDI/4) exten => s,n,Hangup() [outgoing] exten => 201,1,Macro(trunkdial,DAHDI/1) exten => 202,1,Macro(trunkdial,DAHDI/2) exten => 203,1,Macro(trunkdial,DAHDI/3) exten => 204,1,Macro(trunkdial,DAHDI/4) exten => 205,1,Macro(trunkdial,DAHDI/5) exten => 206,1,Macro(trunkdial,DAHDI/6) exten => 207,1,Macro(trunkdial,DAHDI/7) exten => 208,1,Macro(trunkdial,DAHDI/8) exten => 209,1,Macro(trunkdial,DAHDI/9) exten => 210,1,Macro(trunkdial,DAHDI/10) exten => 211,1,Macro(trunkdial,DAHDI/11) exten => 212,1,Macro(trunkdial,DAHDI/12) // Выход на городские линии exten => 81,1,Macro(trunkdial,DAHDI/13) exten => 82,1,Macro(trunkdial,DAHDI/14) exten => 83,1,Macro(trunkdial,DAHDI/15) exten => 84,1,Macro(trunkdial,DAHDI/16) // Звонки в удаленный офис exten => _3XX,1,Dial(IAX2/192.168.1.2/${EXTEN},30) exten => _3XX,n,Busy()