<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:st1="urn:schemas-microsoft-com:office:smarttags" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]--><o:SmartTagType
namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="PersonName"/>
<!--[if !mso]>
<style>
st1\:*{behavior:url(#default#ieooui) }
</style>
<![endif]-->
<style>
<!--
/* Font Definitions */
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;}
p.Numbered, li.Numbered, div.Numbered
        {margin-top:0in;
        margin-right:0in;
        margin-bottom:0in;
        margin-left:.25in;
        margin-bottom:.0001pt;
        text-indent:-.25in;
        mso-list:l0 level1 lfo2;
        font-size:12.0pt;
        font-family:"Times New Roman";}
p.numbered0, li.numbered0, div.numbered0
        {margin-top:0in;
        margin-right:0in;
        margin-bottom:0in;
        margin-left:.25in;
        margin-bottom:.0001pt;
        text-indent:-.25in;
        mso-list:l0 level1 lfo4;
        font-size:12.0pt;
        font-family:"Times New Roman";}
span.EmailStyle19
        {mso-style-type:personal;
        font-family:Arial;
        color:windowtext;}
span.EmailStyle20
        {mso-style-type:personal-reply;
        font-family:Arial;
        color:navy;}
@page Section1
        {size:8.5in 11.0in;
        margin:.8in .8in .8in .8in;}
div.Section1
        {page:Section1;}
/* List Definitions */
@list l0
        {mso-list-id:412971070;
        mso-list-type:hybrid;
        mso-list-template-ids:1618259210 -1710466462 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;}
@list l0:level1
        {mso-level-start-at:0;
        mso-level-number-format:bullet;
        mso-level-style-link:Numbered;
        mso-level-text:\F0B7;
        mso-level-tab-stop:.25in;
        mso-level-number-position:left;
        margin-left:.25in;
        text-indent:-.25in;
        font-family:Symbol;
        mso-fareast-font-family:"Times New Roman";
        mso-bidi-font-family:"Times New Roman";}
@list l0:level2
        {mso-level-tab-stop:1.0in;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level3
        {mso-level-tab-stop:1.5in;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level4
        {mso-level-tab-stop:2.0in;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level5
        {mso-level-tab-stop:2.5in;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level6
        {mso-level-tab-stop:3.0in;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level7
        {mso-level-tab-stop:3.5in;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level8
        {mso-level-tab-stop:4.0in;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level9
        {mso-level-tab-stop:4.5in;
        mso-level-number-position:left;
        text-indent:-.25in;}
ol
        {margin-bottom:0in;}
ul
        {margin-bottom:0in;}
-->
</style>
</head>
<body lang=EN-US link=blue vlink=purple>
<div class=Section1>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Using a Sangoma A200 FXO card, is there
any way for Freeswitch to automatically detect a disconnected CO line and use
another FXO channel?<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Thanks,<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Robert<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<div>
<div class=MsoNormal align=center style='text-align:center'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>
<hr size=3 width="100%" align=center tabindex=-1>
</span></font></div>
<p class=MsoNormal><b><font size=2 face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma;font-weight:bold'>From:</span></font></b><font size=2
face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'> <st1:PersonName
w:st="on">Robert Hadley</st1:PersonName> [mailto:robert.hadley@teotech.com] <br>
<b><span style='font-weight:bold'>Sent:</span></b> Thursday, February 25, 2010
4:13 PM<br>
<b><span style='font-weight:bold'>To:</span></b> <st1:PersonName w:st="on">freeswitch-users@lists.freeswitch.org</st1:PersonName><br>
<b><span style='font-weight:bold'>Subject:</span></b> [Freeswitch-users]
Freeswitch/Openzap dials out on disconnected FXOline</span></font><o:p></o:p></p>
</div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face="Times New Roman"><span style='font-size:
10.0pt'>When dialing out, Freeswitch/Openzap is not detecting that an analog
FXO channel is disconnected and tries dialing out on the channel anyway.
No error is reported. The call doesn’t timeout until a minute
later. Shouldn’t Freeswitch/Openzap skip over a disconnected
channel to the next connected channel?<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face="Times New Roman"><span style='font-size:
10.0pt'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face="Times New Roman"><span style='font-size:
10.0pt'>I have configured a Sangoma A200 FXO card as a FXO span.<o:p></o:p></span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New"'><o:p> </o:p></span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New"'>[span wanpipe FXO]<o:p></o:p></span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New"'>name => PSTN Line 1<o:p></o:p></span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New"'>number => 4253491059<o:p></o:p></span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New"'>fxo-channel => 2:3<o:p></o:p></span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New"'>name => PSTN Line 2<o:p></o:p></span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New"'>number => 4253491058<o:p></o:p></span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New"'>fxo-channel => 2:4<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face="Times New Roman"><span style='font-size:
10.0pt'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face="Times New Roman"><span style='font-size:
10.0pt'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face="Times New Roman"><span style='font-size:
10.0pt'>The wanpipe driver does detect and report when a CO line is connected
or disconnected (in /var/log/messages), and Freeswitch/Openzap gets an event as
reported in the log.<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face="Times New Roman"><span style='font-size:
10.0pt'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=1 face="Courier New"><span style='font-size:8.0pt;
font-family:"Courier New"'>/var/log/messages: Feb 25 15:23:10 roberth-c53
kernel: wanpipe2: Module 3: FXO Line is disconnected!<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=1 face="Courier New"><span style='font-size:8.0pt;
font-family:"Courier New"'>FS_CLI: 2010-02-25 15:23:10.711604 [DEBUG]
ozmod_analog.c:788 EVENT [ALARM_TRAP][3:1] STATE [DOWN]<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=1 face="Courier New"><span style='font-size:8.0pt;
font-family:"Courier New"'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=1 face="Courier New"><span style='font-size:8.0pt;
font-family:"Courier New"'>/var/log/messages: Feb 25 15:23:44 roberth-c53
kernel: wanpipe2: Module 4: FXO Line is connected!<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=1 face="Courier New"><span style='font-size:8.0pt;
font-family:"Courier New"'>FS_CLI: 2010-02-25 15:23:44.901979 [DEBUG] ozmod_analog.c:788
EVENT [ALARM_CLEAR][3:2] STATE [DOWN]<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face="Times New Roman"><span style='font-size:
10.0pt'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face="Times New Roman"><span style='font-size:
10.0pt'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face="Times New Roman"><span style='font-size:
10.0pt'>I have the dialplan configured to use the next available port in the
FXO span (there will be more than 2 channels later).<o:p></o:p></span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New"'><o:p> </o:p></span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New"'><extension
name="OutgoingFXO"><o:p></o:p></span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New"'> <condition
field="destination_number" expression="^7(\d+)$"><o:p></o:p></span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New"'> <action
application="bridge" data="openzap/FXO/a/$1"/><o:p></o:p></span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New"'> </condition><o:p></o:p></span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New"'></extension><o:p></o:p></span></font></p>
<p class=MsoNormal><font size=1 face="Courier New"><span style='font-size:8.0pt;
font-family:"Courier New"'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face="Times New Roman"><span style='font-size:
10.0pt'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face="Times New Roman"><span style='font-size:
10.0pt'>Here is a portion of the log when that shows dialing out on a
disconnected analog FXO channel.<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face="Times New Roman"><span style='font-size:
10.0pt'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=1 face="Courier New"><span style='font-size:8.0pt;
font-family:"Courier New"'>EXECUTE sofia/internal/5410@192.168.72.45:5060 bridge(openzap/FXO/a/93491045)<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=1 face="Courier New"><span style='font-size:8.0pt;
font-family:"Courier New"'>2010-02-25 15:26:17.891443 [DEBUG] mod_openzap.c:366
Set codec PCMU 20ms<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=1 face="Courier New"><span style='font-size:8.0pt;
font-family:"Courier New"'>2010-02-25 15:26:17.891443 [DEBUG]
mod_openzap.c:1257 Connect outbound channel OpenZAP/3:1/93491045<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=1 face="Courier New"><span style='font-size:8.0pt;
font-family:"Courier New"'>2010-02-25 15:26:17.891443 [NOTICE] switch_channel.c:642
New Channel OpenZAP/3:1/93491045 [3c8f46f5-77a8-498f-a51c-015837746cb7]<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=1 face="Courier New"><span style='font-size:8.0pt;
font-family:"Courier New"'>2010-02-25 15:26:17.891443 [DEBUG]
mod_openzap.c:1269 (OpenZAP/3:1/93491045) State Change CS_NEW -> CS_INIT<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=1 face="Courier New"><span style='font-size:8.0pt;
font-family:"Courier New"'>2010-02-25 15:26:17.891443 [DEBUG]
switch_core_session.c:1019 Send signal OpenZAP/3:1/93491045 [BREAK]<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=1 face="Courier New"><span style='font-size:8.0pt;
font-family:"Courier New"'>2010-02-25 15:26:17.891443 [DEBUG] ozmod_analog.c:59
Changing state on 3:1 from DOWN to DIALING<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=1 face="Courier New"><span style='font-size:8.0pt;
font-family:"Courier New"'>2010-02-25 15:26:17.891443 [WARNING]
switch_core_session.c:486 OpenZAP/3:1/93491045 does not support the proxy
feature, disabling.<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=1 face="Courier New"><span style='font-size:8.0pt;
font-family:"Courier New"'>2010-02-25 15:26:17.891443 [DEBUG]
ozmod_analog.c:279 ANALOG CHANNEL thread starting.<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=1 face="Courier New"><span style='font-size:8.0pt;
font-family:"Courier New"'>2010-02-25 15:26:17.891443 [DEBUG]
ozmod_analog.c:450 Executing state handler on 3:1 for DIALING<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=1 face="Courier New"><span style='font-size:8.0pt;
font-family:"Courier New"'>2010-02-25 15:26:17.891443 [DEBUG]
switch_core_state_machine.c:314 (OpenZAP/3:1/93491045) Running State Change
CS_INIT<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=1 face="Courier New"><span style='font-size:8.0pt;
font-family:"Courier New"'>2010-02-25 15:26:17.891443 [DEBUG]
switch_core_state_machine.c:338 (OpenZAP/3:1/93491045) State INIT<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=1 face="Courier New"><span style='font-size:8.0pt;
font-family:"Courier New"'>2010-02-25 15:26:17.891443 [DEBUG] mod_openzap.c:394
(OpenZAP/3:1/93491045) State Change CS_INIT -> CS_ROUTING<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=1 face="Courier New"><span style='font-size:8.0pt;
font-family:"Courier New"'>2010-02-25 15:26:17.891443 [DEBUG]
switch_core_session.c:1019 Send signal OpenZAP/3:1/93491045 [BREAK]<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=1 face="Courier New"><span style='font-size:8.0pt;
font-family:"Courier New"'>2010-02-25 15:26:17.891443 [DEBUG]
switch_core_state_machine.c:338 (OpenZAP/3:1/93491045) State INIT going to
sleep<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=1 face="Courier New"><span style='font-size:8.0pt;
font-family:"Courier New"'>2010-02-25 15:26:17.891443 [DEBUG]
switch_core_state_machine.c:314 (OpenZAP/3:1/93491045) Running State Change
CS_ROUTING<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=1 face="Courier New"><span style='font-size:8.0pt;
font-family:"Courier New"'>2010-02-25 15:26:17.891443 [DEBUG]
switch_core_state_machine.c:341 (OpenZAP/3:1/93491045) State ROUTING<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=1 face="Courier New"><span style='font-size:8.0pt;
font-family:"Courier New"'>2010-02-25 15:26:17.891443 [DEBUG] mod_openzap.c:417
OpenZAP/3:1/93491045 CHANNEL ROUTING<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=1 face="Courier New"><span style='font-size:8.0pt;
font-family:"Courier New"'>2010-02-25 15:26:17.891443 [DEBUG]
switch_ivr_originate.c:66 (OpenZAP/3:1/93491045) State Change CS_ROUTING ->
CS_CONSUME_MEDIA<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=1 face="Courier New"><span style='font-size:8.0pt;
font-family:"Courier New"'>2010-02-25 15:26:17.891443 [DEBUG]
switch_core_session.c:1019 Send signal OpenZAP/3:1/93491045 [BREAK]<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=1 face="Courier New"><span style='font-size:8.0pt;
font-family:"Courier New"'>2010-02-25 15:26:17.891443 [DEBUG]
switch_core_state_machine.c:341 (OpenZAP/3:1/93491045) State ROUTING going to
sleep<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=1 face="Courier New"><span style='font-size:8.0pt;
font-family:"Courier New"'>2010-02-25 15:26:17.891443 [DEBUG]
switch_core_state_machine.c:314 (OpenZAP/3:1/93491045) Running State Change
CS_CONSUME_MEDIA<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=1 face="Courier New"><span style='font-size:8.0pt;
font-family:"Courier New"'>2010-02-25 15:26:17.891443 [DEBUG]
switch_core_state_machine.c:360 (OpenZAP/3:1/93491045) State CONSUME_MEDIA<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=1 face="Courier New"><span style='font-size:8.0pt;
font-family:"Courier New"'>2010-02-25 15:26:17.891443 [DEBUG]
switch_core_state_machine.c:360 (OpenZAP/3:1/93491045) State CONSUME_MEDIA
going to sleep<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face="Times New Roman"><span style='font-size:
10.0pt'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face="Times New Roman"><span style='font-size:
10.0pt'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face="Times New Roman"><span style='font-size:
10.0pt'>Thanks,<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face="Times New Roman"><span style='font-size:
10.0pt'>Robert</span></font><font size=2 face=Arial><span style='font-size:
10.0pt;font-family:Arial'><o:p></o:p></span></font></p>
</div>
</body>
</html>