Local call

classic Classic list List threaded Threaded
22 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Local call

michel freiha
Dear All,

I'm using carrierroute module fro load balancing as follow:


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();
}

Everything looks fine when making a long distance call that begin with 00...The issue is when making a local call to opensips, the server return Not Allowed...
Can you tell me please what is missing here?

Regards

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Local call

Bogdan-Andrei Iancu
Hi Michel,

Try using the dynamic Routing module - it is simple to configure and I
can help you there. You can achieve the same functionality.

Regards,
Bogdan

michel freiha wrote:

> Dear All,
>
> I'm using carrierroute module fro load balancing as follow:
>
>
> 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();
> }
>
> Everything looks fine when making a long distance call that begin with
> 00...The issue is when making a local call to opensips, the server
> return Not Allowed...
> Can you tell me please what is missing here?
>
> Regards
> ------------------------------------------------------------------------
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>  


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Local call

michel freiha
Dear Bogdan,

Please let me know before using the dynamic routing module if there is a possibility to make local calls with carrierroute

regards

On Wed, Jan 28, 2009 at 5:25 PM, Bogdan-Andrei Iancu <[hidden email]> wrote:
Hi Michel,

Try using the dynamic Routing module - it is simple to configure and I can help you there. You can achieve the same functionality.

Regards,
Bogdan

michel freiha wrote:
Dear All,

I'm using carrierroute module fro load balancing as follow:


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();
}

Everything looks fine when making a long distance call that begin with 00...The issue is when making a local call to opensips, the server return Not Allowed...
Can you tell me please what is missing here?

Regards
------------------------------------------------------------------------

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



_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Local call

michel freiha
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?

Regards

On Wed, Jan 28, 2009 at 10:35 PM, michel freiha <[hidden email]> wrote:
Dear Bogdan,

Please let me know before using the dynamic routing module if there is a possibility to make local calls with carrierroute

regards


On Wed, Jan 28, 2009 at 5:25 PM, Bogdan-Andrei Iancu <[hidden email]> wrote:
Hi Michel,

Try using the dynamic Routing module - it is simple to configure and I can help you there. You can achieve the same functionality.

Regards,
Bogdan

michel freiha wrote:
Dear All,

I'm using carrierroute module fro load balancing as follow:


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();
}

Everything looks fine when making a long distance call that begin with 00...The issue is when making a local call to opensips, the server return Not Allowed...
Can you tell me please what is missing here?

Regards
------------------------------------------------------------------------

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




_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Local call

Raúl Alexis Betancor Santana
El Jueves, 29 de Enero de 2009 08:57, michel freiha escribió:

> 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...

The system always will go to the else statement, because in your if statement
your regular expresions only catch uri's that in it Username are:

-111
-011.*
-00.*
-+.*

Where do you catch the usernames that begins with alphabetic chars ? no where

> Can you advice please about what could be that issue?

Yes, read a good book about regular expressions.

--
Raúl Alexis Betancor Santana
Dimensión Virtual

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Local call

michel freiha
Dear Sir,

Let's forget the alphanumeric extension name...I troed to dial an extension where the username is 123456 and I got the same issue...The system ente in a loop

Regards

On Thu, Jan 29, 2009 at 11:22 AM, Raúl Alexis Betancor Santana <[hidden email]> wrote:
El Jueves, 29 de Enero de 2009 08:57, michel freiha escribió:
> 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...

The system always will go to the else statement, because in your if statement
your regular expresions only catch uri's that in it Username are:

-111
-011.*
-00.*
-+.*

Where do you catch the usernames that begins with alphabetic chars ? no where

> Can you advice please about what could be that issue?

Yes, read a good book about regular expressions.

--
Raúl Alexis Betancor Santana
Dimensión Virtual

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


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Local call

Iñaki Baz Castillo
El Jueves, 29 de Enero de 2009, michel freiha escribió:
> Dear Sir,
>
> Let's forget the alphanumeric extension name...I troed to dial an extension
> where the username is 123456 and I got the same issue...The system ente in
> a loop

