[Freeswitch-users] Inbound or Outbound Socket connection?

Anis Bedhiafi anis.bedhiafi at e-volut.io
Wed Oct 12 14:08:31 MSD 2016


Hi Guys,

I guess I have a little confusion here between inbound esl and outbound esl.

*My Goal:* What I am trying to do is detect if the call is being
transferred and notify the caller about it.

*My Scenario:*

1- I have an application based on SIP.js client that makes outbound calls
via a registered SIP trunk on my Freeswitch box. I upload a list of phone
numbers to call and hit Launch button.

2- Some calls can be transferred by the callee endpoint. I want to detect
this fact.

3- According to my research, I can do this using Event Socket library.
4- To detect if there is a transfer, I can control the channel variable
RDNIS or TRANSFER_TIME. If there is a transfer these variables are not
empty.
5- Once I detect there is a transfer I want to send a NOTIFY packet to the
client.

*My confusion is the following:*

I don't know whether to use an Outbound socket connection or an Inbound
Connection.

I tried to do this with outbound connection as follows:

<condition field="destination_number" expression="^1703$">
    <action application="set" data="socket_resume=true"/>
    <action application="socket" data="127.0.0.1:8084 async"/>
    <action application="bridge" data="sofia/gateway/mygateway/$1"/>
</condition>

I have a perl server listening on port 8084/tcp.
In this perl script I subscribe for CHANNEL_ANSWER Events and I filter by
the call uuid.

The problem is when I call the socket connection, the bridge application
never executes.

How am I supposed to listen for a specific event and make a bridge call?

Is what I am doing wrong. Please correct me.

Thank you for your support.

Kind regards.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20161012/dff998ad/attachment.html 


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