Hello there,
I have a setup where I would like FreeSWITCH to make an outbound ESL connection to a proxy-like service. The proxy-like service should then make FreeSWITCH open another outbound ESL connection to a different service that will handle the call.
The proxy-like service should be as transparent as possible. Ideally, it should be possible to 'skip' it, and point FreeSWITCH directly to the service that handles the call.
Currently, I have a dialplan that looks like this:
--
<action application="set" data="continue_on_fail=true"/>
<action application="set" data="hangup_after_bridge=true"/>
<action application="set" data="ringback=%(1000,4000,425)"/>
<action application="hangup" data="FACILITY_NOT_IMPLEMENTED"/>
--
The proxy-like service listenens on port 3000. It will order FreeSWITCH to execute the following command:
This works, somewhat. I would like the proxy-service to terminate the connection as fast as possible. However, if I send the exit-command[1] before the call is bridged to the hangup from the XML dialplan is executed. If the call is bridged when I send the exit-command, it works fine.
I would like the service on 3001 to emit a custom event, which the proxy-like service listens for and terminates the ESL connection. Currently I need to sleep a little while and then terminate the ESL connection.
How do I keep the hangup from being executed, when there is an open outbound ESL connection?
I currently use FreeSWITCH Version 1.4.15+git~20141229T185951Z~507a0f22c5~64bit (git 507a0f2 2014-12-29 18:59:51Z 64bit).
I hope this makes sense.
Regards, Asbjørn