[OpenSIPS-Users] Multi-Domain Setup with PSTN Connectivity
Mark Sayer
datapipes at avtb.co.nz
Tue Jan 20 21:04:44 CET 2009
We successfully run things a bit differently. Our in-bound from pstn
goes to OpenSER (and may be translated to an Asterisk extension using
dbalias) then to Asterisk. If the final destination is a UA then it
goes back out thru OpenSER. Out-bound to pstn goes directly out from
Asterisk. OpenSER handles all registration and NAT. Works well in
production and config for both OpenSER and Asterisk is relatively
simple and easy to maintain.
Mark
At 08:19 a.m. 21/01/2009, you wrote:
>Ok, just hacking around I succeeded with the following code snippet
>to rewrite the domain part:
>
>avp_db_query("SELECT domain FROM uri WHERE uri_user='$rU'",
>"$avp(i:678)"); avp_pushto("$ru/domain", "$avp(i:678)");
>
>And the IP address of the SER server in the INVITE gets replaced by
>the domain and everything works well. But I can't imagine that this
>is what people do in a situation like mine...
>
>
>-----Original Message-----
>From: users-bounces at lists.opensips.org
>[mailto:users-bounces at lists.opensips.org] On Behalf Of Robert Borz
>Sent: Tuesday, January 20, 2009 7:23 PM
>To: users at lists.opensips.org
>Subject: [OpenSIPS-Users] Multi-Domain Setup with PSTN Connectivity
>
>Hi,
>
>I'm currently setting up OpenSIPS/OpenSER with Asterisk as a PSTN
>gateway. As starting point I'm using the configuration wizard from
>sip:wise [1].
>
>After some modifications to the module configurations it works fine,
>without any (obvious) failures.
>
>Both, SER and Asterisk has public IP addresses on their its
>interfaces and SER is setup for multiple domains. Multi-Domain
>support also works fine for calls handled within SER, and also does
>PSTN termination when forwarding non-local calls to the right domain
>(sip proxy) and non-local-pstn-calls to the Asterisk machine.
>
>The problem occurs by receiving calls from the PSTN, from the
>Asterisk machine:
>
>- Incoming Call from the PSTN to 555123456 gets forwarded from the Asterisk
> machine to the SER.
>
>- The INVITE is from sip:555123456@<IP asterisk> to
> sip:555123456@<IP openser>
>
>- And the uri table in the database backend looks like this:
>
> id | username | domain | uri_user | last_modified
> ----+-----------+------------+--------------+----------------------------
> 1 | user10000 | domain1.de | 555123456 | 2008-12-26 15:32:18.761647
> 4 | user10001 | domain1.de | 555123457 | 2008-12-29 20:47:11.740234
> 5 | user10002 | domain2.de | 555123458 | 2008-12-30 10:46:36.455437
>
>Well, for the uri_db module the use_domain parameter is disabled
>(set to 0), so the is_uri_local() function consideres the call as a
>local call (that's right). But now trying to lookup the location
>table the user is not seen as online. The user for 555123456 is
>registered as 555123456 at domain1.de.
>
>My uri_user's are unique and are equal to the PSTN numbers
>associated with the users (including the area prefix). Users from
>different domains hosted by the same SER gets PSTN calls from the
>same Asterisk server.
>
>What's the usual way to lookup the domain part and rewrite the
>INVITE so SER can relay the call to the correct domain and the user
>isn't seen offline/not registered by the lookup("location") method?
>
>I can't imagine to be the first facing this problem. ;)
>
>Any help or suggestions are appreciated...
>
>
>
>Bye,
>Robert
>
>
>[1] http://www.sipwise.com/index.php/products?start=3
>
>
>_______________________________________________
>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
More information about the Users
mailing list