Use comma,  pipe or enterprise operator to send call to multiple end points in parallel,  sequential or enterprise mode. 

Ismail 



Sent from my Samsung Galaxy smartphone.

-------- Original message --------
From: Danyi Lin <danyi.lin@gmail.com>
Date: 27/11/2017 7:11 p.m. (GMT+01:00)
To: freeswitch-users@lists.freeswitch.org
Subject: [Freeswitch-users] Fork a call on registering

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