|
Call Soft ActiveX Control
|
Previous Top Next |
| The Call Soft ActiveX control, callsoftx.ocx, was installed when you installed Call Soft. You should check our developers page (www.toscingl.com/callsoft/developers.html) periodically for updates.
|
| Create a new VB standard EXE project. From the Project menu select Components. Click CallSoftX Library in the list and then OK. You should see a blue icon appear on your component pallet. Drag and drop the icon onto your form.
|
|
|
| · | Properties
|
| · | Methods
|
| · | Events
|
| Set the ring to answer on.
|
|
|
| To never answer set this value to 0. If you want to answer as soon as caller ID information is received set this value to 1. If an incoming call is found in the phone book Call Soft might change this value if a specific answer on ring is set in the phone book record. If Call Soft does modify this value it will happen just before notifying you via the OnCallerID event. So you might want to check this value then if you are looking for complete control.
|
|
|
| Read-Write
|
|
|
| Long
|
|
|
|
|
| The number of call in the incoming call history.
|
|
|
| Use this property before you use CallInGet so your not out of bounds
|
|
|
| Read
|
|
|
| Long
|
|
|
| Dim Count As Long
|
| Count = CallSoft1.CallInCount
|
| Dim CallItem As InCallItem
|
| For Index = 0 To Count - 1 Step 1
|
| Next
|
|
|
|
|
| The number of call in the list of calls to be dialed i.e. on the outgoing call tab.
|
|
|
| Use this property before you use CallOutGet so your not out of bounds
|
|
|
| Read
|
|
|
| Long
|
|
|
| Dim Count As Long
|
| Count = CallSoft1.CallOutCount
|
| Dim Calltem As OutCallItem
|
| For Index = 0 To Count - 1 Step 1
|
| Next
|
|
|
|
|
| Connects the control to Call Soft.
|
|
|
| The control does not automatically connect to Call Soft, you need to do this manually. Set this value to true before you make any calls into the control. Set the value to false before your application closes.
|
|
|
| Read-Write
|
|
|
| Long
|
|
|
|
|
| Connects or disconnects the modem.
|
|
|
| Read this value to determine if Call Soft is connected to the modem. To connect to the modem set this value to true. To disconnect from the modem set this value to false.
|
|
|
| Read-Write
|
|
|
| Long
|
|
|
|
|
| Determine if a call is connected or not.
|
|
|
| Read this value to determine if a call is connected. If true then it's safe to speak text or play wave files. The call becomes connected on the OnCallConnected event and stays that way until OnCallDisconnected.
|
|
|
| Read
|
|
|
| Long
|
|
|
|
|
| Enables the control.
|
|
|
| This property currently does nothing.
|
|
|
| Read-Write
|
|
|
| Boolean
|
|
|
|
|
| Indicates if Call Soft has received caller id for the current call.
|
|
|
| This value will become true after receiving caller ID or Call Soft will force the caller ID to be "Unknown" if by the second ring no caller ID has been received. This value will remain true until the call ends.
|
| Read
|
|
|
| Long
|
| Get or set the greeting.
|
|
|
| You should set this value during or after the OnCallerID event. Call Soft will set this value during the caller ID event but before OnCallerID is posted to your application.
|
|
|
| Read-Write
|
|
|
| String
|
|
|
|
|
| Get Call Soft main window handle.
|
|
|
| You can use this handle for calls into the Windows API that require them, for example ShowWindow(CallSoft1.Handle,SW_HIDE)
|
|
|
| Read
|
|
|
| Long
|
|
|
| Indicates the name of the last caller.
|
|
|
|
|
| Read
|
|
|
| String
|
|
|
| Indicates the number of the last caller.
|
|
|
|
|
| Read
|
|
|
| String
|
|
|
| Indicates the number of mailboxes.
|
|
|
|
|
| Read
|
|
|
| Long
|
| Get or set the modem to use.
|
|
|
| Read modem to get the name of the modem Call Soft will use. Set this value prior to calling ConnectedToModem to use a specific modem. By default Call Soft will use the modem defined on the "General" tab in setup.
|
|
|
| Read-Write
|
|
|
| String
|
|
|
| Returns the number of TAPI (modem) devices attached to the system.
|
|
|
| Read this value to enumerate modems.
|
|
|
| Read-Write
|
|
|
| Boolean
|
|
|
|
|
| Indicates the number of times the current call rung.
|
|
|
|
|
| Read
|
|
|
| Long
|
| Turn the speakerphone on or off.
|
|
|
| Assuming your modem is speakerphone capable set this property to turn it on or off.
|
|
|
| Read-Write
|
|
|
| Long
|
|
|
| Get the status string shown on Call Soft's main window.
|
|
|
| Read this property to get the exact status string shown on Call Soft's main window. For example "Listening for calls on some modem"
|
|
|
| Read
|
|
|
| String
|
| The Call Soft instance running on a remote computer you want to connect to.
|
|
|
| If you want to connect to an instance of Call Soft running on a remote computer set this value to that computers name. The name should be entered just like it appears when you browse the network using Windows explorer. Keep in mind you must also have rights to access that computer.
|
|
|
| Read-Write
|
|
|
| String
|
| Use the Visible property to control the visibility of the control at run time.
|
|
|
| This value should be set to true when designing your forms and set it to false upon loading your forms i.e. during the Form_Load() event.
|
|
|
| Read-Write
|
|
|
| Boolean
|
|
|
|
|
| Answers an incoming call.
|
|
|
| If the phone is ringing it's safe to call this method.
|
| Set How to AnswerJustAnswer to simply answer the phone. You can then use SpeakText or PlayWave.
|
| Set How to AnswerTakeMessage have Call Soft answer the phone and take a message. If you want to use a specific greeting see the Greeting property.
|
| Delete a call from Call Softs incoming call history.
|
|
|
| Calling CallInDelete with a value of 0 to CallInCount-1 will remove the call from Call Soft incoming call history.
|
| Method returns the number of calls remaining.
|
| Delete a call from Call Softs incoming call history.
|
|
|
| Calling CallInDelete with a value of 0 to CallInCount-1 will remove the call from Call Soft incoming call history.
|
|
|
| Method returns the number of calls remaining.
|
| Get the information pertaining to the incoming call at Index.
|
|
|
| Call GetInGet with any number between 0 and CallInCount - 1 to retrieve the InCallItem.
|
|
|
| InCallItem
|
| Name String The callers name as it appears in the incoming call history.
|
| RawName String The name as given to Call Soft by your modem.
|
| Number String The callers number including area code
|
| MessageFile String If a message or fax was taken this is the path to the file. .Wave for voice message .tif for fax.
|
| MessageFile1 String not using this just ignore.
|
| Status String The status of the call as it appears in the incoming call history i.e. took message, emailed, hung up etc.
|
| Date Date The date and time the call started.
|
| IsFax Long If true this was a fax call false if it was voice.
|
| Length Long If this was a voice call and a message was taken Length is the message time in seconds.
|
| New Long If true this message has not been heard.
|
|
|
|
|
| Dim Count As Long
|
| Count = CallSoft1.ModemCount
|
| For Index = 0 To Count - 1 Step 1
|
| Next
|
| Delete all calls in the outgoing call list i.e. those calls to be dialed.
|
|
|
| Delete a call from the outgoing call list.
|
|
|
| Calling CallOutDelete with a value of 0 to CallOutCount-1 will remove the call from outgoing call list.
|
|
|
|
|
| Dials digits.
|
|
|
| The call must be in a connected state.
|
| Return true on success or false on failure.
|
|
|
| CallSoft1.DialDigits("123")
|
|
|
|
|
|
|
| Hang up the modem
|
|
|
| If the call is in a connected state call Hangup to end it. It's should be safe to call this method at any time. If Call Soft has trouble hanging up try using the ConnectedToModem property. There are no parameters
|
|
|
| Retrieves the mailbox Index
|
|
|
| Call MailBoxGet with any number between 0 and MailBoxCount - 1.
|
|
|
| MailBoxItem
|
| Name String The mailbox name
|
| GUID String A unique HEX identifier. Call Soft support mailboxes with the same name, this uniquely identifies the mailbox.
|
| ToActivate String The numeric code to access the mailbox.
|
| Greeting String The mailboxes greeting.
|
| DoAfterGreeting Not used yet
|
| DelayAfterGreeting Long The delay after playing the greeting and doing something else.
|
|
|
|
|
| Read
|
|
|
| String
|
|
|
| Plays a 200 millisecond beep
|
|
|
| If the call is in a connected state call PlayBeep to play a 200 millisecond beep.
|
|
|
|
|
| if CallSoft1.CallConnected then
|
| CallSoft1.PlayBeep
|
| end if
|
|
|
|
|
| Plays a 8khz 16bit mono wave file.
|
|
|
| If the call is in a connected state call PlayWave with a fully qualified wave file name. You will be notified when the wave file has completed via the OnWaveDone event.
|
|
|
|
|
| if CallSoft1.CallConnected then
|
| CallSoft1.PlayWave("c:\temp\test.wav")
|
| end if
|
|
|
|
|
| Record a message to WaveFile for MaxTime
|
|
|
| Use RecordMessage to begin recording via the modem.
|
| WaveFile is a fully qualified file name. If you use this method after receiving a call and you want to be able to play the message from Call Soft you have to record the message in Call Soft's message directory c:\program files\call soft\messages.
|
| MaxTime is the maximum time in seconds to record don't set this value to 0.
|
| SilenceDetection if true will use silence detection as defined on the greeting tab in Call Soft's setup.
|
|
|
|
|
| if CallSoft1.CallConnected then
|
| CallSoft1.StopPlayingOrRecording
|
| Result = CallSoft1.RecordMessage(RecordWaveEdit.Text, 240)
|
| end if
|
|
|
|
|
| Dials a number, at some future time, optionally specify when and .wave or .txt file to use upon call connection.
|
|
|
| Name is the name that will appear in the outgoing call history.
|
| Number is the number to dial. Call Soft will not try to interpret it. In other words what you enter here is exactly what will be dialed.
|
| FileName is the .wave or .txt file you want played or spoken upon call connection.
|
| Mailbox is the mailbox you want to assign the call to.
|
| Time is the date and time you want to start the call.
|
|
|
| The long return value might be used in later releases so multiple connections to Call Soft can determine if an event really belongs to them.
|
|
|
| DateTimeNow = DateValue(Now)
|
| id = CallSoft1.Dial("My Office", "713-555-1212", "", 0, DateTimeNow)
|
| Send a file as a fax with an optional cover page.
|
|
|
| FaxFile This can be any file ASCII text file or .bmp, .tif, tiff, pcx, or dcx file.
|
| HiResolution Set this value to 1 to send in hi resolution or 0 for standard resolutiion.
|
| SendTime The date and time you want the fax sent. Set to 0 to send now.
|
|
|
| The remaining parameters only need to be set if you plan on sending a cover page. To not send a cover page set the CoverPageFile parameter to a null string i.e. "".
|
|
|
| CoverPageFile The cover page you want to use. This file must be a Microsoft Fax coverpage format. These files have a cpe extention.
|
| Comments This text will appear in the comment section of the cover page.
|
| RecipientName The name of the person your sending the fax to.
|
| RecipientNumber The fax number your calling.
|
| RecipientCompany The name of the company your sending the fax to.
|
| FromName The name of the person sending the fax.
|
| FromFaxNumber The phone number of the fax machine sending the fax.
|
| FromVoiceNumber The voice number of the person sending the fax.
|
|
|
| DateTimeNow = DateValue(Now)
|
| CallSoft1.SendFax("c:\temp\test.txt", "To Walter", "713-555-1212", "Wal Mart Inc", "Me", "936-555-1212", "936-555-1213", "My Test Fax", "c:\temp\generic.cpe", "My banner text", "This is my test fax you like it?", 0, DateTimeNow) = 0
|
|
|
| Stop playing, speaking or recording a greeting. Also remove any pending hangups.
|
|
|
| In short call this method prior to any call to SpeakText or PlayWave.
|
|
|
| Call StopPlayingOfRecording to stop Call Soft from playing or recording a greeting or abort any in progress calls to SpeakText or PlayWave. Call Soft also que a hangup request, periodically to make sure the line does not get hung, calling this method will remove all hangup requests. For example when a tone is detected Call Soft will que a hangup in 20 seconds. If the caller hits another tone then all hangup requests are removed and another one added to go off in 20 seconds. If the caller enters a proper code i.e. to listen to messages etc all hangup requests are removed and the listen to new messages dialog is invoked. We have to do this because some modems do not detect a caller hanging up so we must cover our butts.
|
|
|
|
|
| if CallSoft1.CallConnected then
|
| CallSoft.StopPlayingOrRecording
|
| CallSoft1.PlayWave("c:\temp\test.wav")
|
| end if
|
|
|
|
|
| Speak TextToSay over the modem.
|
|
|
| The call state must be connected so call CallConnected property prior to using SpeakText. When Call Soft is done saying TextToSay your will be notified via the OnSpeakDone event.
|
|
|
| if CallSoft1.CallConnected then
|
| CallSoft1.SpeakText ("Hello world")
|
| end if
|
|
|
| Get the name of the modem at index
|
|
|
| Call GetModemName with any number between 0 and GetModemCount - 1 to retrieve the name of the modem.
|
|
|
| Dim Count As Long
|
| Count = CallSoft1.ModemCount
|
| For Index = 0 To Count - 1 Step 1
|
| Next
|
| Get the information pertaining to the outgoing call item at Index.
|
|
|
| Call CallOutGet with any number between 0 and CallOutCount - 1 to retrieve the OutCallItem.
|
|
|
| InCallItem
|
| Name String The callers name as it appears in the outgoing call list i.e. on Call Soft outgoing call tab.
|
| Number String The callers number including area code
|
| MessageFile String If a message or fax was taken this is the path to the file. .Wave for voice message .tif for fax nothing if it's just a call.
|
| Status String The status of the call as it appears in the outgoing call list.
|
| Date Date The date and time the call started.
|
| Failed Long the number of times an attempt to make the call has failed.
|
| Length Long the unique number associated with the call.
|
|
|
|
|
| DateTimeNow = DateValue(Now)
|
| Add a new entry to the phone book.
|
|
|
| OriginalName is the name that Call Soft will use when trying to identify this caller assuming Key=1 . If you use this value be sure it is exactly as it appears on caller ID.
|
| DisplayName is the name that will appear on the incoming call list when this person calls.
|
| PhoneNumber is the callers number as it appears on caller ID. You should always include area code.
|
| SoundFile is the wave or text file you want played when this person calls.
|
| GreetingFile is the greeting you want to use this file must reside in the greeting directory "c:\program files\call soft\greetings".
|
| Key is how to identify this caller if 0 the PhoneNumber will be used if 1 OriginalName will be used.
|
| RingToAnswerOn is the ring to answer on. 0 = use the answer on ring as defined on the message tab
|
| in Call Soft's setup. 1 = answer on caller ID i.e. as soon as this caller is identified.
|
| NumberTimesCalled is the number of times this caller has called.
|
|
|
| Count = CallSoft1.PhoneBookAdd("XYZ INC", "Mom at work", "713-555-1212", "mom.txt", "momgreeting.txt", 0, 0, 0)
|
| Add a new entry to the phone book.
|
|
|
| Index is the phone book record you want to modify value can be from 0 to PhoneBookCount - 1.
|
| OriginalName is the name that Call Soft will use when trying to identify this caller assuming Key=1 . If you use this value be sure it is exactly as it appears on caller ID.
|
| DisplayName is the name that will appear on the incoming call list when this person calls.
|
| PhoneNumber is the callers number as it appears on caller ID. You should always include area code.
|
| SoundFile is the wave or text file you want played when this person calls.
|
| GreetingFile is the greeting you want to use this file must reside in the greeting directory "c:\program files\call soft\greetings".
|
| Key is how to identify this caller if 0 the PhoneNumber will be used if 1 OriginalName will be used.
|
| RingToAnswerOn is the ring to answer on. 0 = use the answer on ring as defined on the message tab
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| in Call Soft's setup. 1 = answer on caller ID i.e. as soon as this caller is identified.
|
| NumberTimesCalled is the number of times this caller has called.
|
|
|
| The method returns the number of phone book entries.
|
|
|
| Count = CallSoft1.PhoneBookModify(0,"XYZ INC", "Mom at work", "713-555-1212", "mom.txt", "moms_new_greeting.txt", 0, 0, 0)
|
| Removes all entries in the phonebook..
|
|
|
|
|
| CallSoft1.PhoneBookClear
|
|
|
|
|
|
|
| Delete a phone book entry.
|
|
|
| Index is the phone book record you want to delete value can be from 0 to PhoneBookCount - 1.
|
|
|
| The method returns the number of phone book entries.
|
|
|
| Dim Count As Long
|
| Count = CallSoft1.PhoneBookDelete(0)
|
|
|
|
|
| Get a phone book entry.
|
|
|
| Index is the phone book record you want to modify value can be from 0 to PhoneBookCount - 1.
|
|
|
| The method returns a PBookItem it's structure is as follows.
|
|
|
| OriginalName is the name that Call Soft will use when trying to identify this caller assuming Key=1 . If you use this value be sure it is exactly as it appears on caller ID.
|
| DisplayName is the name that will appear on the incoming call list when this person calls.
|
| PhoneNumber is the callers number as it appears on caller ID. You should always include area code.
|
| SoundFile is the wave or text file you want played when this person calls.
|
| GreetingFile is the greeting you want to use this file must reside in the greeting directory "c:\program files\call soft\greetings".
|
| Key is how to identify this caller if 0 the PhoneNumber will be used if 1 OriginalName will be used.
|
| RingToAnswerOn is the ring to answer on. 0 = use the answer on ring as defined on the message tab
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| in Call Soft's setup. 1 = answer on caller ID i.e. as soon as this caller is identified.
|
| NumberTimesCalled is the number of times this caller has called.
|
|
|
| Dim Count As Long
|
| Count = CallSoft1.PhoneBookCount
|
|
|
| For Index = 0 To Count - 1 Step 1
|
| PhoneBookItem = CallSoft1.PhoneBookGet(Index)
|
| PhoneBookList.AddItem (PhoneBookItem.DisplayName)
|
| Next
|
|
|
|
|
|
|
| Occurs when caller ID is detected.
|
|
|
| Name is the raw caller ID name as sent by the telephone company.
|
| If Name or Number are found in the phone book FriendlyName will be the name assigned to that caller.
|
| Number is the callers phone number.
|
|
|
| Occurs when a caller sends tones over the phone.
|
|
|
| Key is the tone they hit.
|
|
|
|
|
|
|
| Occurs when the modem detects a ring.
|
|
|
| RingNumber is the number of rings.
|
|
|
|
|
|
|
| Occurs when the call state changes to connected.
|
|
|
| This is an important event because it is a signal to you that it's OK to play text or wave data through the modem until OnCallDisconnected() occurs. This event will occur upon answering a call or if you make a call it will occur when the phone begins to ringing.
|
|
|
|
|
|
|
| Occurs when the call state changes from connected to not connected.
|
|
|
| This is an important event because it is a signal to you that it's NOT OK to play text or wave data through the modem.
|
|
|
|
|
|
|
| Occurs when Call Soft connects to a modem.
|
|
|
|
|
|
|
|
|
|
|
| Occurs when Call Soft disconnect from a modem.
|
|
|
|
|
|
|
|
|
| Occurs when the a new caller has been added to the incoming call history.
|
|
|
| RealName is the raw caller ID name.
|
| FriendlyName is the name assigned to this caller if they where found in the phone book.
|
| PhoneNumber is the callers phone number.
|
| MessageFile, if not empty, is the message they left or the fax received. If the extension is .wav it's a voice message if it's .tif it's a fax.
|
|
|
|
|
|
|
|
|
| Occurs when Call Soft is unable to make a call.
|
|
|
| Possible error codes are DialErrorBusy and DialErrorNoDialTone.
|
|
|
|
|
|
|
| Occurs when Call Soft is done speaking from a previous call to SpeakText.
|
|
|
| If you have more to play or say this is a good time to say it.
|
|
|
|
|
|
|
| Occurs when Call Soft is done playing a wave file from a previous call to PlayWave..
|
|
|
| If you have more to play or say this is a good time to say it.
|
|
|
|
|
|
|
| Occurs when Call Soft is about to play a greeting.
|
|
|
|
|
|
|
|
|
|
|
| Occurs when Call Soft is done playing a greeting.
|
|
|
|
|
|
|
|
|
|
|
| Occurs when Call Soft is about to record a message.
|
|
|
|
|
|
|
|
|
|
|
| Occurs when Call Soft is done recording a message.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|