[Freeswitch-users] How to detect if the call is being transferred?

Anis Bedhiafi anis.bedhiafi at e-volut.io
Mon Oct 10 03:22:52 MSD 2016


Hi Gonzalo,

Thank you for the reply. Yes indeed I was going this way.

For this,I am using an Outbound ESL.

So when I detect there is a transfer and I want to notify the original
caller (the sipjs client), should I use an inbound ESL socket connection to
FreeSWITCH and send a NOTIFY Packet used sendEvent() or there is a better
way?

Thank you so much for your help.

Kind Regards,
Anis

____________________________

Anis Bedhiafi
Telecom Services Engineer
@ Evolutio www.e-volut.io

Mobile: (+216) 50 44 18 33
Email: anis.bedhiafi at e-volut.io
____________________________


On 10 October 2016 at 00:05, Gonzalo Gasca Meza <gascagonzalo at gmail.com>
wrote:

> Hi Anis,
>
> The way I do it is using ESL interface, I use it to initiate the call and
> monitor events, in your case you can monitor events and extract variable
> information, upon that take action.
>
> For example:
>
> events = "BACKGROUND_JOB " \
>          "DETECTED_TONE " \
>          "CHANNEL_OUTGOING " \
>          "CHANNEL_CREATE " \
>          "CHANNEL_ANSWER " \
>          "CHANNEL_PROGRESS_MEDIA " \
>          "RECORD_START " \
>          "CHANNEL_HANGUP " \
>          "CHAN_NOT_IMPLEMENTED "
>
> self.connection.events("plain", events)
>
> ev_name = reply.getHeader('Event-Name')
>
> Filter in the event where you get your transfer information and filter by call channel...
>
> if self.call.uuid == reply.getHeader("Channel-Call-UUID"):
>
>   variable_variable_transfer_time = reply.getHeader('*variable_transfer_time*')
>
>   if variable_variable_transfer_time:
>
>      writedb('transfer_time', variable_variable_transfer_time)
>
>   Take action like write into DB, file, etc..
>
> Hope it helps
>
> You can ping me offline for more details.
>
>
> -Gonzalo
>
>
>
> On Sat, Oct 8, 2016 at 2:29 PM, Anis Bedhiafi <anis.bedhiafi at e-volut.io>
> wrote:
>
>> Hello
>>
>> I am working on application using Freeswitch and SIP.js in which I need
>> to detect if the call is being transferred.
>>
>> The Sip.js application is actually an outbound dialer in which I load a
>> list of phone numbers to call.
>>
>> The application starts by calling people.
>>
>> It is interesting to detect voicemail boxes. For that I am using mod_avmd.
>>
>> My problem is when the other end transfers the call, the sip.js client
>> should know that the current call is being transferred.
>>
>> Is there a way that the original caller (sip.js client) knows that the
>> call is being transferred?
>>
>> I was looking at all the channel variables and I found that the RDNIS
>> variable and the transfer_time variable are filled up when there is a
>> transfer.
>>
>> Is there a way to listen to the channel variables during the call and
>> detect any change? Or is there a better way I can do it?
>>
>> Thank you for any suggestion.
>>
>> Anis Bedhiafi
>>
>> _________________________________________________________________________
>> Professional FreeSWITCH Consulting Services:
>> consulting at freeswitch.org
>> http://www.freeswitchsolutions.com
>>
>> Official FreeSWITCH Sites
>> http://www.freeswitch.org
>> http://confluence.freeswitch.org
>> http://www.cluecon.com
>>
>> FreeSWITCH-users mailing list
>> FreeSWITCH-users at lists.freeswitch.org
>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
>> http://www.freeswitch.org
>>
>
>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> http://www.freeswitchsolutions.com
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://confluence.freeswitch.org
> http://www.cluecon.com
>
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20161010/8be495b4/attachment.html 


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