Hello, I have been testing sipjs with some 3rd party sip services, such as linphone, and find myself running into the following registration issue. I do not have the issue using X-Lite.
I then modified sipjs.6.3 and tried different combinations of the following:
- Setting hackViaTcp: true and hackIpInContact: true
- Changing the Via, Contact, Allow to match that of what X-Lite used, although I faked the ip and port in those tests.
Might this have something to do with the onsip websocket relay/translation? I dont know how my websocket register is turned into a request for the linphone server. If the 403 was sent by the liphone server then it obviously received the to/from user name correctly but I have no way to know why it is rejecting the request. One thought is because of a blacklisted ip or port.
I verified the sip registration and response using tcpdump and it matches the sipjs trace pasted below.
Any ideas?
....... Using Sip.js(0.6.3) ........
Via: SIP/2.0/TCP 192.0.2.125;branch=z9hG4bK7653063
Max-Forwards: 70
Call-ID: fkddq2anabtd8roc104hdv
CSeq: 81 REGISTER
Contact: <
sip:g0j5...@192.0.2.125;transport=ws>;reg-id=1;+sip.instance="<urn:uuid:3a173fca-9b97-47ff-8e36-431c710ae5>"
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO
Expires: 3600
Supported: path,gruu,100rel,outbound
User-Agent: SIP.js/0.6.3
Content-Length: 0
Wed Dec 03 2014 19:24:38 GMT+0000 (UTC) |
sip.ua | emitting event connected
Wed Dec 03 2014 19:24:38 GMT+0000 (UTC) | sip.transport | received WebSocket text message:
SIP/2.0 403 Forbidden
Via: SIP/2.0/TCP 192.0.2.125;branch=z9hG4bK7653063
Call-ID: fkddq2anabtd8roc104hdv
CSeq: 81 REGISTER
Server: OpenSIPS (1.10.0-notls (x86_64/linux))
Content-Length: 0
...... Using X-Lite, 401 received as expected with digest ......
Session Initiation Protocol (401)
Via: SIP/2.0/UDP 192.168.1.4:16546;branch=z9hG4bK-d8754z-c50d0c3e3bf10f73-1---d8754z-;rport
Max-Forwards: 70
Contact: <sip:sipjs...@192.168.1.4:16546;rinstance=23381940ec1f7a53>
Call-ID: MDA3OTQ0NDFhZjliMmNjYTQ4MmFmNTA5YTlkMjEwNTg
CSeq: 1 REGISTER
Expires: 3600
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO
User-Agent: X-Lite 4.7.1 74247-3759ac27-W6.1
Content-Length: 0
Via: SIP/2.0/UDP 192.168.1.4:16546;branch=z9hG4bK-d8754z-c50d0c3e3bf10f73-1---d8754z-;rport=16546
Call-ID: MDA3OTQ0NDFhZjliMmNjYTQ4MmFmNTA5YTlkMjEwNTg
CSeq: 1 REGISTER
Server: Flexisip/0.8.0 (sofia-sip-nta/2.0)
WWW-Authenticate: Digest realm="
sip.linphone.org", nonce="meMp2AAAAABE3DEjAABdwFmC5mMAAAAA", opaque="+GNywA==", algorithm=MD5, qop="auth"
Content-Length: 0