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

bluerain frank21118 at yahoo.com
Wed Nov 13 23:12:02 CET 2013


How do I get the IP and Port of registered user (probably a stupid question)? 
I check the usrloc module, I don't see function like that.  
 
The reason I need this is that when we were only using Asterisk server, we
were able to sent INVITE out with the DNIS.  So what I mean is that I can
dial out to customer's SIP server by using Asterisk dial command:

DIAL(SIP/peername/2135551212,60) 

Which means sent an INVITE to peername (a registerd peer) and the TO-URI
(and Request-URI) will have 2135551212 at cust_ip_address

Now, we add OpenSIP in front of asterisk, so when asterisk server sent call
out, it can only do

DIAL (SIP/opensipname/registered username,60)

Which in the INVITE, both TO-URI and Request_URI is the actual registered
username instead of the phone number I would like to relay over the
customer's SIP server.

Thus what I want is then to sent to Opensip

DIAL(SIP/opensipname/2135551212,60)

And then in Opensip, when I see the username in TO-URI 2135551212, I will
get the ip/port of the actual registered user (all user registered to
opensips) and then rewrite the INVITE using the IP/port that is in the
location table (or wherever/however OpenSIP get it).

Is that possible?



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



More information about the Users mailing list