|
|
Classification: |
C++ |
Category: |
Telephony (ETel) |
Created: |
07/25/2000 |
Modified: |
09/01/2001 |
Number: |
FAQ-0508 |
Platform: |
ER5 |
|
Question: The RPhone::Open() function takes a name of a phone as an argument. The name is easily acquired by using RTelServer::EnumeratePhones()
and RTelServer::GetPhoneInfo(). But how does this name relate to the user friendly name of the phone that is stored in the CommDb?
I've made a dialog where I let the user pick a modem. The names I'm presenting are those in Commdb table MODEM_CONFIG.COMMDB_NAME
(user friendly names) and I store the MODEM_CONFIG.COMMDB_ID of the picked row. I then want to open a RPhone object but don't
know how to map the id of the Commdb row to the cryptic name expected by RPhone::Open(). How to I do this and where does the
RTelServer::PhonInfo.iName come from?
Answer: The modem names in CommDb are not a match for the phone names you pass to RPhone open. They are a match for the supported
modems. These modems may in fact use the same TSY (a Telephony SYstem module that encapsulates the functionally of a modem).
You need take the modem name from your dialog, extract the relevant TSY and enumerate the phone(s) for this TSY.
Here's the rough train of events.You can get a list of modems from the CommDb. Get the user friendly names and list them
in your dialog. The user can then make a selection. Each modem has an associated TSY name (it's possible that a number of
modems may share the same TSY). The TSY name can be retrieved from the CommDb.
When the modem is selected you load the associated TSY and enumerate the phones. Usually the TSY offers just the one phone.
You need to be careful, however, as there may be more that one TSY loaded. RTelServer::EnumeratePhones() gives you a list
of phones from all loaded TSYs. You need to check the TSY name from RTelServer::GetPhoneInfo() matches the TSY name you want.
When you've made sure the TSY names match you can use the phone name from RTelServer::GetPhoneInfo() with RPhone.Open().
|
|
|