I've got this route, but openser is not finding the user, I get the call as 7777XXXXXXX. So i strip 4 digits and do a lookup, the user IS online but openser says it can't find him... Could it be that openser is not striping right?
if (uri=~"^sip:7777"){ xlog("L_NOTICE", "\n************** GOT CALL FOR IN-SITE ('$tu') ************\n"); strip(4); xlog("L_NOTICE", "\n************** Changing dialed number (Removing 7777) ('$tu') **************\n");
if (!lookup("location")) { sl_send_reply("404", "User Not Online! (In 7777 route)"); exit; }; route(1); }
thanks
d
Seems to me like it is doing the stripping right, I changed the pseudo-variables to:
if (uri=~"^sip:7777"){ xlog("L_NOTICE", "\n************** GOT CALL FOR IN-SITE ('$oU') ************\n"); strip(4); xlog("L_NOTICE", "\n************** Changing dialed number (Removing 7777) ('$rU') **************\n");
if (!lookup("location")) { sl_send_reply("404", "User Not Online! (In 7777 route)"); exit; }; route(1); }
and on the log i get:
Jun 23 07:39:34 sip99 /sbin/openser[24245]: ************** GOT CALL FOR IN-SITE ('77778889990') ************ Jun 23 07:39:34 sip99 /sbin/openser[24245]: ************** Changing dialed number (Removing 7777) ('8889990') **************
but it is not find the user... I've got
use_domain set to 0
any ideas?
On Mon, Jun 23, 2008 at 1:51 PM, David Villasmil < david.villasmil.work@gmail.com> wrote:
I've got this route, but openser is not finding the user, I get the call as 7777XXXXXXX. So i strip 4 digits and do a lookup, the user IS online but openser says it can't find him... Could it be that openser is not striping right?
if (uri=~"^sip:7777"){ xlog("L_NOTICE", "\n************** GOT CALL FOR IN-SITE
('$tu') ************\n"); strip(4); xlog("L_NOTICE", "\n************** Changing dialed number (Removing 7777) ('$tu') **************\n");
if (!lookup("location")) { sl_send_reply("404", "User Not Online! (In 7777
route)"); exit; }; route(1); }
thanks
d
My mistake!
I had
use_domain as 0 for domain, but not for usrloc!
dumb!
thanks!
On Mon, Jun 23, 2008 at 2:00 PM, David Villasmil < david.villasmil.work@gmail.com> wrote:
Seems to me like it is doing the stripping right, I changed the pseudo-variables to:
if (uri=~"^sip:7777"){ xlog("L_NOTICE", "\n************** GOT CALL FOR IN-SITE
('$oU') ************\n"); strip(4); xlog("L_NOTICE", "\n************** Changing dialed number (Removing 7777) ('$rU') **************\n");
if (!lookup("location")) { sl_send_reply("404", "User Not Online! (In 7777
route)"); exit; }; route(1); }
and on the log i get:
Jun 23 07:39:34 sip99 /sbin/openser[24245]: ************** GOT CALL FOR IN-SITE ('77778889990') ************ Jun 23 07:39:34 sip99 /sbin/openser[24245]: ************** Changing dialed number (Removing 7777) ('8889990') **************
but it is not find the user... I've got
use_domain set to 0
any ideas?
On Mon, Jun 23, 2008 at 1:51 PM, David Villasmil < david.villasmil.work@gmail.com> wrote:
I've got this route, but openser is not finding the user, I get the call as 7777XXXXXXX. So i strip 4 digits and do a lookup, the user IS online but openser says it can't find him... Could it be that openser is not striping right?
if (uri=~"^sip:7777"){ xlog("L_NOTICE", "\n************** GOT CALL FOR
IN-SITE ('$tu') ************\n"); strip(4); xlog("L_NOTICE", "\n************** Changing dialed number (Removing 7777) ('$tu') **************\n");
if (!lookup("location")) { sl_send_reply("404", "User Not Online! (In 7777
route)"); exit; }; route(1); }
thanks
d