0

Is there a way of getting the IP address/port of an incoming request? (I don't want the data in the message, but I'd like information from the SIP stack itself, and preferably also the listening point the request had been received on.)

So far I have not find any solution by parsing the Javadocs.

Matthias van der Vlies
  • 3,834
  • 3
  • 24
  • 28

1 Answers1

4

Pending you are using http://java.net/projects/jsip

Cast RequestEvent to gov.nist.javax.sip.RequestEventExt in

public void processRequest(RequestEvent requestEvent) {
    RequestEventExt requestEventExt = (RequestEventExt) requestEvent;
    requestEventExt.getRemoteIpAddress();
    requestEventExt.getRemotePort();
}

Best Regards Jean

jeand
  • 2,325
  • 14
  • 12
  • 1
    My pleasure ! FYI, if you want to get more out of JAIN SIP, such as High Availability (failover, load balancing, fault tolerance), DNS SRV lookups or WebRTC capabilies (SIP over WebSockets), you can check Mobicents Extensions at http://code.google.com/p/jain-sip/ – jeand Sep 21 '12 at 09:01