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@sp1.com to john@sp2.com Now I need to provide VM services to PhoneA. (Opposite direction) PhoneA calls voicemail but the calling number is john@sp2.com I need to have SP1 use the 11111111@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@sp2.com in dbaliases) If user is found: rewrite From URI: use alias_username@alias_domain
I'm using default kamailio.cfg and calls successfully are forwarded to VM
Thank you
On Thu, Dec 15, 2016 at 12:36:06AM -0800, Gonzalo Gasca Meza wrote:
When PhoneB dials 1111111, Kamailio converts 111111@sp1.com to john@sp2.com Now I need to provide VM services to PhoneA. (Opposite direction) PhoneA calls voicemail but the calling number is john@sp2.com I need to have SP1 use the 11111111@sp1.com format
Your idea works (but I'd use the $au instead of $fu). But essentially it is the same as setting an outgoing callerid, why not use the same logic?
But what happens when John has multiple DID numbers? How will John influence what voicemail to call? I'd argue for provisioning the voicemail for the username, not the DID.