[OpenSIPS-Users] Get IP/Port of registered user (or from Location table?)

bluerain frank21118 at yahoo.com
Wed Nov 13 23:31:56 CET 2013


Or will location("username") function do it?

So what I mean is that if I do

If(is_method("INVITE")) {
  lookup("username");
  t_relay();
}

So that if 

1. asterisk server sent an INVITE to OpenSIP (with an username of unknown by
OpenSIPs)
2. Opensips goes into the code above
3. rewrite the INVITE destination IP/port to the IP/port of the username it
finds in the location table
4. sent the INVITE to that server.

So what I mean is that when the INVITE came from the Asterisk Server, the
TO-URI looks like:

2135551212 at IP_address

will, Opensips, obviously don't know who is "2135551212" because the
registered user is, let say, Chris1234.

So thus I need to replace find the IP/port of registered user Chris1234 and
then rewrite the original INVITE (came from Asterisk) with the IP/port of
the registered user Chris1234 and then sent it out.

Well, you say why don't I just do Chris1234 at IP_address, then this way,
Opensips will automatically sent out to the user because Chris1234 is an
registerd user. 

The issue is that the end user do not want to see call come in with
Chris1234, they want to see the number 2135551212.




--
View this message in context: http://opensips-open-sip-server.1449251.n2.nabble.com/Get-IP-Port-of-registered-user-or-from-Location-table-tp7588494p7588495.html
Sent from the OpenSIPS - Users mailing list archive at Nabble.com.



More information about the Users mailing list