[OpenSIPS-Users] Call between registered users
Gonzalo Gonzalez
gonzovoip at yahoo.com
Thu Feb 12 19:35:09 CET 2009
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 doesn’t 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/7698d645/attachment.htm
More information about the Users
mailing list