Skip to main content

SIP11-RA - Getting peer IP address.

3 replies [Last post]
patrickgriffiths
Offline
Joined: 2009-03-27
Points: 0

Hoping someone can point me in the right direction ...

With the sip11-ra, is there a way to retrieve the actual IP address and port that a request/response was sent from?

Thanks.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
randythomos765
Offline
Joined: 2009-04-03
Points: 0

The suggested solution gives the local listening IP address. If I understand it right, posted question was to get the IP/Port of the caller(or requestee).

Does anyone have a solution please?

kutty2009
Offline
Joined: 2009-05-26
Points: 0

String transport = ListeningPoint.UDP; // get the real transport from the topmost via header
ListeningPoint lp = ((SipProvider)requestEvent.getSource()).getListeningPoint(transport);

then you can get the ip address and port from the listening point

==========================================[url=http://www.detective-group.com]california private investigator[/url]
[url=http://www.tennadoptionattorney.com/knoxville-adoption-lawyer.html]adoption lawyers knoxville[/url]
=========

deruelle_jean
Offline
Joined: 2003-06-24
Points: 0

String transport = ListeningPoint.UDP; // get the real transport from the topmost via header
ListeningPoint lp = ((SipProvider)requestEvent.getSource()).getListeningPoint(transport);

then you can get the ip address and port from the listening point

Hope this helps
Jean