Re: переключение между двух провайдеров
show application ChanIsAvail
-= Info about application 'ChanIsAvail' =-
[Synopsis]
Check channel availability
[Description]
ChanIsAvail(Technology/resource[&Technology2/resource2...][|options]):
This application will check to see if any of the specified channels are
available. The following variables will be set by this application:
${AVAILCHAN} - the name of the available channel, if one exists
${AVAILORIGCHAN} - the canonical channel name that was used to create the channel
${AVAILSTATUS} - the status code for the available channel
Options:
s - Consider the channel unavailable if the channel is in use at all
j - Support jumping to priority n+101 if no channel is available
искал вот нашёл.
Осталось посмотреть пример приминения или самому опробовать.
Вот примеры тоже нашёл:
exten => _X.,1,ChanIsAvail(SIP/sipnet&Zap/1)
exten => _X.,2,Cut(theChannel=AVAILCHAN,,1)
exten => _X.,3,Dial(${theChannel}/${EXTEN})
exten => _X.,4,Hangup
exten => _X.,102,Playback(all-circuits-busy-now)
exten => _X.,103,Hangup
А это макрос
Код:
exten => _X.,1,Macro(mydial,${EXTEN})
[macro-mydial]
exten => s,1,ChanIsAvail(Zap/2&Zap/1)
exten => s,2,Cut(theChannel=AVAILCHAN,,1)
exten => s,3,Dial(${theChannel}/${ARG1})
exten => s,4,Hangup
exten => s,102,Playback(all-circuits-busy-now)
exten => s,103,Hangup
|