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,
[email protected]  and [email protected].

 

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:[email protected]";

                                        }

                                        else

                                        {

                                                append_branch();

 
$ru="sip:[email protected]";

                                        }

                                        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;

                        }

_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

Reply via email to