[SR-Users] Kamailio 4.3 Rewriting From and db_alias values
Gonzalo Gasca Meza
gascagonzalo at gmail.com
Thu Dec 15 09:36:06 CET 2016
Hi forum,
This is the scenario:
VM <- Kamailio -> SP1 ----- SP2 ---- PhoneA (john)
PhoneB
PhoneA is configured in *dbaliases* table:
alias_username, alias_domain, username, domain
11111111, sp1.com, john, sp2.com
When PhoneB dials 1111111, Kamailio converts 111111 at sp1.com to john at sp2.com
Now I need to provide VM services to PhoneA. (Opposite direction)
PhoneA calls voicemail but the calling number is john at sp2.com
I need to have SP1 use the 11111111 at sp1.com format
How can I overwrite the From?
Pseudo algorithm
------------------------
If destination is VM and from domain ($fU) is sp2.com:
Find user URI: ( In this case john extracted from john at sp2.com in
dbaliases)
If user is found:
rewrite From URI:
use alias_username at alias_domain
I'm using default kamailio.cfg and calls successfully are forwarded to VM
Thank you
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20161215/d8ab0999/attachment.html>
More information about the sr-users
mailing list