kirm / sip.js

Session Initiation Protocol for node.js
MIT License
427 stars 171 forks source link

how do i send message over websocket #146

Open ruokid opened 4 years ago

ruokid commented 4 years ago

Hi @kirm

I m trying to use jsSIP to REGISTER . image now im registered, how do i send message over websocket

sip.send

{
    "method": "MESSAGE",
    "uri": "sip:ngmperbv@por87rlbree0.invalid;transport=ws",
    "headers": {
        "to": "sip:10000000803000127001@127.0.0.1",
        "from": {
            "uri": "sip:34020000002000000001@3402000000",
            "params": {
                "tag": "52624"
            }
        },
        "call-id": "217160",
        "cseq": {
            "method": "MESSAGE",
            "seq": 46960
        }
    },
    "content": "hello"
}

result

err:  Error: getaddrinfo ENOTFOUND por87rlbree0.invalid
    at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:66:26) {
  errno: -3008,
  code: 'ENOTFOUND',
  syscall: 'getaddrinfo',
  hostname: 'por87rlbree0.invalid'
}
ruokid commented 4 years ago

image

latysheff commented 4 years ago

AFAIK, using same ip address for source and destination causes problems in sip.js.

ruokid commented 4 years ago

AFAIK, using same ip address for source and destination causes problems in sip.js.

thanks for the tips. i ll try to use the different ip address later.

and i would like to know how to solve this.