Search code examples
jain-sip

JAIN-SIP getting request source IP address and port


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.


Solution

  • 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