SIP.js
SIP.js copied to clipboard
Is outbound out-of-dialog REFER supported on sip.js?
Hi, I'm struggling for a few days already regarding if SIP.JS allows to make outbound out-of-dialog REFER requests. Currently I'm working with 0.16.1 and found some references in the oldest documentation of 0.15 that it may be possible, although as it seems, those functions don't exist anymore on 0.16. Can someone please clarify if it is supported? And if so, can you please direct me to the right direction (a simple code example would be very much appreciated).
Thanks!
This is not supported yet on 0.17.X - https://github.com/onsip/SIP.js/blob/master/src/api/user-agent.ts#L813
Sorry - What I linked above was for receiving an out of dialog refer. We do not even have a TODO for sending one. It is completely unsupported at the moment.
OK, thank you! Hope it'll be available some day. The reason I need it is to have the ability to order a focus (conference) to make actions like adding / removing participant to / from a conference. It seems (not 100% sure yet) like those actions are only working with out-of-dialog REFERs.
After testing it further, so yes, conferences on FreeSwitch (and probably some other systems) are only accepting out of dialog REFER towards the conference (focus) in order to make an action as part of the RFC4579. In-dialog REFER is just trying to make a blind transfer of the REFER initiator bridged call leg which fails. Hopefully, Sip.JS will support out-of-dialog REFERs someday soon.
@egreenmachine Well, I am not sure but I think I found a way to send OOD REFER like I wanted. It still not working for me according to the RFC itself that I need but looks like it is doing the trick.
var request = this.userAgent.userAgentCore.makeOutgoingRequestMessage(
"REFER",
confURI,
this.userAgent.contact.uri,
confURI,
{
} as OutgoingRequestMessageOptions,
[
"Refer-To: <sip:+12126001234@" + host + ">",
"Accept: application/sdp, message/sipfrag",
"Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY"
"Supported: replaces"
]
);
this.userAgent.userAgentCore.request(request);