PCBEST NETWORK Robust SIP ActiveX Reference

Methods

1. SetZone
Give your site domain. It will be helpful to distinguish your webphone configuration from others.
Format: void SetZone(BSTR SiteName)

2. SetConfigValue
Set configuration items.
Format: void SetConfigValue(BSTR sKey, BSTR sValue)
Please click to get pre-configurable keys and values.

3. ***New***: Start and Stop
Start and Stop SIP Phone. New function. MUST call from application after setting all configuration items.
Format: void Start() void Stop()

4. MakeCall
Make a call out.
Format: long MakeCall(long ChanID, BSTR CalledNum, BSTR CallerNum)
ch: channel index (0 or 1)
CalledNum: call destionation. sample: "<sip:123@abc.com>"
CallerNum: call from. It can be "".

5. AnswerCall
Answer an incoming call. It can be used in OnCallOffered event to answer a call.
Format: long AnswerCall(long ChanID)
ch: channel index (0 or 1)

6. HungupCall
Hung up a call.
Format: long HungupCall(long ChanID)
ch: channel index (0 or 1)

7. HoldCall
Hold or unhold a call.
Format: long HoldCall(long ChanID)
ch: channel index (0 or 1)

8. TransferCall
Transfer a call.
Format: long TransferCall(long ChanID, BSTR Transferee)
ch: channel index (0 or 1)
Transferee: the sip address of transferee. sample: "<sip:456@abc.ca>".

9. SendDTMF
Send DTMF string when a call is connected.
Format: long SendDTMF(long ChanID, BSTR DTMFStr)
ch: channel index (0 or 1)
DTMFStr: DTMF string. Sample: "2", "4#", "1*".

10. EnableConference
If open(enable) conference room for calls. Once this option is enabled, two lines of phone can have conference with phone user.
Format: void EnableConference(long Enabled)
Enabled: 1 = enabled, 0 = disabled

11. EnableDND
If enable DO NOT DISTURB feature. Once this option is on, all calls will be rejected.
Format: void EnableDND(long Enabled)

12. EnableAutoAnswer
If enable AUTO ANSWER feature. Once this option is on, all incoming calls will be answered automatically.
Format: void EnableAutoAnswer(long Enabled)

13. SetSpeakerVolume
Set Speaker's sound volume: 0 - 100.
Sample: SetSpeakerVolume(50) set speaker's volume to 50% of max.

14. SetMicrophoneVolume
Set microphone's sound volume: 0 - 100.
Sample: SetMicrophoneVolume(50) set microphone's volume to 50% of max.

15. MuteSpeaker
Mute speaker

16. MuteMicrophone
Mute microphone

Events:

1. OnPhoneReady
This event indicates that phone is loaded and ready to use in page.
Format: OnPhoneReady(long PhoneStatus)
PhoneStatus: 1 = successfully. 0 = failed.

2. OnCallOffered
A new call coming in. You can use AnswerCall to accept or HungupCall to reject calls.
Format: OnCallOffered(long ChanID, BSTR Caller, BSTR Callee, BSTR DestAddr, BSTR ViaAddr, BSTR SrcIPAddr, short SrcIPPort)
ChanID: channel index (0 or 1)
Caller: Caller's address
Callee: Callee's address
DestAddr: The real address the call wants to reach.
ViaAddr: The via address of SIP proxy.
SrcIPAddr: Message from which ip address.
SrcIPPort: Message from which ip port.

3. OnCallConnected
The Call on the channel specified is connected.
Format: OnCallConnected(long ChanID)
ChanID: channel index (0 or 1)

4. OnCallDialing
The channel is dialing out. You get this event when you initiate MakeCall method.
Format: OnCallDialing(long ChanID, BSTR sCaller, BSTR sCallee)
ChanID: channel index (0 or 1)
Caller: Caller's address
Callee: Callee's address

5. OnCallIdle
The channel is idle.
Format: OnCallIdle(long ChanID)
ChanID: channel index (0 or 1)

6. OnCallRinging
The remote side is ringing.
Format: OnCallRinging(long ChanID)
ChanID: channel index (0 or 1)

7. OnSIPRegStatus
This event notify you that if your SIP account registered successfully.
Format: OnSIPRegStatus(long UserID, long Status, long Expires)
UserID: SIP account id. based on 0.
Status: 1 = successfully registered. 0 = failed.
Expires: If registered successfully, how long(seconds) it is.

8. OnCallHolding
Notify channel is holding or not.
Format: OnCallHolding(long ChanID, long HoldOn)
ChanID: channel index (0 or 1)
HoldOn: 1 = holding, 0 = not holding.

9. OnCallTransfering
Call is transfering to a new address.
Format: OnCallTransfering(long ChanID, BSTR DestAddr)
ChanID: channel index (0 or 1)
DestAddr: new address.

10. OnNotifySimpleMsgSummary
Voice mail message event.
Format: OnNotifySimpleMsgSummary(BSTR MsgWaiting, BSTR MsgAccount, BSTR VoiceMsg)
MsgWaiting: how many message waiting
MsgAccount: sip account
VoiceMsg: voice mail message