Steve Kennedy
2006-Apr-10 08:07 UTC
[Asterisk-Users] SIP channel unavailable/busy/really not there
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 -- NetTek Ltd UK mob +44-(0)7775 755503 UK +44-(0)20 79932612 / US +1-(310)8577715 / Fax +44-(0)20 7483 2455 Skype/GoogleTalk/AIM/Gizmo stevekennedyuk / MSN steve@gbnet.net Euro Tech News Blog http://eurotechnews.blogspot.com
Peter Fern
2006-Apr-12 01:57 UTC
[Asterisk-Users] SIP channel unavailable/busy/really not there
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