Closed hslee0429 closed 4 years ago
There is an example of sending CANCEL in proxy.js.
Basically you need to wait for a provisional response from the server, and send cancel using 'Via' header from that response.
I solved this problem by attaching VIA. Thank you.
sip.send({ method: 'CANCEL', uri: 'sip:'+toNumber+'@'+sipIP+':'+sipPort, headers: { to: rs.headers.to, from: rs.headers.from, 'call-id': rs.headers['call-id'], 'max-forwards': 70, cseq: {method: 'CANCEL', seq: rs.headers.cseq.seq}, via: [rs.headers.via[0]] } });
I just want to make a 'CANCEL' when I receive '180' or '183' response. I tried to make 'CANCEL' like below, but it does not work. (CANCEL request was not sent)
sip.send({ method: 'CANCEL', uri: 'sip:'+toNumber+'@'+sipIP+':'+sipPort, headers: { to: rs.headers.to, from: rs.headers.from, 'call-id': rs.headers['call-id'], 'max-forwards': 70, cseq: {method: 'CANCEL', seq: rs.headers.cseq.seq}, } });