1

This is probably going to sound crazy but I need to produce a quick hack. Java based product has a Chat app that communicates with Server via sip(JAIN).

I need to send these SIP messages to a local PC port. Theses messages will picked off the local port and the Tunneled over an SSL connection to the server. I have very little knowledge of SIP.

I've tried modifying the route header to include the local ip:port, this works in getting the message to the server but the server is not responding. I'm assuming this is because the added route header is not removed from the message?

I've created my own socket to send the message and bypass the SIP stack, which also works in getting the message there, but i want to take advantage of the current implementation for handling incoming messages(i.e. I can't add a SIPListener to my new port(or can I?))

Can i have the JAIN implementation listen on this new socket i've created? Is there a better way to accomplish this, or is it just stupid?

Thanks.

Trav
  • 21
  • 3
  • Hard to understand what you are trying to do. What server is not responding and why? There should be something in the logs about that. Are you trying to use a TLS accelerator? – Vladimir Ralev Jul 05 '15 at 20:03

1 Answers1

0

Just in case someone else needs this info. I solved my problem by setting the OUTBOUND_PROXY setting when creating the JAIN SIP stack. I wanted all SIP messages to be first sent to localhost at port 18100, but did not want to modify the routing info in the SIP headers.

String proxy = Inet4Address.getLocalHost().getHostAddress() + ":18100/tcp";

properties.setProperty("javax.sip.USE_ROUTER_FOR_ALL_URIS", "false");
properties.setProperty("javax.sip.OUTBOUND_PROXY", proxy);
Trav
  • 21
  • 3