123456 doesn't match your if stament:

  if($rU =~ "^111" || $rU =~ "^011.*" || $rU =~ "^00.*" || $rU =~ "^[+].*" )


--
Iñaki Baz Castillo

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Local call

michel freiha
In reply to this post by Raúl Alexis Betancor Santana
Dear Sir,

Even i tried the below:


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 if($rU =~ "^123456")
{
route(1);
exit;

}}

When dialing 123456 the system starts a looop

Regards

On Thu, Jan 29, 2009 at 11:22 AM, Raúl Alexis Betancor Santana <[hidden email]> wrote:
El Jueves, 29 de Enero de 2009 08:57, michel freiha escribió:
> 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...

The system always will go to the else statement, because in your if statement
your regular expresions only catch uri's that in it Username are:

-111
-011.*
-00.*
-+.*

Where do you catch the usernames that begins with alphabetic chars ? no where

> Can you advice please about what could be that issue?

Yes, read a good book about regular expressions.

--
Raúl Alexis Betancor Santana
Dimensión Virtual

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


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Local call

michel freiha
In reply to this post by Iñaki Baz Castillo
Dear Sir,

What i need is the following:

The customer will a number, if his number begins with 00 or 011 or 111 or +, the system will use carrierroute table and forward the call to the GW registered on the database...Else, the call will be considered as Local call and...

Please lt me know how this could be done because i tried a lot of ways and all these ways failed with me

Regards

On Thu, Jan 29, 2009 at 11:39 AM, Iñaki Baz Castillo <[hidden email]> wrote:
El Jueves, 29 de Enero de 2009, michel freiha escribió:
> Dear Sir,
>
> Let's forget the alphanumeric extension name...I troed to dial an extension
> where the username is 123456 and I got the same issue...The system ente in
> a loop

123456 doesn't match your if stament:

 if($rU =~ "^111" || $rU =~ "^011.*" || $rU =~ "^00.*" || $rU =~ "^[+].*" )


--
Iñaki Baz Castillo

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


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Local call

Bogdan-Andrei Iancu
In reply to this post by michel freiha
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?


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Local call

michel freiha
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");
        }

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


regards

On Thu, Jan 29, 2009 at 12:01 PM, Bogdan-Andrei Iancu <[hidden email]> 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?



_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Local call

Bogdan-Andrei Iancu
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
> <[hidden email] <mailto:[hidden email]>> 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?
>
>
>


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Local call

michel freiha
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 <[hidden email]> 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 <[hidden email] <mailto:[hidden email]>> 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?






_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Local call

michel freiha
In reply to this post by michel freiha
Dear Bogdan,

