Virtual Domain Redirects

Home » Asterisk Users » Virtual Domain Redirects
Asterisk Users 1 Comment

I run an ISP with virtual services. We also offer VoIP. Currently we have our DNS set up so that virtual domains can have SIP addresses in their own domain. However, it comes to Asterisk as just the user name. For example, my SIP address is sip:darcy@VybeNetworks.com which calls extension darcy. That’s fine because I am darcy in both the virtual domain as well as the underlying ISP domain. However, clients can have whatever user name they want within their own domain. For example there might be a darcy@example.com that points to user dc2016
on our server. That means that the client’s sip address has to be dc2016@example.com.

I am trying to figure out how to allow darcy@example.com to be translated to dc2016@vex.net (out ISP domain) but I am at a loss to see how it could work. It almost seems like I need to run a separate asterisk server for each virtual client. Is there some sort of proxy software that will let me do that more efficiently? Is there some magic DNS entries that can change it?

If it helps I am generating the configs from my client database for asterisk as well as DNS so I don’t care how complicated the configs get.

Thanks.

One thought on - Virtual Domain Redirects

  • I think I see where I can hook this.

    same => n,Verbose(0,To: ${SIP_HEADER(To)})

    This shows me the actual address called. e.g.
    “To: “. Now I just need to look for a place to grab this and put in a GoTo. Perhaps a new incoming context that does the lookup and then jumps to the existing incoming context.