Dear Inaki
Thanks for your help..I had the if statements wrong..can you please help me on how to send
a 404 statement ?
Thank you.
-----Original Message-----
From: users-bounces(a)lists.openser.org [mailto:users-bounces@lists.openser.org] On Behalf
Of Ali Jawad
Sent: Tuesday, February 12, 2008 5:12 PM
To: Iñaki Baz Castillo; users(a)lists.openser.org
Subject: Re: [OpenSER-Users] Routing Problem "To Many Hops"
Thank you for your reply
I commented out my section and replaced it with
if (does_uri_exist()) { # The called number is a local user
if (lookup("location")) # The user is online
{
route(1);
exit;
}
else
{
route(2);
exit;
}
}
Now if I call a PSTN number I get too many hops, and if I do a local call to a user online
it does not ring at the other end.
Thank you.
-----Original Message-----
From: users-bounces(a)lists.openser.org [mailto:users-bounces@lists.openser.org] On Behalf
Of Iñaki Baz Castillo
Sent: Tuesday, February 12, 2008 5:02 PM
To: users(a)lists.openser.org
Subject: Re: [OpenSER-Users] Routing Problem "To Many Hops"
On Tuesday 12 February 2008 15:51:34 Ali Jawad wrote:
Hi All
I am trying to achieve the following
1. User Calls a number
* If the number is 00+all numbers go to PSTN -> Else check if the
user is existent in our SIP Proxy user pool and act accordingly
What I achieved so far is the following
2. User Calls a number
* Route checks if the number is online if yes the call is routed
to him (route[1]) if not it send the call to PSTN if it is 00+[0-9]
route [2]. This works fine for 00+[0-9] number however if 123456 is
called and the user 123456 is not online, the call goes down through the
conditional statements because it does not meet 00+[0-9] and I get an
error "To Many Hops"
Use:
if (does_uri_exist()) { # The called number is a local user
if (lookup("location")) # If user is online call him:
route(CALL_USER);
else
route(VOICEMAIL); # Or send 404
}
In this way you will avoid sending out a call for an online user that is not
registered.
--
Iñaki Baz Castillo
ibc(a)in.ilimit.es
_______________________________________________
Users mailing list
Users(a)lists.openser.org
http://lists.openser.org/cgi-bin/mailman/listinfo/users
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
_______________________________________________
Users mailing list
Users(a)lists.openser.org
http://lists.openser.org/cgi-bin/mailman/listinfo/users
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.