<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Hi Remco,<br>
<br>
Indeed, if you a large number of numerical aliases, Dynamic Module
is a very good and efficient way to address the problem.<br>
<br>
Regards,<br>
Bogdan<br>
<br>
On 12/10/2011 03:38 PM, Remco . wrote:
<blockquote
cite="mid:CAJy1ugxMaXRb6BW_x2FDUuHw3+5byp0SXkxoDzFO1XEkc1-xeA@mail.gmail.com"
type="cite">Hi Bogdan,<br>
<br>
Thans for your reply. After some fiddling around I ended up
solving the case using the drouting-module.<br>
This way, blocks of DIDs are also easy to handle.<br>
<br>
Thanks,<br>
Remco.<br>
<br>
<div class="gmail_quote">
On Tue, Dec 6, 2011 at 6:20 PM, Bogdan-Andrei Iancu <span
dir="ltr"><<a moz-do-not-send="true"
href="mailto:bogdan@opensips.org">bogdan@opensips.org</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt
0.8ex; border-left: 1px solid rgb(204, 204, 204);
padding-left: 1ex;">
<div bgcolor="#ffffff" text="#000000"> Hi Remco,<br>
<br>
Try something like that:<br>
<br>
$var(x) = $rU ; # make a backup of original DID
(username part of RURI)<br>
alias_db_lookup() ; # alias the DID to the main account<br>
lookup("location"); # see where the main account is
registered from <br>
$rU = $var(x) ; # when sending call to asterisk, for the
original DID in RURI.<br>
<br>
Regards,<br>
Bogdan
<div>
<div class="h5"><br>
<br>
On 12/06/2011 01:33 AM, Remco . wrote: </div>
</div>
<blockquote type="cite">
<div>
<div class="h5">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 moz-do-not-send="true"
href="mailto:1000@1.2.3.4" target="_blank">1000@1.2.3.4</a><br>
Alias <a moz-do-not-send="true"
href="mailto:1001@sip.domain.nl" target="_blank">1001@sip.domain.nl</a>
=> <a moz-do-not-send="true"
href="mailto:1000@sip.domain.nl" target="_blank">1000@sip.domain.nl</a><br>
<br>
Call comes in, detect whether the R-URI is an alias
and point the call to <a moz-do-not-send="true"
href="mailto:alias@1.2.3.4" target="_blank">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>
</div>
</div>
<pre><fieldset></fieldset>
_______________________________________________
Users mailing list
<a moz-do-not-send="true" href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a>
<a moz-do-not-send="true" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
</blockquote>
<font color="#888888"> <br>
<br>
<pre cols="72">--
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
OpenSIPS solutions and "know-how"</pre>
</font></div>
</blockquote>
</div>
<br>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
OpenSIPS solutions and "know-how"</pre>
</body>
</html>