[OpenSIPS-Users] Multi-Domain Setup with PSTN Connectivity

Robert Borz robert.borz at web.de
Tue Jan 20 19:23:08 CET 2009


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




More information about the Users mailing list