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 <[email protected] <mailto:[email protected]>> 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 [email protected] <mailto:[email protected]>
    Alias [email protected] <mailto:[email protected]> =>
    [email protected] <mailto:[email protected]>

    Call comes in, detect whether the R-URI is an alias and point the
    call to [email protected] <mailto:[email protected]> 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
    [email protected]  <mailto:[email protected]>
    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"

_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

Reply via email to