[OpenSIPS-Users] Rewrite R-URI for incoming PSTN calls

osiris123d duane.larson at gmail.com
Sun Aug 9 05:41:01 CEST 2009


I was wondering how to solve this issue and sure thing using PDT and
inserting the info into the PDT table worked, but I noticed that after I
insert data into PDT via mysql I have to restart OpenSIPS in order for me to
be able to call the DID number.  Does this make sense?  I figured I wouldn't
need to restart OpenSIPS.


Andreas Westermaier wrote:
> 
> Hi Robert,
> 
> that's almost the same issue we ran into some day... the best what you can
> do (maybe for future setups) is what Bogdan already told you.
> 
> One solution would be using the pdt module. It allows you to rewrite the
> domain part and do matching against a given prefix (here the DID).
> 
> In your example you could place the DIDs in the pdt table and associate
> them with the destination domain for which they should be available. E.g.
> 
>  sdomain |    prefix    |   domain    
> ---------+--------------+--------------
>  *       |        10000 | example1.com
> 
> Using the prefix2domain("2") function in your opensips.cfg leaves the
> prefix untouched and rewrites only the ruri's domain part:
> 
> 10000@<ip-address> ---> 10000 at example1.com
> 
> Now the lookup function should be able to determine the right callee for
> the DID 10000.
> 
> 
> Regards,
> Andreas
> 
> 
> -------- Original-Nachricht --------
>> Datum: Mon, 01 Jun 2009 14:14:48 +0300
>> Von: Bogdan-Andrei Iancu <bogdan at voice-system.ro>
>> An: Robert Borz <robert.borz at web.de>
>> CC: users at lists.opensips.org
>> Betreff: Re: [OpenSIPS-Users] Rewrite R-URI for incoming PSTN calls
> 
>> Hi Robert,
>> 
>> I suggest a kind of separation between SIP ids (which are multidomain 
>> -userpart may appear in more domains-  and the identifier is 
>> user at domain) and the DID (or numbers that are unique and do not belong 
>> to any domain).
>> 
>> This will solve the problem of SIP IDS with domain and DIDs without
>> domains.
>> 
>> To map DIDs over the SIP accounts, use aliases (aliasesdb).
>> 
>> Regards,
>> Bogdan
>> 
>> Robert Borz wrote:
>> > Hi,
>> >
>> > While now running our sip proxy quite a while our requirements changed
>> and we now need a multidomain setup with pstn connectivity, which almost
>> works already. But I need help for solving a special issue... ok, here's
>> the
>> problem...
>> >
>> > Imagine we got the accounts 10000 at example1.com and 20000 at example2.com
>> (both got pstn-numbers as their uri parts).
>> >
>> > In our current configuration it is possible to dial pstn numbers by
>> omitting the domain part (use_domain=0, usrloc) and every body can reach
>> the
>> other (e.g. 1000 at example1.com just dials 20000 and ends up by talking to
>> 20000 at example2.com). It is also possible to receive pstn calls from our
>> gateway
>> which addresses the users by an ruri like "10000@<ip-address>".
>> Everythings great.
>> >
>> > But now we set use_domain=1 (usrloc), because we want to allow same
>> uri-parts for different domains (e.g. userxy at example1.com and
>> userxy at example2.com).
>> >
>> > If now 10000 at example1.com dials a pstn number, let's say 12345, and
>> omits the domain part, the sip server redirects the call to our
>> pstn-gateway
>> and the call get's established.
>> >
>> > But if we got the accounts 10000 at example1.com and 10000 at example2.com
>> where only the first is the user allowed to receive pstn calls for the
>> pstn
>> number 10000 and the second is not, the call from our pstn gateway comes
>> in
>> with ruri=10000@<ip-address> and because use_domain=1 is set for the
>> usrloc
>> module, the sip server cannot direct the call to the user
>> 10000 at example1.com because 10000 at example1.com is not the same domain as
>> 10000@<ip-address>.
>> >
>> > What we would need is an additional mapping/translation. On an incoming
>> call from our pstn gateway for 10000@<ip-address> must be translated for
>> either 10000 at example1.com or 10000 at example2.com. So we need to rewrite
>> the
>> ruri. The best would be a database table holding at least the following
>> information:
>> >
>> > uri, dst_domain
>> > 10000, example1.com
>> > 20000, example2.com
>> >
>> > So if we receive a call from our pstn gateway, we can lookup the
>> destination domain from this table an rewrite the ruri accordingly.
>> >
>> > Is there already a module/method for achieving this goal?
>> >
>> > This is a lot of text and I hope you can follow me... any help would be
>> really appreciated.
>> >
>> >
>> > Regards,
>> > Robert
>> > ____________________________________________________________
>> > Text: GRATIS für alle WEB.DE-Nutzer: Die maxdome Movie-FLAT!
>> > Jetzt freischalten unter http://movieflat.web.de
>> >
>> >
>> > _______________________________________________
>> > Users mailing list
>> > Users at lists.opensips.org
>> > http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>> >
>> >   
>> 
>> 
>> _______________________________________________
>> Users mailing list
>> Users at lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
> 
> -- 
> Nur bis 31.05.: GMX FreeDSL Komplettanschluss mit DSL 6.000 Flatrate und
> Telefonanschluss nur 17,95 Euro/mtl.!* http://portal.gmx.net/de/go/dsl02
> 
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
> 
> 

-- 
View this message in context: http://n2.nabble.com/Rewrite-R-URI-for-incoming-PSTN-calls-tp3005550p3411381.html
Sent from the OpenSIPS - Users mailing list archive at Nabble.com.



More information about the Users mailing list