[OpenSIPS-Users] handling DIDs with alias_db

Remco . remconl87 at gmail.com
Tue Dec 6 00:33:20 CET 2011


Hi,
I'm currently using OpenSIPS as a proxy between PSTN gateways and PBX'es
(Asterisk based).
The PBX'es are registering to OpenSIPS. When a call comes in from the PSTN
it get's routed to the PBX correctly.
However, I would like to use multiple DIDs on the same AOR (e.g. use it as
a trunk).

By using the alias_db module, and the alias_db_lookup() function I'm able
to route calls addressed to alias 1001 to user 1000 but the R-URI/contact
header gets rewritten and the PBX is not able determine which DID is being
called (it comes in with the same R-URI as the user).

What I would like to do is:
user 1000 at 1.2.3.4
Alias 1001 at sip.domain.nl => 1000 at sip.domain.nl

Call comes in, detect whether the R-URI is an alias and point the call to
alias at 1.2.3.4 where 1.2.3.4 is the IP address listed in the AOR for the
user to which the alias is pointing.
Some posts on the list suggest rewriting the contact using subst() from the
textopts module but after some fiddling around with regexes I'm not able to
produce the desired result.

Could someone point me in the right direction?
Thanks in advance,
Remco.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20111206/727b10e8/attachment.htm>


More information about the Users mailing list