<html><body>
<div style="font-family: tahoma; color: rgb(26, 26, 26); font-weight: 400;
font-style: normal;">
        I am using dahdi for my tdm card. I have 1 FXO and 1 FXS installed.</div>
<div style="font-family: tahoma; color: rgb(26, 26, 26); font-weight: 400;
font-style: normal;">
        At the moment I am trying to check if I can bridge the 2 ports, so
freeswitch will just pass the call.</div>
<div style="font-family: tahoma; color: rgb(26, 26, 26); font-weight: 400;
font-style: normal;">
         </div>
<ol>
        <li>
                1. If I dial the phone number of the POTS line that is connected to the
FXO port, then freeswitch bridges it to the phone that is connected to the
FXS port, I answer the phone and it works well.</li>
        <li>
                The other way around doesn't work though. The simplest test that I am
doing is that if I pickup the handset and dial any number, I want freeswitch
to bridge the call to a specific phone number with the '9' prefix
that is required. This <em>doesn't </em>work as I get the errors that I
stated in my previous mail. If I connect the phone directly to the POTS line
and dial the same exact number (with the '9' prefix) it works.</li>
</ol>
<div style="font-family: tahoma; color: rgb(26, 26, 26); font-weight: 400;
font-style: normal;">
         </div>
<div style="font-family: tahoma; color: rgb(26, 26, 26); font-weight: 400;
font-style: normal;">
        my dial plan is:</div>
<div style="font-family: tahoma; color: rgb(26, 26, 26); font-weight: 400;
font-style: normal;">
         </div>
<div style="font-family: tahoma; color: rgb(26, 26, 26); font-weight: 400;
font-style: normal;">
         <!-- THIS DOESN'T WORK --></div>
<div style="font-family: tahoma; color: rgb(26, 26, 26); font-weight: 400;
font-style: normal;">
         <extension name="call_from_phone"><br />
         <condition field="${freetdm_span_number}"
expression="^1$"><br />
         <action application="set"
data="hangup_after_bridge=true"/><br />
         <action application="bridge"
data="freetdm/2/1/9039000000"/><br />
         </condition><br />
         </extension></div>
<div style="font-family: tahoma; color: rgb(26, 26, 26); font-weight: 400;
font-style: normal;">
         </div>
<div style="font-family: tahoma; color: rgb(26, 26, 26); font-weight: 400;
font-style: normal;">
         <!-- THIS WORKS --><br />
         <extension name="call_from_pots"><br />
         <condition
field="${freetdm_span_number}" expression="^2$"><br />
         <action
application="set"
data="hangup_after_bridge=true"/><br />
         <action
application="bridge" data="freetdm/1/1/"/><br />
         </condition><br />
         </extension></div>
<div style="font-family: tahoma; color: rgb(26, 26, 26); font-weight: 400;
font-style: normal;">
         </div>
<div style="font-family: tahoma; color: rgb(26, 26, 26); font-weight: 400;
font-style: normal;">
        The error I get:</div>
<div style="font-family: tahoma; color: rgb(26, 26, 26); font-weight: 400;
font-style: normal;">
         </div>
<div style="font-family: tahoma; color: rgb(26, 26, 26); font-weight: 400;
font-style: normal;">
        2013-11-19 14:07:26.727378 [INFO] ftmod_zt.c:671 Setting echo cancel to 64
taps for 1:1<br />
        2013-11-19 14:07:30.987378 [NOTICE] switch_channel.c:1034 New Channel
FreeTDM/1:1/2 [2a930dc8-5113-11e3-82d6-7bb8ac46d104]<br />
        2013-11-19 14:07:30.987378 [INFO] mod_dialplan_xml.c:558 Processing
<1>->2 in context analog<br />
        2013-11-19 14:07:30.987378 [INFO] ftmod_zt.c:671 Setting echo cancel to 64
taps for 2:1<br />
        2013-11-19 14:07:30.987378 [NOTICE] switch_channel.c:1034 New Channel
FreeTDM/2:1/9039000000 [2a934748-5113-11e3-82dc-7bb8ac46d104]<br />
        2013-11-19 14:07:30.987378 [INFO] ftmod_zt.c:671 Setting echo cancel to 64
taps for 2:1<br />
        2013-11-19 14:07:36.047378 [NOTICE] mod_freetdm.c:2273 Hangup
FreeTDM/2:1/9039000000 [CS_CONSUME_MEDIA] [NORMAL_CIRCUIT_CONGESTION]<br />
        2013-11-19 14:07:36.047378 [NOTICE] switch_core_session.c:1564 Session 14
