[OpenSIPS-Users] Distinction between two forked INVITE received from upstream

Bogdan-Andrei Iancu bogdan at voice-system.ro
Thu Jan 21 15:58:38 CET 2010


Hi Yannick,

indeed the issue is tricky as the media relay uses as a key (for the 
streams) the SIP callid+from_tag+to_tag(optional) . so, it an early 
stage, when to_tag is not yet know, the media relay cannot make 
difference between the two branches of the same call.

My advice - do not do stop for media relay on CANCEL or call setup fail 
as you never know how many parallel branches may be....let is timeout is 
indeed the call was completely ended.

Regards,
Bogdan

Yannick LE COENT wrote:
>
> Hello,
>
>  
>
> The next figure describes my problem.
>
>  
>
>                  openSIPS
>
>                  +------+
>
> --  INVITE(1) -->|      |--- INVITE(1) -->
>
>                  |      |
>
> --  INVITE(2) -->|      |--- INVITE(2) -->
>
> <-- 180(2) ------|      |<-- 180(2) ------
>
> <-- 200(2) ------|      |<-- 200(2) ------
>
>                  |      |
>
> --  CANCEL(1) -->|      |
>
> <-- 200(CANCEL) -|      |
>
> <-- 487(1) ------|      |
>
> --  ACK(1) ----->|      |
>
>                  |      |
>
> --  ACK(2) ----->|      |--- ACK(2) ----->
>
>                  |      |
>
>                  +------+
>
>                     |
>
>                     |
>
>                  +------+
>
>                  |      |
>
>                  |      |
>
>                  +------+
>
>                  RTP proxy
>
>  
>
> I use RTP proxy to relay media streams.
>
>  
>
> INVITE (1) and (2) have been forked from an upstream proxy, thus they 
> have the same Call-ID and From tag, and a different branch ID.
>
> INVITE (2) is accepted, but INVITE (1) has no response.
>
> The upstream proxy cancels INVITE (1).
>
>  
>
> In my script, on CANCEL(1) request I close the RTP session, but I 
> should not dot that since INVITE(2) has been accepted.
>
>  
>
> My questions are:
>
> How can I know when I received CANCEL(1) that INVITE(2) has been accepted?
>
> Do I need to use flags? Which ones ?
>
>  
>
> Thanks for any help,
>
> Yannick
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>   


-- 
Bogdan-Andrei Iancu
www.voice-system.ro




More information about the Users mailing list