[OpenSIPS-Users] serialize_branches() and q value....

Mauro Davi' mauro.davi at acotel.com
Wed Feb 25 11:20:44 CET 2009


Hi All,

 

I saw the documentation but it is to much difficult for me :-) (really I
think that the folloeing information is missed...), so I have a
question.

 

The below script code add two new destination to my voip platform,
parallel at domain.com  and serial at domain.com.

 

The first one works great, but the second one have the same behaviour of
the first one...

 

The question is: How I can specify the q value of every branches?

 

Thanks in advance.

MD

 

 

if(uri=~"^sip:parallel@" || uri=~"^sip:serial@" )

                        {

                                xlog("L_INFO","Check passed!!!\n");

                                $var(i)=0;

                                while ($var(i) < 2)

                                {

                                        xlog("L_INFO","Cycle Enter
$var(i), RURI:$ru\n");

                                        if ($var(i) == 0)

                                        {

 
$ru="sip:user1 at domain.com";

                                        }

                                        else

                                        {

                                                append_branch();

 
$ru="sip:user2 at domain.com";

                                        }

                                        alias_db_lookup("dbaliases");

                                        if (is_uri_host_local())

                                        {

                                                # -- Inbound to inbound

                                                if(uri=~"^sip:[0-9]+@")

                                                {

                                                        #  only route
numeric users to PSTN

 
t_on_failure("2");

                                                        route(5);

                                                }

                                                route(6);

                                        }

                                        else

                                        {

                                                # -- Inbound to outbound

                                                # Here we must check the
to domain to verify if

                                                # we can send the
request to a corporate SBC

                                                sl_send_reply("403",
"Forbidden");

                                                exit;

                                        }

                                        $var(i) = $var(i) + 1;

                                        xlog("L_INFO","Cycle Leave
$var(i), RURI:$ru");

                                }

                                if (uri=~"^sip:serial@")

                                {

                                        setbflag(10);

                                        serialize_branches(1);

                                }

                                route(3);

                                exit;

                        }

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.opensips.org/pipermail/users/attachments/20090225/e30dc58b/attachment-0001.htm 


More information about the Users mailing list