(FreeTDM/2:1/9039000000) Ended<br />
        2013-11-19 14:07:36.047378 [NOTICE] switch_core_session.c:1568 Close
Channel FreeTDM/2:1/9039000000 [CS_DESTROY]<br />
        2013-11-19 14:07:36.047378 [INFO] mod_dptools.c:3201 Originate
Failed. Cause: NORMAL_CIRCUIT_CONGESTION<br />
        2013-11-19 14:07:36.047378 [NOTICE] switch_channel.c:4594 Hangup
FreeTDM/1:1/2 [CS_EXECUTE] [NORMAL_CIRCUIT_CONGESTION]<br />
        2013-11-19 14:07:36.067380 [NOTICE] switch_core_session.c:1564 Session 13
(FreeTDM/1:1/2) Ended<br />
        2013-11-19 14:07:36.067380 [NOTICE] switch_core_session.c:1568 Close
Channel FreeTDM/1:1/2 [CS_DESTROY]</div>
<div style="font-family: tahoma; color: rgb(26, 26, 26); font-weight: 400;
font-style: normal;">
         </div>
<div style="font-family: tahoma; color: rgb(26, 26, 26); font-weight: 400;
font-style: normal;">
        ftdm list</div>
<div style="font-family: tahoma; color: rgb(26, 26, 26); font-weight: 400;
font-style: normal;">
         </div>
<div style="font-family: tahoma; color: rgb(26, 26, 26); font-weight: 400;
font-style: normal;">
        +OK<br />
        span: 1 (myFXS)<br />
        type: analog<br />
        physical_status: ok<br />
        signaling_status: UP<br />
        chan_count: 1<br />
        dialplan: XML<br />
        context: analog<br />
        dial_regex:<br />
        fail_dial_regex:<br />
        hold_music:<br />
        analog_options: none<br />
        +OK<br />
        span: 2 (myFXO)<br />
        type: analog<br />
        physical_status: ok<br />
        signaling_status: UP<br />
        chan_count: 1<br />
        dialplan: XML<br />
        context: analog<br />
        dial_regex:<br />
        fail_dial_regex:<br />
        hold_music:<br />
        analog_options: none</div>
<div style="font-family: tahoma; color: rgb(26, 26, 26); font-weight: 400;
font-style: normal;">
         </div>
<div style="font-family: tahoma; color: rgb(26, 26, 26); font-weight: 400;
font-style: normal;">
        ftdm dump 2</div>
<div style="font-family: tahoma; color: rgb(26, 26, 26); font-weight: 400;
font-style: normal;">
         </div>
<div style="font-family: tahoma; color: rgb(26, 26, 26); font-weight: 400;
font-style: normal;">
        +OK<br />
        span_id: 2<br />
        chan_id: 1<br />
        physical_span_id: 1<br />
        physical_chan_id: 4<br />
        physical_status: ok<br />
        physical_status_red: 0<br />
        physical_status_yellow: 0<br />
        physical_status_rai: 0<br />
        physical_status_blue: 0<br />
        physical_status_ais: 0<br />
        physical_status_general: 0<br />
        signaling_status: UP<br />
        type: FXO<br />
        state: DOWN<br />
        last_state: BUSY<br />
        txgain: 0.00<br />
        rxgain: 0.00<br />
        cid_date:<br />
        cid_name:<br />
        cid_num:<br />
        ani:<br />
        aniII:<br />
        dnis:<br />
        rdnis:<br />
        cause: NONE<br />
        session: (none)</div>
<div style="font-family: tahoma; color: rgb(26, 26, 26); font-weight: 400;
font-style: normal;">
         </div>
<div style="font-family: tahoma; color: rgb(26, 26, 26); font-weight: 400;
font-style: normal;">
         </div>
<div style="font-family: tahoma; color: rgb(26, 26, 26); font-weight: 400;
font-style: normal;">
        freetdm.conf</div>
<div style="font-family: tahoma; color: rgb(26, 26, 26); font-weight: 400;
font-style: normal;">
         </div>
<div style="font-family: tahoma; color: rgb(26, 26, 26); font-weight: 400;
font-style: normal;">
        [span zt myFXS]<br />
        number => 1<br />
        fxs-channel => 1<br />
        <br />
        [span zt myFXO]<br />
        number => 4<br />
        fxo-channel => 4</div>
<div style="font-family: tahoma; color: rgb(26, 26, 26); font-weight: 400;
font-style: normal;">
         </div>
