< Previous by Date Date Index Next by Date >
  Thread Index Next in Thread >

[reSIProcate] WS and invalid contact

Hi all,


I’ve successfully established a WS connection between JsSIP and resiprocate. My issue is that, since the browser cannot know its own IP, it uses a <random string>.invalid as contact, and then when I try to send a BYE from resiprocate side it fails because resiprocate can’t DNS resolve that contact.

After some search I found that WS support in resiprocate was a patch from doubango and in the initial commit there was a class called WsDecorator that would inspect the outgoing sip messages and replace the invalid contact and VIA header by the IP and port of the connection. But in the following commit the usage of that class was removed:
Two things to notice:

1)      The class is still in the repository but it is not used anymore

2)      The class searches for a specific string (df7jal23ls0d.invalid). This is the one used by sipML5 but it is not the one used by JsSIP (random before the .invalid), so the code is not generic

Then I tried to put the code back but it wasn’t being called (maybe this is why it was removed). Then I tried to add the decorator in the master profile as explained here:


The decorator was called when sending the 180 and 200 but not when sending the BYE. I think the reason is because decorators are called only when the message is about to be sent and in this case, since the DNS fails, it is not called. I need to modify the message before the DNS query (actually, if I modify it there will be no DNS query since I’ll replace for an IP).


Has anyone experienced this problem? It seems that this is a common issue. I appreciate any help. Thanks in advance.