[Freeswitch-users] Fork a call on registering

Jurijs Ivolga jurijs.ivolga at gmail.com
Tue Nov 28 06:33:10 UTC 2017


Hi,

I believe what you need can be achieved using custom events in freeswitch
and lua scripts. So if you don't get a cancel you can trigger script on
answer event and hangup a call to specific device. So if dev1 answer you
can hangup call to dev2:

https://wiki.freeswitch.org/wiki/Variable_api_on_answer

With kind regards,

Jurijs

On Tue, Nov 28, 2017 at 1:48 AM, Srigo Kanapathipillai <ksrigo at gmail.com>
wrote:

> Hi Danyi,
>
> You can achieve it using Opensips (and freeswitch) (
> https://blog.opensips.org/2017/03/10/advanced-sip-
> scenarios-with-event-based-routing/) See the push notification example at
> the bottom.
>
> Srigo
>
> Sent from my iPhone
>
> On 27 Nov 2017, at 23:50, Michael Jerris <mike at jerris.com> wrote:
>
> We have no plans to add it but if you are interested in sponsoring such an
> addition you could contact our professional services group at
> consulting at freeswitch.com to discuss.
>
>
> On Nov 27, 2017, at 4:12 PM, Danyi Lin <danyi.lin at gmail.com> wrote:
>
> Thanks for replying.
>
> Michael, Is there any plan to add such feature into FreeSWITCH?
>
> It will be very useful for mobile app, because usually mobile (iOS) app
> can't keep registration alive all the time.
> Intercepting call could solve my problem, but not as straight forward as
> this way.
>
>
> On Mon, Nov 27, 2017 at 3:49 PM, Michael Jerris <mike at jerris.com> wrote:
>
>> We do not support such a feature at this time.
>>
>> On Nov 27, 2017, at 1:11 PM, Danyi Lin <danyi.lin at gmail.com> wrote:
>>
>> How can I fork a call to a new registered endpoint?
>>
>> Here is the scenario:
>> Callee has 2 devices: dev1 online (registered), dev2 offline
>>
>> 1. An incoming call to the user, dev1 is ringing
>> 2. dev2 register now
>> 3. fork call to dev2
>>
>> Call flow as below (https://gist.github.com/dylin
>> /5ef157f2bc4da8b1c0b145c03e9efcfd):
>>
>>   Caller    |     FS      |    dev1     |   dev2
>> -----------   -----------   -----------   -----------
>>      |  INVITE     |            |            |
>>      |------------>|            |            |
>>      |             |            |            |
>>      |             | INVITE     |            |
>>      |             |----------->|            |
>>      |             |            |            |
>>      |             |            | REGISTER   |
>>      |             |<-----------+------------|
>>      |             |            |            |
>>      |             | INVITE     |            |
>>      |             |------------+----------->|
>>      |             |            |            |
>>
>> I tried freeswitch.Session("sofia/to/dev2", lega) to originate call to
>> dev2,
>> and dev2 got call. However if dev1 answered call, it won't cancel INVITE
>> to dev2 as a normal fork.
>>
>>
>> Any suggestions are welcome.
>>
>> Best regards,
>> Danyi Lin
>>
>>
> _________________________________________________________________________
> 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/20171128/0d3cd05c/attachment.html>


More information about the FreeSWITCH-users mailing list