[Freeswitch-users] read application in dialplan is notworking when I use bind_meta_app application ( FXS, TDM 400P with DAHDI )

jack jack at yosin.com.tw
Tue Mar 17 08:24:34 MSK 2015


To whom it may concern,

I just hit the wall when I test the atended transfer.
Here's my simple dialplan:

test.xml:

  <extension name="DID-Call">
      <condition field="destination_number" expression="^(382)$">    
          <action application="bind_meta_app" data="1 b s execute_extension::att_xfer XML features"/>
          <action application="bridge" data="freetdm/myFXS/1"/>
      </condition>
  </extension>

features.xml:

  <extension name="att_xfer">
      <condition field="destination_number" expression="^att_xfer$">
           <action application="answer"/>
           <action application="read" data="4 4 'tone_stream://%(5000,0,350,440)' digits 5000 #"/>
           <action application="att_xfer" data="user/${digits}"/>
      </condition>
  </extension>

And the test environment configuration is like this:

 

As you can see, when you dial number "382" from phone 282, the Diguim telephony card will get ring signal at once.
Then the freeSWITCH server starts a thread to handle dialplan. While in the execute-state, it will get in the test.xml and match the condition,
so FreeSwitch will help bridging two channels together (freetdm/myFXO and freetdm/myFXS/1).

After bridging, you'll hear the ring from phone 4001 and pick up the phone, then you can dial "*1" to activate the action and transfer to call featurs.xml immediately.
You're now in features.xml and matched the exact condition "att_xfer", so you will hear the generated dial tone by tone_stream and need to dial 4 digits in the moment.
The BIG problem is, I can't get any DTMF tone while hitting the digit keys on the phone 4001. But when I change the dialplan like this:

test.xml
  <extension name="DID-Call">
      <condition field="destination_number" expression="^(382)$">    
          <action application="bind_meta_app" data="1 b s execute_extension::att_xfer XML features"/>
          <action application="bridge" data="user/1001"/>
      </condition>
  </extension>

The "read" works just fine and really do the addended transfer as expect.

And I do some tests to make sure the read function work well in normal context,
which means, I discard the "bind_meta_app" application, just use "read" when phone has been answered as follow:


test.xml
  <extension name="DID-Call">
      <condition field="destination_number" expression="^(382)$">    
          <action application="answer"/>
          <action application="read" data="4 4 'tone_stream://%(5000,0,350,440)' digits 5000 #"/>
          <action application="log" data="The number you dialed is : ${digits}"/> 
      </condition>
  </extension>

and it works well when I dialed 382 and reach out the freeswitch server, I could see the DTMF tone show on console.
After I dialed "4001", the "log" application shows "The number you dialed is : 4001", just likes I expected.

So, why would I get involved with situation like this? I was checked the mod_dptools.c and nothing is found in there, since the arguments are not the trouble maker.
Maybe the critical part came from FreeTDM( samgoma ) Module, but I gotta figure out which direction of thought is the most probable. 
If you guys could give me some advice I'll be very thankful, thanks in advance!


Kind Regard,
Jack Huang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20150317/79f5782a/attachment-0001.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/bmp
Size: 772182 bytes
Desc: not available
Url : http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20150317/79f5782a/attachment-0001.bmp 


Join us at ClueCon 2016 Aug 8-12, 2016
More information about the FreeSWITCH-users mailing list