0
votes

Are there any code example for this? I want to know what should be the flow in processRequest when an INVITE request is received.

I'm particularly interested in how you forward a request from an UA to another previously registered UA.

1

1 Answers

1
votes

Check out https://svn.java.net/svn/jsip~svn/trunk/src/test/unit/gov/nist/javax/sip/stack/WebsocketSelfTest.java the WebsocketServer class should be enough to get you started to write a simple client-server.

Forwarding just means you act as client repeating the server side of things. You can do B2BUA like this https://svn.java.net/svn/jsip~svn/trunk/src/examples/websocket/B2BUA.java or a proxy which is less robust and doesn't works so well with websockets.

The next hop must be the address advertised by the other party's Contact header. You aim towards this address in the request URI (or route header).