Sorry to bother you but I need to fix this matter...When trying to call 123456 I got the following message:
5:41 [19771] DBG:core:get_hdr_field: to body ["mmm"<[hidden email]>
]
Jan 29 12:45:41 [19771] DBG:uri:has_totag: no totag
Jan 29 12:45:41 [19771] DBG:core:parse_headers: flags=78
Jan 29 12:45:41 [19771] DBG:core:get_hdr_field: cseq <CSeq>: <1> <SUBSCRIBE>
Jan 29 12:45:41 [19771] DBG:tm:t_lookup_request: start searching: hash=45509, isACK=0
Jan 29 12:45:41 [19771] DBG:tm:matching_3261: RFC3261 transaction matched, tid=-d8754z-de5f02108115212b-1---d8754z-
Jan 29 12:45:41 [19771] DBG:tm:t_lookup_request: REF_UNSAFE: after is 1
Jan 29 12:45:41 [19771] DBG:tm:t_lookup_request: transaction found (T=0xb614d800)
Jan 29 12:45:41 [19771] DBG:tm:t_retransmit_reply: nothing to retransmit
Jan 29 12:45:41 [19771] DBG:tm:t_check_trans: UNREF_UNSAFE: after is 0
Jan 29 12:45:41 [19771] DBG:core:destroy_avp_list: destroying list (nil)
Jan 29 12:45:41 [19771] DBG:core:receive_msg: cleaning up
Jan 29 12:45:41 [19772] DBG:tm:utimer_routine: timer routine:7,tl=0xb614d94c next=(nil), timeout=140700000
Jan 29 12:45:41 [19772] DBG:tm:retransmission_handler: retransmission_handler : request resending (t=0xb614d800, SUBSCRIBE ... )
Jan 29 12:45:41 [19772] DBG:tm:set_timer: relative timeout is 4000000
Jan 29 12:45:41 [19772] DBG:tm:insert_timer_unsafe: [7]: 0xb614d94c (144700000)
Jan 29 12:45:41 [19772] DBG:tm:retransmission_handler: retransmission_handler : done
DBG:tm:t_lookup_request: start searching: hash=49306, isACK=0
-bash: DBG:tm:t_lookup_request:: command not found
[root@registrar1 ~]# Jan 29 12:35:55 [19663] DBG:tm:matching_3261: RFC3261 transaction matching failed
-bash: Jan: command not found
[root@registrar1 ~]# Jan 29 12:35:55 [19663] DBG:tm:t_lookup_request: no transaction foundJan 29 12:45:43 [19772] DBG:tm:utimer_routine: timer routine:7,tl=0xb614f644 next=(nil), timeout=142500000
Jan 29 12:45:43 [19772] DBG:tm:retransmission_handler: retransmission_handler : request resending (t=0xb614f4f8, INVITE si ... )
Jan 29 12:45:43 [19772] DBG:tm:set_timer: relative timeout is 4000000
Jan 29 12:45:43 [19772] DBG:tm:insert_timer_unsafe: [7]: 0xb614f644 (146500000)
Jan 29 12:45:43 [19772] DBG:tm:retransmission_handler: retransmission_handler : done
Jan 29 12:45:43 [19772] DBG:tm:timer_routine: timer routine:0,tl=0xb614d968 next=(nil), timeout=143
Jan 29 12:45:43 [19772] DBG:tm:final_response_handler: stop retr. and send CANCEL (0xb614d800)
Jan 29 12:45:43 [19772] DBG:tm:t_should_relay_response: T_code=0, new_code=408
Jan 29 12:45:43 [19772] DBG:tm:t_pick_branch: picked branch 0, code 408
Jan 29 12:45:43 [19772] DBG:tm:is_3263_failure: dns-failover test: branch=0, last_recv=408, flags=0
Jan 29 12:45:43 [19772] DBG:tm:t_should_relay_response: trying DNS-based failover
Jan 29 12:45:43 [19772] DBG:tm:relay_reply: branch=0, save=0, relay=0
Jan 29 12:45:43 [19772] DBG:core:parse_headers: flags=ffffffffffffffff
Jan 29 12:45:43 [19772] DBG:core:check_via_address: params 193.227.186.146, 192.168.0.164, 0
Jan 29 12:45:43 [19772] DBG:core:_shm_resize: resize(0) called
Jan 29 12:45:43 [19772] DBG:tm:insert_timer_unsafe: [2]: 0xb614d848 (148)
Jan 29 12:45:43 [19772] DBG:tm:relay_reply: sent buf=0x819ef50: SIP/2.0 4..., shmem=0xb61517f8: SIP/2.0 4
Jan 29 12:45:43 [19772] DBG:tm:final_response_handler: done

Regards

On Wed, Jan 28, 2009 at 12:12 AM, michel freiha <[hidden email]> wrote:
Dear All,

I'm using carrierroute module fro load balancing as follow:


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();
}

Everything looks fine when making a long distance call that begin with 00...The issue is when making a local call to opensips, the server return Not Allowed...
Can you tell me please what is missing here?

Regards


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Local call

michel freiha
Dear All,

The issue has been solved and we are able to make long distance calls using carrierroute module and make local calls...The methid is the below:

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
#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;
}


This is for all users list info

Regards

On Thu, Jan 29, 2009 at 12:55 PM, michel freiha <[hidden email]> wrote:
Dear Bogdan,

