[Freeswitch-users] Two outbound ESL connections

Asbjørn Thegler at at cubeio.com
Tue Mar 1 13:34:55 MSK 2016


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="socket" data="127.0.0.1:3000 async full"/>
<action application="hangup" data="FACILITY_NOT_IMPLEMENTED"/>
--

The proxy-like service listenens on port 3000. It will order FreeSWITCH to
execute the following command:

socket 127.0.0.1:3001 async full

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

[1]
https://freeswitch.org/confluence/display/FREESWITCH/mod_event_socket#mod_event_socket-exit
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20160301/a04816c0/attachment.html 


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