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 format
  of  'Technology/Resource', where <Technology> represents a particular
  channel driver, and <Resource> represents a resource available to that
  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

[See Also]

Пример

[from-test]
exten => _X.,1,Macro(chanisavail,${EXTEN})

[macro-chanisavail]
exten => s,1,Set(_TRK=SIP/siptrunk)
exten => s,n,ChanIsAvail(${TRK}1&${TRK}2&${TRK}3&${TRK}4,a)
exten => s,n,Dial(${CUT(AVAILCHAN,,1)}/${ARG1},,e)

CUT

Команды диалплана Asterisk

Только авторизованные участники могут оставлять комментарии.
  • asterisk/app/chanisavail.txt
  • Последние изменения: 2016/10/26