<div style="font-family: tahoma; color: rgb(26, 26, 26); font-weight: 400;
font-style: normal;">
        Thanks for the help!</div>
<div style="font-family: tahoma; color: rgb(26, 26, 26); font-weight: 400;
font-style: normal;">
        Oren.</div>
<div style="font-family: tahoma; color: rgb(26, 26, 26); font-weight: 400;
font-style: normal;">
         </div>
<br />
<blockquote style="padding-right: 0px; padding-left: 5px; margin-left: 5px;
border-left: 2px solid rgb(0, 0, 0); margin-right: 0px;">
        -----Original Message-----<br />
        From: "windy" <xiaofengcanyuexp@163.com><br />
        To: "FreeSWITCH Users Help"
<freeswitch-users@lists.freeswitch.org>, "FreeSWITCH Users
Help" <freeswitch-users@lists.freeswitch.org><br />
        Date: Tue, 19 Nov 2013 11:46:50 +0800<br />
        Subject: Re: [Freeswitch-users] Ignore busy signal when dialling out on
anFXO port<br />
        <br />
        <div>
                <font color="#000080" face="Verdana" size="2">"<font color="#000000">
NORMAL_CIRCUIT_CONGESTION" has nothing to do with the busy tone. There
should be problem with your TDM card(sangoma).</font></font></div>
        <div>
                You can firstly check if your link and cic state are normal before you
dial the call. To check the state, you can either check the freeswitch.log
or use "wanpipe" trace.</div>
        <div>
                 </div>
        <div>
                <font color="#c0c0c0" face="Verdana" size="2"> <span>windy</span>
</font></div>
        <hr align="left" color="#b5c4df" size="1" style="WIDTH: 100px" />
        <div>
                <font color="#c0c0c0" face="Verdana" size="2"> 2013-11-19</font></div>
        <hr color="#b5c4df" size="1" />
        <div>
                <font face="Verdana" size="2"><strong>From:</strong> Nandy Dagondon
</font></div>
        <div>
                <font face="Verdana" size="2"><strong>Send:</strong> 2013-11-19
07:59:23 </font></div>
        <div>
                <font face="Verdana" size="2"><strong>To:</strong> FreeSWITCH Users Help
</font></div>
        <div>
                <font face="Verdana" size="2"><strong>CC:</strong> </font></div>
        <div>
                <font face="Verdana" size="2"><strong>Subject:</strong> Re:
[Freeswitch-users] Ignore busy signal when dialling out on anFXO port </font>
</div>
        <div>
                 </div>
        <div>
                <div dir="ltr">
                        <font face="Verdana" size="2">Please post your dialplan snippet. </font>
                        <div>
                                 </div>
                        <div>
                                <font face="Verdana" size="2">Re POTS line requiring you to dial 9.
Usually this is a PABX access code to grab the LINE e.g. to get a dial tone
but 9 is not dialed. Only the numbers following 9 is actually dialed to the
POTS line. Unless ... this is an unusual setup. <br />
                                </font>
                                <div class="gmail_extra">
                                        <br />
                                        <font face="Verdana" size="2">/nandy<br />
                                        <br />
                                        </font>
                                        <div class="gmail_quote">
                                                <font face="Verdana" size="2">On Mon, Nov 18, 2013 at 3:41 PM, Oren
Hecht <span dir="ltr"><<a href="mailto:orenhe@in.taldor.co.il"
target="_blank">orenhe@in.taldor.co.il</a>></span> wrote:<br />
                                                </font>
                                                <blockquote class="gmail_quote" style="BORDER-LEFT: #ccc 1px solid;
MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex">
                                                        <div>
                                                                <div style="FONT-STYLE: normal; FONT-FAMILY: tahoma; FONT-WEIGHT:
400">
                                                                        <div style="FONT-STYLE: normal; FONT-FAMILY: tahoma; FONT-WEIGHT:
400">
                                                                                <font face="Verdana" size="2">Hi,</font></div>
                                                                        <div style="FONT-STYLE: normal; FONT-FAMILY: tahoma; FONT-WEIGHT:
400">
                                                                                <font face="Verdana" size="2"> </font></div>
                                                                        <div style="FONT-STYLE: normal; FONT-FAMILY: tahoma; FONT-WEIGHT:
400">
                                                                                <font face="Verdana" size="2">I'm new to freeswitch so please
excuse me if I'm not using the right terms.</font></div>
                                                                        <div style="FONT-STYLE: normal; FONT-FAMILY: tahoma; FONT-WEIGHT:
