[Asterisk-Users] SIP channel unavailable/busy/really not there

Peter Fern pete at keypoint.com.au
Wed Apr 12 01:57:03 MST 2006


Steve Kennedy wrote:

>Is there a way to differentiate between a SIP address which hasn't
>registered (but is within sip.conf) and one that's not there at all
>(i.e. not in sip.conf) using a straight dialplan.
>
>I'd like to differentiate actions depending the state of a SIP device
>and whether it's in my config or not (if that makes sense, basic automap
>of dial-in lines to sip phones, but if they've turned it off, different
>error from a line not mapped to a phone).
>
>Asterisk-1.2.6 ...
>
>
>Steve
>
>  
>
Might do the trick for you:


  -= 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





More information about the asterisk-users mailing list