[OpenSIPS-Users] Local call

michel freiha michofr at gmail.com
Thu Jan 29 11:41:16 CET 2009


Dear Bogdan,

i did the following:

if($rU=~ "^123456")
{
route(1);
exit;
}
}
route[1] {
        # for INVITEs enable some additional helper routes
        if (is_method("INVITE")) {
                t_on_branch("2");
                t_on_reply("2");
                t_on_failure("1");
        }

if (!lookup("location")) {
              sl_send_reply("404","Not Found");
              exit;
        }

        if (!t_relay()) {
                sl_reply_error();
        };
        exit;
}

When trying to make a call to 123456, the softphone returns timeout after 30
to 40 s

Regards

On Thu, Jan 29, 2009 at 12:32 PM, Bogdan-Andrei Iancu <
bogdan at voice-system.ro> wrote:

> michel freiha wrote:
>
>> Dear Bogdan,
>>
>> kindly find below my route1
>> route[1] {
>>        # for INVITEs enable some additional helper routes
>>        if (is_method("INVITE")) {
>>                t_on_branch("2");
>>                t_on_reply("2");
>>                t_on_failure("1");
>>        }
>>
> add here:
>         if (!lookup("location")) {
>               sl_send_reply("404","Not Found");
>               exit;
>         }
>
>>
>>        if (!t_relay()) {
>>                sl_reply_error();
>>        };
>>        exit;
>> }
>>
>>
>> regards
>>
>> On Thu, Jan 29, 2009 at 12:01 PM, Bogdan-Andrei Iancu <
>> bogdan at voice-system.ro <mailto:bogdan at voice-system.ro>> wrote:
>>
>>    Hi Michel,
>>
>>    the request loops because probably you do not change the RURI
>>    (domain part) in route[1], so opensips is routing back to itself.....
>>
>>    What this route[1] does ?
>>
>>
>>    Regards,
>>    Bogdan
>>
>>    michel freiha wrote:
>>
>>        Hello Bogdan,
>>
>>        Kindly note that I tried the following method to configure
>>        local calls:
>>
>>        if($rU =~ "^111" || $rU =~ "^011.*" || $rU =~ "^00.*" || $rU
>>        =~ "^[+].*" )
>>        {
>>        if(!cr_route("default", "0", "$rU", "$rU", "call_id")){
>>              sl_send_reply("403", "Not allowed");
>>            } else {
>>                # In cas of failure, re-route the request
>>                 t_on_failure("1");
>>                 # Relay the request to the gateway
>>                  t_relay();
>>          }
>>
>>
>>        }
>>
>>        else
>>        {
>>
>>        xlog("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX");
>>           route(1);
>>        }
>>        }
>>
>>        When making a Long distance call that begis with 00 everything
>>        looks fine and the call is routed correctly to its
>>        destination...The issue is when trying a call that do not
>>        begin by 00 like calling "micho"...The system access the else
>>        { xlog("XXXXXXXX.....and it enter inside a loop and nothing
>>        will happen on the other side...
>>
>>        Can you advice please about what could be that issue?
>>
>>
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.opensips.org/pipermail/users/attachments/20090129/b43f20c6/attachment.html 


More information about the Users mailing list