Caller ID Modem Driver

Modified on 2010/04/13 12:57 by Administrator — Categorized as: Driver

This driver allows multiple instances.


Driver Parameters


Various modem brands use different modem commands to start up caller id. You'll need to try the following:



You can use Hyperterminal to help debug which one is appropriate. You can follow the instructions at one of the web site below:


Events

IncomingCall

Occurs when the Caller ID Modem receives an incoming call.

Parameters:

none

EventArgs:

>
Property NameTypeRead/WriteDescription
NameStringRead OnlyIf the incoming phone number is associated with a contact then this will be the same as EventArgs.Contact.Name, otherwise the same as EventArgs.CidName.
CidNameStringRead OnlyGets the caller's name as specified by the modem.
PhoneNumberStringRead OnlyGets the caller's phone number as specified by the modem.
DateDateTimeRead OnlyGets the date of the call.
ContactContactRead OnlyGets the contact object associated with the PhoneNumber. If no contact matches the incoming phone number then this will be an empty contact.

You can check if the contact is empty with the IsEmpty property. Example:

if (EventArgs.Contact.IsEmpty)
{
	// do something
}

Contact Object Properties

Property NameTypeRead/WriteDescription
NameStringRead OnlyGets the contact's name.
DescriptionStringRead OnlyGets the contact description.
ImageLocationStringRead OnlyGets the location of the image associated with the contact.
Custom1StringRead OnlyGets a user defined value.
Custom2StringRead OnlyGets a user defined value.
Custom3StringRead OnlyGets a user defined value.
Custom4StringRead OnlyGets a user defined value.
PhoneNumbersArrayRead OnlyGets an array of Phone objects.
AddressesArrayRead OnlyGets an array of Address objects.
IsEmptyBooleanRead OnlyGets a boolean indicating if the contact object is empty.

Phone Object Properties

Property NameTypeRead/WriteDescription
PhoneNumberStringRead OnlyGets the phone's phone number.
PhoneTypeStringRead OnlyGets the phone type. One of the following: Home, PersonalMobile, Fax, Work, WorkMobile, Pager, Car, CompanyMain, Other.

Address Object Properties

Property NameTypeRead/WriteDescription
StreetStringRead OnlyGets the address's street number and name.
Street2StringRead OnlyGets a second optional street line.
CityStringRead OnlyGets the address's city.
StateStringRead OnlyGets the address's state.
ZipCodeStringRead OnlyGets the zipcode or postal code for the address.
FreeFormAddressStringRead OnlyGets the address as a single free form line.
AddressTypeStringRead OnlyGets the address type. One of the following: Home, Business, Other

Contact Configuration

Contact information is stored in the "Contacts.xml" file on the master service server in the common program data folder.


The example file below shows all the elements, although some of them are optional.

<?xml version="1.0" encoding="utf-8" ?>
<Contacts>
	<Contact>
		<Name>John Smith</Name>
		<Description>Kathy's brother</Description>
		<ImageLocation></ImageLocation>
		<Phone>
			<Number>3125551212</Number>
			<!-- PhoneTypes: Home, PersonalMobile, Fax, Work, WorkMobile, Pager, Car, CompanyMain, Other -->
			<PhoneType>Mobile</PhoneType>
		</Phone>
		<Address>
			<Street>123 Hickory Ln</Street>
			<City>Chicago</City>
			<State>IL</State>
			<ZipCode>60123</ZipCode>
			<!-- AddressTypes: Home, Business, Other -->
			<AddressType>Home</AddressType>
		</Address>
		<Address>
			<FreeFormAddress>456 Aspen Dr, Chicago, IL, 60123</FreeFormAddress>
			<!-- AddressTypes: Home, Business, Other -->
			<AddressType>Business</AddressType>
		</Address>
		<Custom1></Custom1>
		<Custom2></Custom2>
		<Custom3></Custom3>
		<Custom4></Custom4>
	</Contact>	   
</Contacts>

Contact xml elements:

Name          : (Required) The contact's name.
Description   : (Optional) Any description about the contact.
ImageLocation : (Optional) The location of an image associated with the contact.
Custom1       : (Optional) This is a custom field that can hold any thing you want.
Custom2       : (Optional) This is a custom field that can hold any thing you want.
Custom3       : (Optional) This is a custom field that can hold any thing you want.
Custom4       : (Optional) This is a custom field that can hold any thing you want.
Phone         : (Optional) See below for the Phone xml element children.
Address       : (Optional) See below for the Address xml element children.

Phone xml elements (Optional):

Number    : (Required) The phone number as consecutive numbers. Ex. 3125551212
PhoneType : (Required) One of the following: Home, PersonalMobile, Fax, Work, WorkMobile, Pager, Car, CompanyMain, Other.

Address xml elements (Optional):

Street          : (Optional) The name of the device driver's event that this rule applies to.
Street2         : (Optional) A second street line.
City            : (Optional) The city.
State           : (Optional) The state.
ZipCode         : (Optional) The zip code or postal code.
FreeFormAddress : A free form address field, this is mutually exclusive with Street, Street2, City, State, ZipCode.
AddressType     : (Required) One of the following: Home, Business, Other

Multiple Phone and Address elements may exist.