[OpenSIPS-Users] handling DIDs with alias_db

Bogdan-Andrei Iancu bogdan at opensips.org
Mon Dec 12 10:56:28 CET 2011


Hi Remco,

Indeed, if you a large number of numerical aliases, Dynamic Module is a 
very good and efficient way to address the problem.

Regards,
Bogdan

On 12/10/2011 03:38 PM, Remco . wrote:
> Hi Bogdan,
>
> Thans for your reply. After some fiddling around I ended up solving 
> the case using the drouting-module.
> This way, blocks of DIDs are also easy to handle.
>
> Thanks,
> Remco.
>
> On Tue, Dec 6, 2011 at 6:20 PM, Bogdan-Andrei Iancu 
> <bogdan at opensips.org <mailto:bogdan at opensips.org>> wrote:
>
>     Hi Remco,
>
>     Try something like that:
>
>         $var(x) = $rU ; # make a backup of original DID (username part
>     of RURI)
>         alias_db_lookup() ;  # alias the DID to the main account
>         lookup("location");  # see where the main account is
>     registered from
>         $rU = $var(x) ; # when sending call to asterisk, for the
>     original DID in RURI.
>
>     Regards,
>     Bogdan
>
>
>     On 12/06/2011 01:33 AM, Remco . wrote:
>>     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 <mailto:1000 at 1.2.3.4>
>>     Alias 1001 at sip.domain.nl <mailto:1001 at sip.domain.nl> =>
>>     1000 at sip.domain.nl <mailto: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 <mailto: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.
>>
>>
>>     _______________________________________________
>>     Users mailing list
>>     Users at lists.opensips.org  <mailto:Users at lists.opensips.org>
>>     http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
>     -- 
>     Bogdan-Andrei Iancu
>     OpenSIPS Founder and Developer
>     OpenSIPS solutions and "know-how"
>
>


-- 
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
OpenSIPS solutions and "know-how"

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20111212/7ae73867/attachment.htm>


More information about the Users mailing list