CLI> core show application ChanIsAvail
-= Info about application 'ChanIsAvail' =-
[Synopsis]
Check channel availability
[Description]
This application will check to see if any of the specified channels are
available.
This application sets the following channel variables:
${AVAILCHAN}: The name of the available channel, if one exists
${AVAILORIGCHAN}: The canonical channel name that was used to create the
channel
${AVAILSTATUS}: The device state for the device
${AVAILCAUSECODE}: The cause code returned when requesting the channel
[Syntax]
ChanIsAvail([Technology2/Resource2[&...]][,options])
[Arguments]
Technology2/Resource2
Optional extra devices to check
If you need more then one enter them as Technology2/Resource2&Te
chnology3/Resourse3&.....
Technology/Resource
Specification of the device(s) to check. These must be in the forma
of 'Technology/Resource', where <Technology> represents a particula
channel driver, and <Resource> represents a resource available to th
particular channel driver.
options
a: Check for all available channels, not only the first one
s: Consider the channel unavailable if the channel is in use at all
t: Simply checks if specified channels exist in the channel list
exten => s,n,Set(VOIPCHECK=0)
exten => s,n,Set(PEERCHECK1=myprovider-out) ; SIP peer name as defined in sip.conf
; Make sure to have qualify=yes enabled for this SIP peer!
exten => s,n,NoOp(-- ${PEERCHECK1} status: ${SIPPEER(${PEERCHECK1}:status)} --)
exten => s,n,ExecIf($["${SIPPEER(${PEERCHECK1}:status):0:2}" = “OK”]|Set|VOIPCHECK=1)
; Now route and dial any way you like based on the value of VOIPCHECK
and then route it based on the value of VOIPCHECK with the gotoIF command
AllooZef писал(а): У них на сайте висит: "Мы этого не делаем".
В вашем случае - неизвестность, что там вам возвращает провайдер при поытке Dial через транк, по которому течёт разговор вашего коллеги, входящий, или исходящий - не важно. Провайдер по неразумению может возвращать отлуп SIP 500 - Internal server error? или SIP 488 (NOT ACCEPTED HERE).AllooZef писал(а):Читал-читал, так и не понял в СИПе под доступным понимается зарегистрированный или тот, по которому в данный момент не звонят?
С одной стороны: "it is primarily to tell you whether it would be possible to send a call there." С другой оно возвращает статускоды. И что тогда понимается под busy?
У них на сайте висит: "Мы этого не делаем".
Сейчас этот форум просматривают: нет зарегистрированных пользователей и гости: 23