[OpenSIPS-Users] Rewrite R-URI for incoming PSTN calls
Robert Borz
robert.borz at web.de
Mon Jun 1 12:40:23 CEST 2009
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
More information about the Users
mailing list