Hi all,
I'm using xmlrpc with php to send the originate command to freeswitch to initiate a call to leg-a. This command also specifies the dialplan in which I use the bridge command to make a call to leg-b and bridge both legs.
xmlrpc command:
originate {originate_timeout=120,origination_caller_id_name='+xxxxx',origination_caller_id_number=+xxxxxx,call_ref='xxxxxxx',bCallerIDName='+xxxxxxx',bCallerID='+xxxxxx',bnumber='+xxxxxxx'}sofia/gateway/siplb-01/+xxxxx|sofia/gateway/siplb-02/+xxxxxx call XML public
dialplan:
<extension name="public_extensions">
<condition field="destination_number" expression="^call$">
<action application="set" data="api_hangup_hook=lua eoc.lua ${call_ref}"/>
<action application="bridge" data="{origination_caller_id_name=${bCallerIDName},origination_caller_id_number=${bCallerID}}sofia/gateway/${default_provider}/${bnumber}|sofia/gateway/${secondary_provider}/${bnumber}"/>
</condition>
</extension>
My problem is that if the originate command results in a call setup failure, I don't enter the dialplan and I can't retrieve the failure in php either.
I tried to add the following to the originate command:
transfer_on_fail='auto_cause error XML public'
With corresponding dialplan entry but it did not work either.
I need to be able to execute eoc.lua even on failure of leg-A.
Any help is welcome!
Thanks