PortSIP VoIP SDK Manual for Windows  16.2
PortSIP features our newest, supported, quality-assured VoIP SDK used by Several hundred companies around the world for easy VoIP application develop and quality-assured code.
Functions
Refer functions

Functions

Int32 PortSIP.PortSIPLib.refer (Int32 sessionId, String referTo)
 Refer the current call to another one.
More...
 
Int32 PortSIP.PortSIPLib.attendedRefer (Int32 sessionId, Int32 replaceSessionId, String referTo)
 Make an attended refer. More...
 
Int32 PortSIP.PortSIPLib.attendedRefer2 (IntPtr libSDK, Int32 sessionId, Int32 replaceSessionId, String replaceMethod, String target, String referTo)
 Make an attended refer with specified request line and specified method embedded into the "Refer-To" header. More...
 
Int32 PortSIP.PortSIPLib.outOfDialogRefer (Int32 replaceSessionId, String replaceMethod, String target, String referTo)
 Send an out of dialog REFER to replace the specified call. More...
 
Int32 PortSIP.PortSIPLib.acceptRefer (Int32 referId, String referSignalingMessage)
 Accept the REFER request, and a new call will be made if called this function. The function is usually called after onReceivedRefer callback event. More...
 
Int32 PortSIP.PortSIPLib.rejectRefer (Int32 referId)
 Reject the REFER request. More...
 

Detailed Description

Function Documentation

◆ refer()

Int32 PortSIP.PortSIPLib.refer ( Int32  sessionId,
String  referTo 
)

Refer the current call to another one.

Parameters
sessionIdThe session ID of the call.
referToTarget of the refer, which can be either "sip:number@sipserver.com" or "number".
Returns
If the function succeeds, it will return value 0. If the function fails, it will return a specific error code.
Remarks
refer(sessionId, "sip:testuser12@sip.portsip.com");
You can download the demo AVI at
"http://www.portsip.com/downloads/video/blindtransfer.rar".
Use the Windows Media Player to play the AVI file after extracted, and it will demonstrate the transfer.

◆ attendedRefer()

Int32 PortSIP.PortSIPLib.attendedRefer ( Int32  sessionId,
Int32  replaceSessionId,
String  referTo 
)

Make an attended refer.

Parameters
sessionIdThe session ID of the call.
replaceSessionIdSession ID of the repferred call.
referToTarget of the refer, which can be either "sip:number@sipserver.com" or "number".
Returns
If the function succeeds, it will return value 0. If the function fails, it will return a specific error code.
Remarks
Please read the sample project source code for more details, or download the demo AVI at: http://www.portsip.com/downloads/video/blindtransfer.rar
Please use the Windows Media Player to play the AVI file after extracted, and it will demonstrate the transfer.

◆ attendedRefer2()

Int32 PortSIP.PortSIPLib.attendedRefer2 ( IntPtr  libSDK,
Int32  sessionId,
Int32  replaceSessionId,
String  replaceMethod,
String  target,
String  referTo 
)

Make an attended refer with specified request line and specified method embedded into the "Refer-To" header.

Parameters
sessionIdSession ID of the call.
replaceSessionIdSession ID of the replaced call.
replaceMethodThe SIP method name which will be embeded in the "Refer-To" header, usually INVITE or BYE.
targetThe target to which the REFER message will be sent. It appears in the "Request Line" of REFER message.
referToTarget of the refer that appears in the "Refer-To" header. It can be either "sip:number@sipserver.com" or "number".
Returns
If the function succeeds, it will return value 0. If the function fails, it will return a specific error code.
Remarks
Please refer to the sample project source code for more details. Or you can watch the video on YouTube at https://www.youtube.com/watch?v=_2w9EGgr3FY. It will demonstrate the transmission.

◆ outOfDialogRefer()

Int32 PortSIP.PortSIPLib.outOfDialogRefer ( Int32  replaceSessionId,
String  replaceMethod,
String  target,
String  referTo 
)

Send an out of dialog REFER to replace the specified call.

Parameters
replaceSessionIdThe session ID of the session which will be replaced.
replaceMethodThe SIP method name which will be added in the "Refer-To" header, usually INVITE or BYE.
targetThe target to which the REFER message will be sent.
referToThe URI to be added into the "Refer-To" header.
Returns
If the function succeeds, it will return value 0. If the function fails, it will return a specific error code.

◆ acceptRefer()

Int32 PortSIP.PortSIPLib.acceptRefer ( Int32  referId,
String  referSignalingMessage 
)

Accept the REFER request, and a new call will be made if called this function. The function is usually called after onReceivedRefer callback event.

Parameters
referIdThe ID of REFER request that comes from onReceivedRefer callback event.
referSignalingMessageThe SIP message of REFER request that comes from onReceivedRefer callback event.
Returns
If the function succeeds, it will return a session ID greater than 0 to the new call for REFER; otherwise a specific error code less than 0.

◆ rejectRefer()

Int32 PortSIP.PortSIPLib.rejectRefer ( Int32  referId)

Reject the REFER request.

Parameters
referIdThe ID of REFER request that comes from onReceivedRefer callback event.
Returns
If the function succeeds, it will return value 0. If the function fails, it will return a specific error code.