[SR-Users] Late parallel forking

Daniel-Constantin Mierla miconda at gmail.com
Mon Jul 21 14:59:08 CEST 2014


Hello,

you may get similar results using t_cancel_callid(():
- http://kamailio.org/docs/modules/stable/modules/tmx.html#idm8272

For each call you have to store the call-id, cseq and the target user 
somehow (e.g., using htable).

Then, when you have a registration, see if the user has an ongoing call 
towards him/her. If yes, cancel that transaction and you end up in 
failure route. Based the flags, you can see it was canceled on purpose 
and can do another lookup location to get now two branches.

You would need to store the initial caller address before looking up 
location, revert to it in failure route before looking up location again.

The behavior is not exactly the same as you requested, as first branch 
is canceled. But given that the branch will be called again in short 
time, the user might not notice anything in terms of ringing interruption.

Alternative is of course writing a function for it, at the end it is on 
of the big benefits of open source.

Cheers,
Daniel

On 21/07/14 13:06, Guillaume Bour wrote:
> Hi,
>                                                                                                                                                                                                                                              
> I would like to do some kind of "late parallel forking" (see the example below).
> Is there a way to do such thing with Kamailio ?
>                                                                                                                                                                                                                                              
> Here is an example:
>          . A call B
>          . B device 1 is connected so INVITE is forwarded to it
>          . B device 2 registers succesfully
>          . as device 1 as not yet answered and INVITE transaction is not expired, I want INVITE message
>            to be forwarded to device 2 (so both are ringing)
>                                                                                                                                                                                                                                              
>                                                                                                                                                                                                                                              
> Regards,
> Guillaume Bour
>
> _______________________________________________
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users at lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

-- 
Daniel-Constantin Mierla - http://www.asipto.com
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda




More information about the sr-users mailing list