[OpenSIPS-Users] Serialize_Branches not working right

Bogdan-Andrei Iancu bogdan at voice-system.ro
Sat Oct 24 19:02:10 CEST 2009


Hi,

osiris123d wrote:
> I am not sure if I have just misunderstood how serialize_branches() works or
> if this is some kind of bug.
>
> I have a registered user that gets called and I am using append_branch() to
> add on that users mobile number.  I am changing the Q values for both
> branches to not be the same value, but when t_relay() is executed the
> INVITES are made in parallel to the registered users number and also the
> mobile number.  When you read the doc for serialize_branches it says that if
> the Q Values are different the calls will be serialize and if they are the
> same they will be parallel.  Am I missing something here?  Here is my code
>
>
>         lookup("location");
>         append_branch();
>   
             ^^^^^^^^^^^
this is bogus - the lookup() already sets all necessary branches, so 
there is no need to do this "append_branch" -> with this cfg, you get an 
extra dummy branch (0,1,2) . Simple add the extra branch to point to the 
mobile number.

Regards,
Bogdan
>         append_branch("sip:mobile.com");
>
>         $(branch(q)[0]) = 1000;
>         $(branch(uri)[1]) = "sip:" + $avp(s:mobile_num) +
> "@pt1.vitelity.net";
>         $(branch(q)[1]) = 500;        
>         $(branch(duri)[1]) = "sip:pt1.vitelity.net:5060";
>
>         serialize_branches(1);
>         next_branches();
>
>         t_on_reply("1");
>         t_on_failure("1");
>         t_relay();
>         exit;
>
>
> So the original Request URI is located in the USRLOC and then appended. 
> Then I set up a place holder for the mobile number by appending
> "sip:mobile.com".  Then with the new $branch PV's I edit the Q values.  So
> in the example above I make the original Request URI's Q value 1000 which
> turns out to be a value of Q=1.  Then I set the mobile numbers Q value to be
> 500 which turns out to be a value of Q=0.5.  Since these two Q values are
> different I would expect serialize_branches(1) to make the call Serial, but
> in reality I get a parallel call.
>
> But if I change the Q value for the mobile phone to be something like -500
> which turns out to be a value of Q=0 then I am able to get a Serial call
> where the original Request URI is called first and then after the
> fr_inv_timer passes the mobile number is called.
>
> Am I missing something here?  Sorry if I keep asking questions about how to
> get Hunt Grouping/FindmeFollowme to work, but this solution seems like it
> should work the way I am thinking it should.
>   




More information about the Users mailing list