400">
                                                                                <font face="Verdana" size="2"> </font></div>
                                                                        <div style="FONT-STYLE: normal; FONT-FAMILY: tahoma; FONT-WEIGHT:
400">
                                                                                <font face="Verdana" size="2">I have freeswitch connected to a
POTS line using an FXO port, and I am trying to use it to dial out without
success.</font></div>
                                                                        <div style="FONT-STYLE: normal; FONT-FAMILY: tahoma; FONT-WEIGHT:
400">
                                                                                <font face="Verdana" size="2">The POTS line requires me to dial
'9' first to get a line for dialing out, and as long as I don't
press 9 it gives a 'busy' tone.</font></div>
                                                                        <div style="FONT-STYLE: normal; FONT-FAMILY: tahoma; FONT-WEIGHT:
400">
                                                                                <font face="Verdana" size="2">I am trying to bridge an extension
to freetdm port with adding a '9' prefix, but I get "Failed to
open channel" and the reason is "NORMAL_CIRCUIT_CONGESTION".
When I look at 'ftdm dump' I see: "last_state:
BUSY".</font></div>
                                                                        <div style="FONT-STYLE: normal; FONT-FAMILY: tahoma; FONT-WEIGHT:
400">
                                                                                <font face="Verdana" size="2"> </font></div>
                                                                        <div style="FONT-STYLE: normal; FONT-FAMILY: tahoma; FONT-WEIGHT:
400">
                                                                                <font face="Verdana" size="2">I guess the reason for failure is
that freeswitch hears the busy tone and thinks the line is not free and
aborts. I also thought this is related to the early media signaling so I
tried adding {ignore_early_media=true} thinking it will ignore the busy
tone, but it dodn't help.</font></div>
                                                                        <div style="FONT-STYLE: normal; FONT-FAMILY: tahoma; FONT-WEIGHT:
400">
                                                                                <font face="Verdana" size="2"> </font></div>
                                                                        <div style="FONT-STYLE: normal; FONT-FAMILY: tahoma; FONT-WEIGHT:
400">
                                                                                <font face="Verdana" size="2">How can I tell freeswitch to ignore
the busy signal and just dial the destaination number, (the '9'
prefix will give it a free line)?</font></div>
                                                                        <div style="FONT-STYLE: normal; FONT-FAMILY: tahoma; FONT-WEIGHT:
400">
                                                                                <font face="Verdana" size="2"> </font></div>
                                                                        <div style="FONT-STYLE: normal; FONT-FAMILY: tahoma; FONT-WEIGHT:
400">
                                                                                <font face="Verdana" size="2">Thank you very much for the
help,</font></div>
                                                                        <div style="FONT-STYLE: normal; FONT-FAMILY: tahoma; FONT-WEIGHT:
400">
                                                                                <font face="Verdana" size="2">Oren Hecht.</font></div>
                                                                </div>
                                                        </div>
                                                        <br />
                                                        <font face="Verdana" size="2">
_________________________________________________________________________<br
/>
                                                        Professional FreeSWITCH Consulting Services:<br />
                                                        <a href="mailto:consulting@freeswitch.org">
consulting@freeswitch.org</a><br />
                                                        <a href="http://www.freeswitchsolutions.com" target="_blank">
http://www.freeswitchsolutions.com</a><br />
                                                        <br />
                                                        FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br />
                                                        <a href="http://www.cudatel.com" target="_blank">
http://www.cudatel.com</a><br />
                                                        <br />
                                                        Official FreeSWITCH Sites<br />
                                                        <a href="http://www.freeswitch.org" target="_blank">
http://www.freeswitch.org</a><br />
                                                        <a href="http://wiki.freeswitch.org" target="_blank">
http://wiki.freeswitch.org</a><br />
                                                        <a href="http://www.cluecon.com" target="_blank">
http://www.cluecon.com</a><br />
                                                        <br />
                                                        FreeSWITCH-users mailing list<br />
                                                        <a href="mailto:FreeSWITCH-users@lists.freeswitch.org">
FreeSWITCH-users@lists.freeswitch.org</a><br />
                                                        <a
href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users"
target="_blank">
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br />
                                                        UNSUBSCRIBE:<a
href="http://lists.freeswitch.org/mailman/options/freeswitch-users"
target="_blank">
http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br />
                                                        <a href="http://www.freeswitch.org" target="_blank">
http://www.freeswitch.org</a></font><br />
                                                         </blockquote>
                                        </div>
                                </div>
                        </div>
                </div>
        </div>
</blockquote>
</body></html>