Trever,

I think there is a better way to do this. Look at this example:
http://wiki.freeswitch.org/wiki/Misc._Dialplan_Tools_bind_digit_action#Catching_the_Digits_Dialed

I think if you use the last digits dialed you should be able to avoid the play_and_get_digits altogether. You'll need to strip off the leading and trailing digits but that shouldn't be too difficult.

-MC

On Tue, Mar 27, 2012 at 3:11 AM, Trever L. Adams <trever.adams@gmail.com> wrote:
> go ahead and get a debug log of a call coming in, being answered, and the
> recipient dialing *0#xxx# to send the call elsewhere. Drop it into
> pastebin.freeswitch.org and use "FreeSWITCH Log" as the syntax highlighting.
>
> -MC
http://pastebin.freeswitch.org/18753

I am not sure how much the log will help. It doesn't show me pushing
anything after the transfer code (*01 as I was experimenting and forgot
to change it back to *0# as I had it set before).

If I dial any thing 1000, 1000#, 1001, 1001# it all fails and plays the
invalid_extension.wav. I have changed the code a little bit. It now reads:

               <extension name="setup bind_digit_action_transfer">
                 <condition field="destination_number"
expression="^SETUP_TRANSFER$">
                    <action application="log" data="INFO Configuring
bind_digit_action to do recording on this session..."/>
                    <action application="bind_digit_action"
data="do_transfer,*01,exec:execute_extension,DO_TRANSFER XML Incoming-FXO"/>
                    <action application="digit_action_set_realm"
data="do_transfer"/>
                 </condition>
               </extension>

             <extension name="setup transfer" continue="true">
                 <condition field="chan_name" expression="^FreeTDM/3:1/">
                    <action application="set"
data="bridge_pre_execute_bleg_app=execute_extension"/>
                    <action application="set"
data="bridge_pre_execute_bleg_data=SETUP_TRANSFER XML Incoming-FXO"/>
                 </condition>
               </extension>

               <extension name="bind_digit_action Do Transfer">
                 <condition field="destination_number"
expression="^DO_TRANSFER$">
                   <action application="log" data="INFO Transferring
external call to another internal location..."/>
                   <action application="play_and_get_digits" data="1 10
1 1000 # misc/silence.wav misc/invalid_extension.wav target_extension
^(\d+)$"/>
                   <action application="log" data="INFO Transferring
external call to internal ${target_extension} ${1}..."/>
                   <action application="transfer" data="-bleg
${target_extension} XML Internal-FXS"/>
                 </condition>
               </extension>

It seems that I had a problem with play and get digits not working when
I was working on my call screener (I stopped work do to bug
openzap-137). I seemed to have gotten around it by rewriting the entire
thing in lua. I may be remembering incorrectly as this was months ago.

Thank you for any help,
Trever
--
"Selfishness is really self-destruction in slow motion." -— Elder Neal
A. Maxwell - Ensign, May 1999, 23


_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
consulting@freeswitch.org
http://www.freeswitchsolutions.com

FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.com

Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com

FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org