Hi,<br>I'm currently using OpenSIPS as a proxy between PSTN gateways and PBX'es (Asterisk based).<br>The PBX'es are registering to OpenSIPS. When a call comes in from the PSTN it get's routed to the PBX correctly.<br>
However, I would like to use multiple DIDs on the same AOR (e.g. use it as a trunk).<br><br>By using the alias_db module, and the<code> </code>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).<br>
<br>What I would like to do is:<br>user <a href="mailto:1000@1.2.3.4">1000@1.2.3.4</a><br>Alias <a href="mailto:1001@sip.domain.nl">1001@sip.domain.nl</a> => <a href="mailto:1000@sip.domain.nl">1000@sip.domain.nl</a><br>
<br>Call comes in, detect whether the R-URI is an alias and point the call to <a href="mailto:alias@1.2.3.4">alias@1.2.3.4</a> where 1.2.3.4 is the IP address listed in the AOR for the user to which the alias is pointing.<br>
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.<br><br>Could someone point me in the right direction?<br>
Thanks in advance,<br>Remco.<br>