On Wed, May 02, 2018 at 05:26:07AM +0000, KamDev Essa wrote:
How do I :
- Associate the 10 digit DID to the 201 or 202?
Can be done with (but not limited to)
https://www.kamailio.org/docs/modules/5.1.x/modules/alias_db.html
or a simple hardcoded line:
if($rU=="0123456789")
{
$rU="201";
}
- In the cfg, check if user is registered if??
With lookup():
https://www.kamailio.org/docs/modules/5.1.x/modules/registrar.html#registra…
- yes, relay call to user
- no relay call to VM server.
The one line you mentioned shows the example, examing the returncode of
lookup. If not 1 you can sent the call to voicemail by changing $ru (or
specific parts like $rd) and relaying the call. So instead of
sl_send_reply("404", "Not Found");
exit;
you could do something like:
$rd="voicemail.domain.tld";
route(RELAY);
exit;