Sorry to bother you but I need to fix this matter...When trying to call 123456 I got the following message:
5:41 [19771] DBG:core:get_hdr_field: to body ["mmm"<[hidden email]>
]
Jan 29 12:45:41 [19771] DBG:uri:has_totag: no totag
Jan 29 12:45:41 [19771] DBG:core:parse_headers: flags=78
Jan 29 12:45:41 [19771] DBG:core:get_hdr_field: cseq <CSeq>: <1> <SUBSCRIBE>
Jan 29 12:45:41 [19771] DBG:tm:t_lookup_request: start searching: hash=45509, isACK=0
Jan 29 12:45:41 [19771] DBG:tm:matching_3261: RFC3261 transaction matched, tid=-d8754z-de5f02108115212b-1---d8754z-
Jan 29 12:45:41 [19771] DBG:tm:t_lookup_request: REF_UNSAFE: after is 1
Jan 29 12:45:41 [19771] DBG:tm:t_lookup_request: transaction found (T=0xb614d800)
Jan 29 12:45:41 [19771] DBG:tm:t_retransmit_reply: nothing to retransmit
Jan 29 12:45:41 [19771] DBG:tm:t_check_trans: UNREF_UNSAFE: after is 0
Jan 29 12:45:41 [19771] DBG:core:destroy_avp_list: destroying list (nil)
Jan 29 12:45:41 [19771] DBG:core:receive_msg: cleaning up
Jan 29 12:45:41 [19772] DBG:tm:utimer_routine: timer routine:7,tl=0xb614d94c next=(nil), timeout=140700000
Jan 29 12:45:41 [19772] DBG:tm:retransmission_handler: retransmission_handler : request resending (t=0xb614d800, SUBSCRIBE ... )
Jan 29 12:45:41 [19772] DBG:tm:set_timer: relative timeout is 4000000
Jan 29 12:45:41 [19772] DBG:tm:insert_timer_unsafe: [7]: 0xb614d94c (144700000)
Jan 29 12:45:41 [19772] DBG:tm:retransmission_handler: retransmission_handler : done
DBG:tm:t_lookup_request: start searching: hash=49306, isACK=0
-bash: DBG:tm:t_lookup_request:: command not found
[root@registrar1 ~]# Jan 29 12:35:55 [19663] DBG:tm:matching_3261: RFC3261 transaction matching failed
-bash: Jan: command not found
[root@registrar1 ~]# Jan 29 12:35:55 [19663] DBG:tm:t_lookup_request: no transaction foundJan 29 12:45:43 [19772] DBG:tm:utimer_routine: timer routine:7,tl=0xb614f644 next=(nil), timeout=142500000
Jan 29 12:45:43 [19772] DBG:tm:retransmission_handler: retransmission_handler : request resending (t=0xb614f4f8, INVITE si ... )
Jan 29 12:45:43 [19772] DBG:tm:set_timer: relative timeout is 4000000
Jan 29 12:45:43 [19772] DBG:tm:insert_timer_unsafe: [7]: 0xb614f644 (146500000)
Jan 29 12:45:43 [19772] DBG:tm:retransmission_handler: retransmission_handler : done
Jan 29 12:45:43 [19772] DBG:tm:timer_routine: timer routine:0,tl=0xb614d968 next=(nil), timeout=143
Jan 29 12:45:43 [19772] DBG:tm:final_response_handler: stop retr. and send CANCEL (0xb614d800)
Jan 29 12:45:43 [19772] DBG:tm:t_should_relay_response: T_code=0, new_code=408
Jan 29 12:45:43 [19772] DBG:tm:t_pick_branch: picked branch 0, code 408
Jan 29 12:45:43 [19772] DBG:tm:is_3263_failure: dns-failover test: branch=0, last_recv=408, flags=0
Jan 29 12:45:43 [19772] DBG:tm:t_should_relay_response: trying DNS-based failover
Jan 29 12:45:43 [19772] DBG:tm:relay_reply: branch=0, save=0, relay=0
Jan 29 12:45:43 [19772] DBG:core:parse_headers: flags=ffffffffffffffff
Jan 29 12:45:43 [19772] DBG:core:check_via_address: params 193.227.186.146, 192.168.0.164, 0
Jan 29 12:45:43 [19772] DBG:core:_shm_resize: resize(0) called
Jan 29 12:45:43 [19772] DBG:tm:insert_timer_unsafe: [2]: 0xb614d848 (148)
Jan 29 12:45:43 [19772] DBG:tm:relay_reply: sent buf=0x819ef50: SIP/2.0 4..., shmem=0xb61517f8: SIP/2.0 4
Jan 29 12:45:43 [19772] DBG:tm:final_response_handler: done

