<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>using ChanIsAvail</TITLE>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1106" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Looks correct to me, I'm using a similar setup... 
Sounds like maybe it's a bug in the ChanIsAvail&nbsp;App, like maybe it's 
hardcoded to look in sip.conf...</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; -Chris</FONT></DIV>
<BLOCKQUOTE 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
  <DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
  <DIV 
  style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B> 
  <A title=pp@nordit.dk href="mailto:pp@nordit.dk">Poul Pedersen</A> </DIV>
  <DIV style="FONT: 10pt arial"><B>To:</B> <A 
  title=asterisk-users@lists.digium.com 
  href="mailto:asterisk-users@lists.digium.com">asterisk-users@lists.digium.com</A> 
  </DIV>
  <DIV style="FONT: 10pt arial"><B>Sent:</B> Monday, August 23, 2004 3:15 
  AM</DIV>
  <DIV style="FONT: 10pt arial"><B>Subject:</B> [Asterisk-Users] using 
  ChanIsAvail</DIV>
  <DIV><BR></DIV><!-- Converted from text/plain format -->
  <P><FONT size=2>Hi</FONT> </P>
  <P><FONT size=2>I am trying to use ChanIsAvail to decide if a particular 
  extension is available in the sip channel</FONT> </P>
  <P><FONT size=2>I am using MySQL to hold my SIP friends.</FONT> <BR><FONT 
  size=2>and wy cvs version shows Asterisk CVS-08/02/04</FONT> </P>
  <P><FONT size=2>my intention is, that if the extension is not available in Sip 
  channel, I will send the call somewhere else</FONT> </P>
  <P><FONT size=2>my extensions file contains the following:</FONT> </P>
  <P><FONT size=2>exten =&gt; _[123]XX,1,ChanIsAvail(sip/${EXTEN})</FONT> 
  <BR><FONT size=2>exten =&gt; _[123]XX,2,dial(sip/${EXTEN},30)</FONT> <BR><FONT 
  size=2>exten =&gt; 
  _[123]XX,102,Dial(IAX2/sip01-xxxxxx:xxxxxxx@xxxxxxxxxxxx/${EXTEN})</FONT> 
  </P><BR>
  <P><FONT size=2>if I understand ChanIsAvail correctly this should give med 
  following:</FONT> </P>
  <P><FONT size=2>if i dial extension 111, and that is a local extension, it 
  dials the sip channel</FONT> <BR><FONT size=2>on the other hand, if extension 
  111 is not avaliable in the local sip channel, it dials on IAX2</FONT> </P>
  <P><FONT size=2>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</FONT></P><BR>
  <P><FONT size=2>when I have all SIP frinds in sip.conf it works, but it does 
  not when using MySQL</FONT> </P>
  <P><FONT size=2>is this a bug, or is ChanIsAvail not intended to work when SIP 
  frinds are in MySQL ??</FONT> </P>
  <P><FONT size=2>Kind regards</FONT> </P>
  <P><FONT size=2>Poul Pedersen</FONT> </P>
  <P>
  <HR>

  <P></P>_______________________________________________<BR>Asterisk-Users 
  mailing 
  list<BR>Asterisk-Users@lists.digium.com<BR>http://lists.digium.com/mailman/listinfo/asterisk-users<BR>To 
  UNSUBSCRIBE or update options visit:<BR>&nbsp;&nbsp; 
  http://lists.digium.com/mailman/listinfo/asterisk-users</BLOCKQUOTE></BODY></HTML>