[OpenSIPS-Users] parallel forking

Bogdan-Andrei Iancu bogdan at voice-system.ro
Mon Feb 2 14:47:07 CET 2009


Hi Stefano,

There is no way to extract the URI from the reply; also there is no way 
yo access the internal data structures (like transaction) to get this info.

But what you can do is to use AVPs to store the RURI - use different 
specific numes in order to make difference between branches:

    $ru = "first branch RURI";
    $avp(s:uri1) = $ru;
    append_branch("second branch RURI");
    $avp(s:uri2) = "second branch RURI");
    ....

in onreply route, you can do:

    if ($t_branch_idx==1) {
       xlog("RURI was: $avp(s:uri1) \n");
    }  else ($t_branch_idx==1) {
       xlog("RURI was: $avp(s:uri2) \n");
    }
    ...

I know it is not the nicest or most scalable way to do it, but this is a 
workable solution with what is now available.

Regards,
Bogdan

stefanoIT wrote:
> Hi everybody,
> If I do a parallel forking (changing ruri and appending branches) after I
> received the OK (200) I'm unable to know who answered (to log it) because I
> can't see which ruri generated the reply. I can see che Contact header but
> this is not enought to be sure.
> There is a way to do that?
> I'm using opensips 1.4.4
>
> thanks
>
> stefano
> italy 
>   




More information about the Users mailing list