Regards


On Wed, Jan 28, 2009 at 12:12 AM, michel freiha <[hidden email]> wrote:
Dear All,

I'm using carrierroute module fro load balancing as follow:


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();
}

Everything looks fine when making a long distance call that begin with 00...The issue is when making a local call to opensips, the server return Not Allowed...
Can you tell me please what is missing here?

Regards



_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Local call

Iñaki Baz Castillo
In reply to this post by michel freiha
El Jueves, 29 de Enero de 2009, michel freiha escribió:

> Dear Sir,
>
> What i need is the following:
>
> The customer will a number, if his number begins with 00 or 011 or 111 or
> +, the system will use carrierroute table and forward the call to the GW
> registered on the database...Else, the call will be considered as Local
> call and...
>
> Please lt me know how this could be done because i tried a lot of ways and
> all these ways failed with me

I just wanted to notify you that you "if" condition is wrong. Fixing it would
be a good start point.

--
Iñaki Baz Castillo

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Local call

Iñaki Baz Castillo
In reply to this post by michel freiha
El Jueves, 29 de Enero de 2009, michel freiha escribió:
> When trying to make a call to 123456, the softphone returns timeout after
> 30 to 40 s

Monitorize with ngrep what is happening.
Getting a timeout means that the request OpenSIPS sent got no response.

--
Iñaki Baz Castillo

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Local call

michel freiha
In reply to this post by Iñaki Baz Castillo
Dear Sir,
 
It's working fine...Can you explain what's wrong in it please?
 
Regards

On Thu, Jan 29, 2009 at 8:22 PM, Iñaki Baz Castillo <[hidden email]> wrote:
El Jueves, 29 de Enero de 2009, michel freiha escribió:
> Dear Sir,
>
> What i need is the following:
>
> The customer will a number, if his number begins with 00 or 011 or 111 or
> +, the system will use carrierroute table and forward the call to the GW
> registered on the database...Else, the call will be considered as Local
> call and...
>
> Please lt me know how this could be done because i tried a lot of ways and
> all these ways failed with me

I just wanted to notify you that you "if" condition is wrong. Fixing it would
be a good start point.

--
Iñaki Baz Castillo

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


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Local call

Iñaki Baz Castillo
El Jueves, 29 de Enero de 2009, michel freiha escribió:
> Dear Sir,
>
> It's working fine...Can you explain what's wrong in it please?

I just mean that 123456 doesn't match this stament:

  if($rU =~ "^111" || $rU =~ "^011.*" || $rU =~ "^00.*" || $rU =~ "^[+].*" )

Do you say that it does?

--
Iñaki Baz Castillo

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Local call

michel freiha
Hello Iñaki,

I do not need to match 123456 with this if...I apologize if I do not explain well

Regards

On Thu, Jan 29, 2009 at 9:02 PM, Iñaki Baz Castillo <[hidden email]> wrote:
El Jueves, 29 de Enero de 2009, michel freiha escribió:
> Dear Sir,
>
> It's working fine...Can you explain what's wrong in it please?

I just mean that 123456 doesn't match this stament:

 if($rU =~ "^111" || $rU =~ "^011.*" || $rU =~ "^00.*" || $rU =~ "^[+].*" )

Do you say that it does?

--
Iñaki Baz Castillo

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


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