[Freeswitch-users] execute_on_answer does not work when group dial is used for bridging to multiple extensions

Jenish Patel patel.jenish.k at gmail.com
Sat Oct 6 06:53:29 UTC 2018


Hi everyone,

I am trying to use the bind_digit_action on the b-leg , and as wiki
suggested I am using execute_on_answer to assign the bind_digit on the
b-leg. This works like charm in case of the normal simple bridge. But in
case of the Ring-group like bridge when I bridge the multiple users at the
same time, it does not get executed on the channel answer.

I see in the logs that in working case when b-leg answered , the
execute_on_answer gets executed. But in ring group case it does not get
executed at all.

Am I missing something here ? Like is there any other param needs to be set
to use the execute_on_answer in the ring group like structure.

And if it is not possible, can you suggest me any other way to use
bind_digit on b-leg from dialplan itself.

Below is my dialplan for ring group.




<include>

   <extension name="Ring_all">
      <condition field="destination_number" expression="3301">
      <action application="export" data="dialed_extension=$1"/>

<!-- Feature Code settings -->
      <!-- bind_meta_app can have these args <key> [a|b|ab] [a|b|o|s] <app>
-->
        <action application="bind_digit_action"
data="features,*1,exec:valet_park::my_lot auto in 8001 8999,both,self"/>
        <action application="export"
data="nolocal:execute_on_answer_11=features,*1,exec:valet_park::my_lot auto
in 8001 8999,both,self"/>

        <action application="bind_digit_action"
data="features,*2,exec:execute_extension,START_RECORDING XML
features,both,self"/>
        <action application="export"
data="nolocal:execute_on_answer_12=features,*2,exec:execute_extension,START_RECORDING
XML features,both,self"/>

        <action application="bind_digit_action"
data="features,*3,exec:execute_extension,att_xfer XML features,both,self"/>
        <action application="export"
data="nolocal:execute_on_answer_13=bind_digit_action
features,*3,exec:execute_extension,att_xfer XML features,both,self"/>

        <action application="bind_digit_action"
data="features,*4,exec:execute_extension,blind_xfer XML
features,both,self"/>
        <action application="export"
data="nolocal:execute_on_answer_14=bind_digit_action
features,*4,exec:execute_extension,blind_xfer XML features,both,self"/>

        <action application="bind_digit_action"
data="features,*51,exec:execute_extension,START_RECORDING XML
features,aleg,self"/>
        <action application="export"
data="nolocal:execute_on_answer_15=features,*51,exec:execute_extension,START_RECORDING
XML features,aleg,self"/>

        <action application="bind_digit_action"
data="features,*52,exec:execute_extension,STOP_RECORDING XML
features,aleg,self"/>
        <action application="export"
data="nolocal:execute_on_answer_16=features,*52,exec:execute_extension,STOP_RECORDING
XML features,aleg,self"/>

<!-- FEature Code set -->


<!-- Setting Variabls -->
                        <action application="set"
data="ringback=/home/jenish/moh.wav"/>
                        <action application="set"
data="transfer_ringback=/home/jenish.moh.wav"/>
                        <action application="set"
data="call_timeout=300"/>
                        <action application="set"
data="hangup_after_bridge=true"/>
                        <action application="set"
data="continue_on_fail=true"/>
                        <action application="set" data="REC_TYPE=GROUP"/>
                        <action application="set" data="REC_STATUS=Y"/>
                        <action application="export"
data="effective_caller_id_name=Department_group_call"/>


                        <action application="record_session"
data="/usr/local/freeswitch/recordings/1000/GROUP/${strftime(%Y-%m-%d-%H-%M-%S)}_from_${caller_id_number}_to_${destination_number}__${uuid}.wav"/>
                        <action application="set"
data="REC_PATH=/usr/local/freeswitch/recordings/1000/GROUP/${strftime(%Y-%m-%d-%H-%M-%S)}_from_${caller_id_number}_to_${destination_number}__${uuid}.wav"/>

                        <action application="set"
data="export_vars=call_direction,original_source,REC_PATH,REC_TYPE,REC_STATUS"/>

                        <action application="bridge"
data="[absolute_codec_string=^^:PCMA at 8000h@20i at 64000b
]${sofia_contact(internal/1000101@
${domain_name}},[absolute_codec_string=^^:PCMU at 8000h@20i at 64000b
]${sofia_contact(internal/1000100@
${domain_name}},[absolute_codec_string=^^:PCMA at 8000h@20i at 64000b:PCMU at 8000h
@20i at 64000b]${sofia_contact(internal/1000102@
${domain_name}},[absolute_codec_string=^^:PCMA at 8000h@20i at 64000b:PCMU at 8000h
@20i at 64000b]${sofia_contact(internal/1000103@${domain_name}}"/>

                        <action application="answer"/>
                        <action application="sleep" data="1000"/>
                        <action application="bridge"
data="loopback/app=voicemail:default ${domain_name} ${dialed_extension}"/>
      </condition>
    </extension>

</include>


-- 

Thanks & Regards

Jenish Patel
+91 9033987576
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20181006/369dcd75/attachment-0001.html>


More information about the FreeSWITCH-users mailing list