[Asterisk-Users] using ChanIsAvail

Poul Pedersen pp at nordit.dk
Mon Aug 23 03:15:16 MST 2004


Hi

I am trying to use ChanIsAvail to decide if a particular extension is
available in the sip channel

I am using MySQL to hold my SIP friends.
and wy cvs version shows Asterisk CVS-08/02/04

my intention is, that if the extension is not available in Sip channel, I
will send the call somewhere else

my extensions file contains the following:

exten => _[123]XX,1,ChanIsAvail(sip/${EXTEN})
exten => _[123]XX,2,dial(sip/${EXTEN},30)
exten => _[123]XX,102,Dial(IAX2/sip01-xxxxxx:xxxxxxx at xxxxxxxxxxxx/${EXTEN})


if I understand ChanIsAvail correctly this should give med following:

if i dial extension 111, and that is a local extension, it dials the sip
channel
on the other hand, if extension 111 is not avaliable in the local sip
channel, it dials on IAX2

But it does not work, if 111 is not a local extension the dial in priority 2
returns with -1, in my opinion it should never have been executed


when I have all SIP frinds in sip.conf it works, but it does not when using
MySQL

is this a bug, or is ChanIsAvail not intended to work when SIP frinds are in
MySQL ??

Kind regards

Poul Pedersen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20040823/a998e0c1/attachment.htm


More information about the asterisk-users mailing list