[OpenSIPS-Users] Call between registered users
Zahid Mehmood
zm23 at columbia.edu
Thu Feb 12 19:45:28 CET 2009
Hi Gonzalo,
Is lookup("location") being called before the uri matching or after?
Looking at the code snippet, If local callers are dialing a pattern that
matches one of the "if (uri=...." Then it is sent to route(4) and
lookup part of the code is not touched.
You may want to add "xlog" messages in your config to see how the call
is processed.
Hope this helps.
--
Zahid
________________________________
From: users-bounces at lists.opensips.org
[mailto:users-bounces at lists.opensips.org] On Behalf Of Gonzalo Gonzalez
Sent: Thursday, February 12, 2009 1:35 PM
To: Opensips
Subject: [OpenSIPS-Users] Call between registered users
Each user has a DID number and the user name match the DID umber, so on
incoming calls to a DID if the user is online it ring that ext. and if
is offline it go to voice mail. Mt issue is when a user call another
user that is online it doesnt go to that user directly even though shows
in the location table.
#from an internal domain -> inbound
#Native SIP destinations are handled using the location table
#Gateway destinations are handled by regular expressions
append_hf("P-hint: inbound->inbound \r\n");
if (uri=~"^sip:[2-9][0-9]{9}@") {
if (is_user_in("credentials","local")) {
route(4);
exit;
};
};
if (uri=~"^sip:1[2-9][0-9]{9}@") {
if (is_user_in("credentials","ld")) {
route(4);
exit;
};
};
if (uri=~"^sip:011[0-9]*@") {
if (is_user_in("credentials","int")) {
route(4);
exit;
};
};
if (!lookup("location")) {
if (does_uri_exist()) {
## User not registered at this time.
## Use the IP Address of your e-mail server
revert_uri();
prefix("u");
rewritehostport("192.168.1.104"); #Use the voicemail IP
route(1);
} else {
sl_send_reply("404", "Not Found");
exit;
}
sl_send_reply("404", "Not Found");
exit;
};
route(1);
}
Any idea or suggestion how to accomplish this?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.opensips.org/pipermail/users/attachments/20090212/784e4efe/attachment.htm
More information about the Users
mailing list