Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

OpalLineInterfaceDevice Class Reference

#include <lid.h>

Inheritance diagram for OpalLineInterfaceDevice:

OpalIxJDevice OpalVoipBlasterDevice OpalVpbDevice List of all members.

Public Types

enum  { MaxVolume = 100 }
enum  AECLevels {
  AECOff, AECLow, AECMedium, AECHigh,
  AECAuto, AECAGC, AECError
}
enum  { DefaultDTMFOnTime = 180, DefaultDTMFOffTime = 120 }
enum  CallProgressTones {
  NoTone = 0x00, DialTone = 0x01, RingTone = 0x02, BusyTone = 0x04,
  ClearTone = 0x08, CNGTone = 0x10, AllTones = 0x1f
}
enum  T35CountryCodes {
  Japan, Albania, Algeria, AmericanSamoa,
  Germany, Anguilla, AntiguaAndBarbuda, Argentina,
  Ascension, Australia, Austria, Bahamas,
  Bahrain, Bangladesh, Barbados, Belgium,
  Belize, Benin, Bermudas, Bhutan,
  Bolivia, Botswana, Brazil, BritishAntarcticTerritory,
  BritishIndianOceanTerritory, BritishVirginIslands, BruneiDarussalam, Bulgaria,
  Myanmar, Burundi, Byelorussia, Cameroon,
  Canada, CapeVerde, CaymanIslands, CentralAfricanRepublic,
  Chad, Chile, China, Colombia,
  Comoros, Congo, CookIslands, CostaRica,
  Cuba, Cyprus, Czechoslovakia, Cambodia,
  DemocraticPeoplesRepublicOfKorea, Denmark, Djibouti, DominicanRepublic,
  Dominica, Ecuador, Egypt, ElSalvador,
  EquatorialGuinea, Ethiopia, FalklandIslands, Fiji,
  Finland, France, FrenchPolynesia, FrenchSouthernAndAntarcticLands,
  Gabon, Gambia, Germany2, Angola,
  Ghana, Gibraltar, Greece, Grenada,
  Guam, Guatemala, Guernsey, Guinea,
  GuineaBissau, Guayana, Haiti, Honduras,
  Hongkong, Hungary, Iceland, India,
  Indonesia, Iran, Iraq, Ireland,
  Israel, Italy, CotedIvoire, Jamaica,
  Afghanistan, Jersey, Jordan, Kenya,
  Kiribati, KoreaRepublic, Kuwait, Lao,
  Lebanon, Lesotho, Liberia, Libya,
  Liechtenstein, Luxemborg, Macao, Madagascar,
  Malaysia, Malawi, Maldives, Mali,
  Malta, Mauritania, Mauritius, Mexico,
  Monaco, Mongolia, Montserrat, Morocco,
  Mozambique, Nauru, Nepal, Netherlands,
  NetherlandsAntilles, NewCaledonia, NewZealand, Nicaragua,
  Niger, Nigeria, Norway, Oman,
  Pakistan, Panama, PapuaNewGuinea, Paraguay,
  Peru, Philippines, Poland, Portugal,
  PuertoRico, Qatar, Romania, Rwanda,
  SaintKittsAndNevis, SaintCroix, SaintHelenaAndAscension, SaintLucia,
  SanMarino, SaintThomas, SaoTomeAndPrincipe, SaintVicentAndTheGrenadines,
  SaudiArabia, Senegal, Seychelles, SierraLeone,
  Singapore, SolomonIslands, Somalia, SouthAfrica,
  Spain, SriLanka, Sudan, Suriname,
  Swaziland, Sweden, Switzerland, Syria,
  Tanzania, Thailand, Togo, Tonga,
  TrinidadAndTobago, Tunisia, Turkey, TurksAndCaicosIslands,
  Tuvalu, Uganda, Ukraine, UnitedArabEmirates,
  UnitedKingdom, UnitedStates, BurkinaFaso, Uruguay,
  USSR, Vanuatu, VaticanCityState, Venezuela,
  VietNam, WallisAndFutuna, WesternSamoa, Yemen,
  Yemen2, Yugoslavia, Zaire, Zambia,
  Zimbabwe, NumCountryCodes, UnknownCountry = -1
}

Public Member Functions

 OpalLineInterfaceDevice ()
virtual BOOL Open (const PString &device)=0
virtual BOOL IsOpen () const
virtual BOOL Close ()
virtual PString GetName () const =0
virtual unsigned GetLineCount ()=0
virtual BOOL IsLineTerminal (unsigned line)
virtual BOOL IsLinePresent (unsigned line, BOOL force=FALSE)
virtual BOOL IsLineOffHook (unsigned line)=0
virtual BOOL SetLineOffHook (unsigned line, BOOL newState=TRUE)=0
virtual BOOL SetLineOnHook (unsigned line)
virtual BOOL HookFlash (unsigned line, unsigned flashTime=200)
virtual BOOL HasHookFlash (unsigned line)
virtual BOOL IsLineRinging (unsigned line, DWORD *cadence=NULL)
virtual BOOL RingLine (unsigned line, DWORD cadence)
virtual BOOL RingLine (unsigned line, PINDEX nCadence, unsigned *pattern)
virtual BOOL IsLineDisconnected (unsigned line, BOOL checkForWink=TRUE)
virtual BOOL SetLineToLineDirect (unsigned line1, unsigned line2, BOOL connect)
virtual BOOL IsLineToLineDirect (unsigned line1, unsigned line2)
virtual OpalMediaFormat::List GetMediaFormats () const =0
virtual BOOL SetReadFormat (unsigned line, const OpalMediaFormat &mediaFormat)=0
virtual BOOL SetWriteFormat (unsigned line, const OpalMediaFormat &mediaFormat)=0
virtual OpalMediaFormat GetReadFormat (unsigned line)=0
virtual OpalMediaFormat GetWriteFormat (unsigned line)=0
virtual BOOL SetReadCodec (unsigned line, RTP_DataFrame::PayloadTypes codec)
virtual BOOL SetWriteCodec (unsigned line, RTP_DataFrame::PayloadTypes codec)
virtual BOOL SetRawCodec (unsigned line)
virtual BOOL StopReadCodec (unsigned line)
virtual BOOL StopWriteCodec (unsigned line)
virtual BOOL StopRawCodec (unsigned line)
virtual BOOL SetReadFrameSize (unsigned line, PINDEX frameSize)
virtual BOOL SetWriteFrameSize (unsigned line, PINDEX frameSize)
virtual PINDEX GetReadFrameSize (unsigned line)=0
virtual PINDEX GetWriteFrameSize (unsigned line)=0
virtual BOOL ReadFrame (unsigned line, void *buf, PINDEX &count)=0
virtual BOOL WriteFrame (unsigned line, const void *buf, PINDEX count, PINDEX &written)=0
virtual BOOL ReadBlock (unsigned line, void *buf, PINDEX count)
virtual BOOL WriteBlock (unsigned line, const void *buf, PINDEX count)
virtual unsigned GetAverageSignalLevel (unsigned line, BOOL playback)
virtual BOOL EnableAudio (unsigned line, BOOL enable=TRUE)
BOOL DisableAudio (unsigned line)
virtual BOOL IsAudioEnabled (unsigned line)
virtual BOOL SetRecordVolume (unsigned line, unsigned volume)
virtual BOOL SetPlayVolume (unsigned line, unsigned volume)
virtual BOOL GetRecordVolume (unsigned line, unsigned &volume)
virtual BOOL GetPlayVolume (unsigned line, unsigned &volume)
virtual AECLevels GetAEC (unsigned line)
virtual BOOL SetAEC (unsigned line, AECLevels level)
virtual unsigned GetWinkDuration (unsigned line)
virtual BOOL SetWinkDuration (unsigned line, unsigned winkDuration)
virtual BOOL GetVAD (unsigned line)
virtual BOOL SetVAD (unsigned line, BOOL enable)
virtual BOOL GetCallerID (unsigned line, PString &idString, BOOL full=FALSE)
virtual BOOL SetCallerID (unsigned line, const PString &idString)
virtual BOOL SendCallerIDOnCallWaiting (unsigned line, const PString &idString)
virtual BOOL SendVisualMessageWaitingIndicator (unsigned line, BOOL on)
virtual BOOL PlayDTMF (unsigned line, const char *digits, DWORD onTime=DefaultDTMFOnTime, DWORD offTime=DefaultDTMFOffTime)
virtual char ReadDTMF (unsigned line)
virtual BOOL GetRemoveDTMF (unsigned line)
virtual BOOL SetRemoveDTMF (unsigned line, BOOL removeTones)
virtual unsigned IsToneDetected (unsigned line)
virtual unsigned WaitForToneDetect (unsigned line, unsigned timeout=3000)
virtual BOOL WaitForTone (unsigned line, CallProgressTones tone, unsigned timeout=3000)
virtual BOOL SetToneFilter (unsigned line, CallProgressTones tone, const PString &description)
virtual BOOL SetToneFilterParameters (unsigned line, CallProgressTones tone, unsigned lowFrequency, unsigned highFrequency, PINDEX numCadences, const unsigned *onTimes, const unsigned *offTimes)
virtual BOOL PlayTone (unsigned line, CallProgressTones tone)
virtual BOOL IsTonePlaying (unsigned line)
virtual BOOL StopTone (unsigned line)
virtual BOOL PlayAudio (unsigned line, const PString &filename)
virtual BOOL StopAudio (unsigned line)
virtual CallProgressTones DialOut (unsigned line, const PString &number, BOOL requireTones=FALSE)
T35CountryCodes GetCountryCode () const
PString GetCountryCodeName () const
virtual BOOL SetCountryCode (T35CountryCodes country)
virtual BOOL SetCountryCodeName (const PString &countryName)
virtual PStringList GetCountryCodeNameList () const
int GetErrorNumber () const
PString GetErrorText () const
virtual void PrintOn (ostream &strm) const

Static Public Member Functions

static PString GetCountryCodeName (T35CountryCodes code)
static T35CountryCodes GetCountryCode (const PString &name)

Protected Attributes

int os_handle
int osError
T35CountryCodes countryCode
PBYTEArray readDeblockingBuffer
PBYTEArray writeDeblockingBuffer
PINDEX readDeblockingOffset
PINDEX writeDeblockingOffset

Detailed Description

Line Interface Device abstraction. Note all functions in this device abstraction are assumed to be thread atomic.


Member Enumeration Documentation

anonymous enum
 

Enumerator:
MaxVolume 

anonymous enum
 

Enumerator:
DefaultDTMFOnTime 
DefaultDTMFOffTime 

enum OpalLineInterfaceDevice::AECLevels
 

Enumerator:
AECOff 
AECLow 
AECMedium 
AECHigh 
AECAuto 
AECAGC 
AECError 

enum OpalLineInterfaceDevice::CallProgressTones
 

Enumerator:
NoTone 
DialTone 
RingTone 
BusyTone 
ClearTone 
CNGTone 
AllTones 

enum OpalLineInterfaceDevice::T35CountryCodes
 

Enumerator:
Japan 
Albania 
Algeria 
AmericanSamoa 
Germany 
Anguilla 
AntiguaAndBarbuda 
Argentina 
Ascension 
Australia 
Austria 
Bahamas 
Bahrain 
Bangladesh 
Barbados 
Belgium 
Belize 
Benin 
Bermudas 
Bhutan 
Bolivia 
Botswana 
Brazil 
BritishAntarcticTerritory 
BritishIndianOceanTerritory 
BritishVirginIslands 
BruneiDarussalam 
Bulgaria 
Myanmar 
Burundi 
Byelorussia 
Cameroon 
Canada 
CapeVerde 
CaymanIslands 
CentralAfricanRepublic 
Chad 
Chile 
China 
Colombia 
Comoros 
Congo 
CookIslands 
CostaRica 
Cuba 
Cyprus 
Czechoslovakia 
Cambodia 
DemocraticPeoplesRepublicOfKorea 
Denmark 
Djibouti 
DominicanRepublic 
Dominica 
Ecuador 
Egypt 
ElSalvador 
EquatorialGuinea 
Ethiopia 
FalklandIslands 
Fiji 
Finland 
France 
FrenchPolynesia 
FrenchSouthernAndAntarcticLands 
Gabon 
Gambia 
Germany2 
Angola 
Ghana 
Gibraltar 
Greece 
Grenada 
Guam 
Guatemala 
Guernsey 
Guinea 
GuineaBissau 
Guayana 
Haiti 
Honduras 
Hongkong 
Hungary 
Iceland 
India 
Indonesia 
Iran 
Iraq 
Ireland 
Israel 
Italy 
CotedIvoire 
Jamaica 
Afghanistan 
Jersey 
Jordan 
Kenya 
Kiribati 
KoreaRepublic 
Kuwait 
Lao 
Lebanon 
Lesotho 
Liberia 
Libya 
Liechtenstein 
Luxemborg 
Macao 
Madagascar 
Malaysia 
Malawi 
Maldives 
Mali 
Malta 
Mauritania 
Mauritius 
Mexico 
Monaco 
Mongolia 
Montserrat 
Morocco 
Mozambique 
Nauru 
Nepal 
Netherlands 
NetherlandsAntilles 
NewCaledonia 
NewZealand 
Nicaragua 
Niger 
Nigeria 
Norway 
Oman 
Pakistan 
Panama 
PapuaNewGuinea 
Paraguay 
Peru 
Philippines 
Poland 
Portugal 
PuertoRico 
Qatar 
Romania 
Rwanda 
SaintKittsAndNevis 
SaintCroix 
SaintHelenaAndAscension 
SaintLucia 
SanMarino 
SaintThomas 
SaoTomeAndPrincipe 
SaintVicentAndTheGrenadines 
SaudiArabia 
Senegal 
Seychelles 
SierraLeone 
Singapore 
SolomonIslands 
Somalia 
SouthAfrica 
Spain 
SriLanka 
Sudan 
Suriname 
Swaziland 
Sweden 
Switzerland 
Syria 
Tanzania 
Thailand 
Togo 
Tonga 
TrinidadAndTobago 
Tunisia 
Turkey 
TurksAndCaicosIslands 
Tuvalu 
Uganda 
Ukraine 
UnitedArabEmirates 
UnitedKingdom 
UnitedStates 
BurkinaFaso 
Uruguay 
USSR 
Vanuatu 
VaticanCityState 
Venezuela 
VietNam 
WallisAndFutuna 
WesternSamoa 
Yemen 
Yemen2 
Yugoslavia 
Zaire 
Zambia 
Zimbabwe 
NumCountryCodes 
UnknownCountry 


Constructor & Destructor Documentation

OpalLineInterfaceDevice::OpalLineInterfaceDevice  ) 
 

Construct a new line interface device.


Member Function Documentation

virtual BOOL OpalLineInterfaceDevice::Close  )  [virtual]
 

Close the line interface device.

Reimplemented in OpalIxJDevice, OpalVoipBlasterDevice, and OpalVpbDevice.

virtual CallProgressTones OpalLineInterfaceDevice::DialOut unsigned  line,
const PString &  number,
BOOL  requireTones = FALSE
[virtual]
 

Dial a number on network line. The takes the line off hook, waits for dial tone, and transmits the specified number as DTMF tones.

If the requireTones flag is TRUE the call is aborted of the call progress tones are not detected. Otherwise the call proceeds with short delays while it tries to detect the call progress tones.

The return code indicates the following: DialTone No dial tone detected RingTone Dial was successful BusyTone The remote phone was busy ClearTone Dial failed (usually means rang out) NoTone There was an internal error making the call

Parameters:
number  Number of line
requireTones  Number to dial Require dial/ring tone to be detected

BOOL OpalLineInterfaceDevice::DisableAudio unsigned  line  )  [inline]
 

Disable audio for the line.

Parameters:
line  Number of line

virtual BOOL OpalLineInterfaceDevice::EnableAudio unsigned  line,
BOOL  enable = TRUE
[virtual]
 

Enable audio for the line.

Parameters:
enable  Number of line

Reimplemented in OpalIxJDevice, and OpalVoipBlasterDevice.

virtual AECLevels OpalLineInterfaceDevice::GetAEC unsigned  line  )  [virtual]
 

Get acoustic echo cancellation. Note, not all devices may support this function.

Parameters:
line  Number of line

Reimplemented in OpalIxJDevice, and OpalVoipBlasterDevice.

virtual unsigned OpalLineInterfaceDevice::GetAverageSignalLevel unsigned  line,
BOOL  playback
[virtual]
 

Get average signal level in last frame.

Parameters:
playback  Number of line Get average playback or record level.

Reimplemented in OpalIxJDevice, and OpalVoipBlasterDevice.

virtual BOOL OpalLineInterfaceDevice::GetCallerID unsigned  line,
PString &  idString,
BOOL  full = FALSE
[virtual]
 

Get Caller ID from the last incoming ring. The idString parameter is either simply the "number" field of the caller ID data, or if full is TRUE, all of the fields in the caller ID data.

The full data of the caller ID string consists of the number field, the time/date and the name field separated by tabs ('').

Parameters:
idString  Number of line
full  ID string returned Get full information in idString

Reimplemented in OpalIxJDevice, and OpalVoipBlasterDevice.

static T35CountryCodes OpalLineInterfaceDevice::GetCountryCode const PString &  name  )  [static]
 

T35CountryCodes OpalLineInterfaceDevice::GetCountryCode  )  const [inline]
 

Get the country code set for the device.

static PString OpalLineInterfaceDevice::GetCountryCodeName T35CountryCodes  code  )  [static]
 

Get the country code set for the device as a string.

PString OpalLineInterfaceDevice::GetCountryCodeName  )  const
 

Get the country code set for the device as a string.

virtual PStringList OpalLineInterfaceDevice::GetCountryCodeNameList  )  const [virtual]
 

Get the list of countries actually supported by the device

int OpalLineInterfaceDevice::GetErrorNumber  )  const [inline]
 

Return number for last error.

PString OpalLineInterfaceDevice::GetErrorText  )  const
 

Return text for last error.

virtual unsigned OpalLineInterfaceDevice::GetLineCount  )  [pure virtual]
 

Get the total number of lines supported by this device.

Implemented in OpalIxJDevice, OpalVoipBlasterDevice, and OpalVpbDevice.

virtual OpalMediaFormat::List OpalLineInterfaceDevice::GetMediaFormats  )  const [pure virtual]
 

Get the media formats this device is capable of using.

Implemented in OpalIxJDevice, OpalVoipBlasterDevice, and OpalVpbDevice.

virtual PString OpalLineInterfaceDevice::GetName  )  const [pure virtual]
 

Determine the type of line interface device. This is a string indication of the card type for user interface display purposes or device specific control. The device should be as detailed as possible eg "Quicknet LineJACK".

Implemented in OpalIxJDevice, OpalVoipBlasterDevice, and OpalVpbDevice.

virtual BOOL OpalLineInterfaceDevice::GetPlayVolume unsigned  line,
unsigned &  volume
[virtual]
 

Set volume level for playing. A value of 100 is the maximum volume possible for the hardware. A value of 0 is the minimum volume possible for the hardware.

Parameters:
volume  Number of line Volume level from 0 to 100%

Reimplemented in OpalIxJDevice, and OpalVoipBlasterDevice.

virtual OpalMediaFormat OpalLineInterfaceDevice::GetReadFormat unsigned  line  )  [pure virtual]
 

Get the media format (codec) for reading on the specified line.

Parameters:
line  Number of line

Implemented in OpalIxJDevice, OpalVoipBlasterDevice, and OpalVpbDevice.

virtual PINDEX OpalLineInterfaceDevice::GetReadFrameSize unsigned  line  )  [pure virtual]
 

Get the read frame size in bytes. All calls to ReadFrame() will return this number of bytes.

Parameters:
line  Number of line

Implemented in OpalIxJDevice, OpalVoipBlasterDevice, and OpalVpbDevice.

virtual BOOL OpalLineInterfaceDevice::GetRecordVolume unsigned  line,
unsigned &  volume
[virtual]
 

Get volume level for recording. A value of 100 is the maximum volume possible for the hardware. A value of 0 is the minimum volume possible for the hardware.

Parameters:
volume  Number of line Volume level from 0 to 100%

Reimplemented in OpalIxJDevice, and OpalVoipBlasterDevice.

virtual BOOL OpalLineInterfaceDevice::GetRemoveDTMF unsigned  line  )  [virtual]
 

Get DTMF removal mode. When set in this mode the DTMF tones detected are removed from the encoded data stream as returned by ReadFrame().

Parameters:
line  Number of line

Reimplemented in OpalIxJDevice, and OpalVoipBlasterDevice.

virtual BOOL OpalLineInterfaceDevice::GetVAD unsigned  line  )  [virtual]
 

Get voice activity detection. Note, not all devices, or selected codecs, may support this function.

Parameters:
line  Number of line

Reimplemented in OpalIxJDevice, and OpalVoipBlasterDevice.

virtual unsigned OpalLineInterfaceDevice::GetWinkDuration unsigned  line  )  [virtual]
 

Get wink detect minimum duration. This is the signal used by telcos to end PSTN call.

Parameters:
line  Number of line

Reimplemented in OpalIxJDevice.

virtual OpalMediaFormat OpalLineInterfaceDevice::GetWriteFormat unsigned  line  )  [pure virtual]
 

Get the media format (codec) for writing on the specified line.

Parameters:
line  Number of line

Implemented in OpalIxJDevice, OpalVoipBlasterDevice, and OpalVpbDevice.

virtual PINDEX OpalLineInterfaceDevice::GetWriteFrameSize unsigned  line  )  [pure virtual]
 

Get the write frame size in bytes. All calls to WriteFrame() must be this number of bytes.

Parameters:
line  Number of line

Implemented in OpalIxJDevice, OpalVoipBlasterDevice, and OpalVpbDevice.

virtual BOOL OpalLineInterfaceDevice::HasHookFlash unsigned  line  )  [virtual]
 

Return TRUE if a hook flash has been detected

Reimplemented in OpalIxJDevice, and OpalVoipBlasterDevice.

virtual BOOL OpalLineInterfaceDevice::HookFlash unsigned  line,
unsigned  flashTime = 200
[virtual]
 

Set the hook state off then straight back on again. This will only operate if the line is currently off hook.

Parameters:
flashTime  Number of line Time for hook flash in milliseconds

virtual BOOL OpalLineInterfaceDevice::IsAudioEnabled unsigned  line  )  [virtual]
 

Determine if audio for the line is enabled.

Parameters:
line  Number of line

Reimplemented in OpalIxJDevice.

virtual BOOL OpalLineInterfaceDevice::IsLineDisconnected unsigned  line,
BOOL  checkForWink = TRUE
[virtual]
 

Determine if line has been disconnected from a call. This uses the hardware (and country) dependent means for determining

Parameters:
checkForWink  Number of line

Reimplemented in OpalIxJDevice, OpalVoipBlasterDevice, and OpalVpbDevice.

virtual BOOL OpalLineInterfaceDevice::IsLineOffHook unsigned  line  )  [pure virtual]
 

Determine if line is currently off hook. This function implies that the state is debounced and that a return value of TRUE indicates that the phone is really off hook. That is hook flashes and winks are masked out.

Parameters:
line  Number of line

Implemented in OpalIxJDevice, OpalVoipBlasterDevice, and OpalVpbDevice.

virtual BOOL OpalLineInterfaceDevice::IsLinePresent unsigned  line,
BOOL  force = FALSE
[virtual]
 

Determine if a physical line is present on the logical line.

Parameters:
force  Number of line Force test, do not optimise

Reimplemented in OpalIxJDevice, and OpalVoipBlasterDevice.

virtual BOOL OpalLineInterfaceDevice::IsLineRinging unsigned  line,
DWORD *  cadence = NULL
[virtual]
 

Determine if line is ringing. This function implies that the state is "debounced" and that a return value of TRUE indicates that the phone is still ringing and it is not simply a pause in the ring cadence.

If cadence is not NULL then it is set with the bit pattern for the incoming ringing. Note that in this case the funtion may take a full sequence to return. If it is NULL it can be assumed that the function will return quickly.

Parameters:
cadence  Number of line Cadence of incoming ring

Reimplemented in OpalIxJDevice, OpalVoipBlasterDevice, and OpalVpbDevice.

virtual BOOL OpalLineInterfaceDevice::IsLineTerminal unsigned  line  )  [virtual]
 

Get the type of the line. A "terminal" line is one where a call may terminate. For example a POTS line with a standard telephone handset on it would be a terminal line. The alternative is a "network" line, that is one connected to switched network eg the standard PSTN.

Parameters:
line  Number of line

Reimplemented in OpalIxJDevice, and OpalVoipBlasterDevice.

virtual BOOL OpalLineInterfaceDevice::IsLineToLineDirect unsigned  line1,
unsigned  line2
[virtual]
 

Determine if the two lines are directly connected.

Parameters:
line2  Number of first line Number of second line

Reimplemented in OpalIxJDevice, and OpalVoipBlasterDevice.

virtual BOOL OpalLineInterfaceDevice::IsOpen  )  const [virtual]
 

Determine if the line interface device is open.

virtual unsigned OpalLineInterfaceDevice::IsToneDetected unsigned  line  )  [virtual]
 

See if any tone is detected.

Parameters:
line  Number of line

Reimplemented in OpalIxJDevice, OpalVoipBlasterDevice, and OpalVpbDevice.

virtual BOOL OpalLineInterfaceDevice::IsTonePlaying unsigned  line  )  [virtual]
 

Determine if a tone is still playing

Parameters:
line  Number of line

Reimplemented in OpalIxJDevice, and OpalVoipBlasterDevice.

virtual BOOL OpalLineInterfaceDevice::Open const PString &  device  )  [pure virtual]
 

Open the line interface device.

Parameters:
device  Device identifier name.

Implemented in OpalIxJDevice, OpalVoipBlasterDevice, and OpalVpbDevice.

virtual BOOL OpalLineInterfaceDevice::PlayAudio unsigned  line,
const PString &  filename
[virtual]
 

Play a wav file

Parameters:
filename  Number of line File Name

Reimplemented in OpalVpbDevice.

virtual BOOL OpalLineInterfaceDevice::PlayDTMF unsigned  line,
const char *  digits,
DWORD  onTime = DefaultDTMFOnTime,
DWORD  offTime = DefaultDTMFOffTime
[virtual]
 

Play a DTMF digit. Any characters that are not in the set 0-9, A-D, * or # will be ignored.

Parameters:
digits  Number of line
onTime  DTMF digits to be played
offTime  Number of milliseconds to play each DTMF digit Number of milliseconds between digits

Reimplemented in OpalIxJDevice, OpalVoipBlasterDevice, and OpalVpbDevice.

virtual BOOL OpalLineInterfaceDevice::PlayTone unsigned  line,
CallProgressTones  tone
[virtual]
 

Play a tone.

Parameters:
tone  Number of line Tone to be played

virtual void OpalLineInterfaceDevice::PrintOn ostream &  strm  )  const [virtual]
 

virtual BOOL OpalLineInterfaceDevice::ReadBlock unsigned  line,
void *  buf,
PINDEX  count
[virtual]
 

High level read of audio data from the device. This version will allow non-integral number of frames to be read.

Parameters:
buf  Number of line
count  Pointer to a block of memory to receive the read bytes. Count of bytes to read.

virtual char OpalLineInterfaceDevice::ReadDTMF unsigned  line  )  [virtual]
 

Read a DTMF digit detected. This may be characters from the set 0-9, A-D, * or #. A null ('') character indicates that there are no tones in the queue. Characters E through P indicate the following tones:

E = 800 F = 1000 G = 1250 H = 950 I = 1100 J = 1400 K = 1500 L = 1600 M = 1800 N = 2100 O = 1300 P = 2450

Parameters:
line  Number of line

Reimplemented in OpalIxJDevice, OpalVoipBlasterDevice, and OpalVpbDevice.

virtual BOOL OpalLineInterfaceDevice::ReadFrame unsigned  line,
void *  buf,
PINDEX &  count
[pure virtual]
 

Low level read of a frame from the device.

Parameters:
buf  Number of line
count  Pointer to a block of memory to receive data. Number of bytes read, <= GetReadFrameSize()

Implemented in OpalIxJDevice, OpalVoipBlasterDevice, and OpalVpbDevice.

virtual BOOL OpalLineInterfaceDevice::RingLine unsigned  line,
PINDEX  nCadence,
unsigned *  pattern
[virtual]
 

Begin ringing local phone set with specified cadence. If nCadence is zero then stops ringing.

Note that not be possible on a given line, for example on a PSTN line the ring state is determined by external hardware and cannot be changed by the software.

Also note that the cadence may be ignored by particular hardware driver so that only the zero or non-zero values are significant.

The ring pattern is an array of millisecond times for on and off parts of the cadence. Thus the Australian ring cadence would be represented by the array unsigned AusRing[] = { 400, 200, 400, 2000 }

Parameters:
nCadence  Number of line
pattern  Number of entries in cadence array Ring pattern times

Reimplemented in OpalIxJDevice.

virtual BOOL OpalLineInterfaceDevice::RingLine unsigned  line,
DWORD  cadence
[virtual]
 

Begin ringing local phone set with specified cadence. If cadence is zero then stops ringing.

Note that not be possible on a given line, for example on a PSTN line the ring state is determined by external hardware and cannot be changed by the software.

Also note that the cadence may be ignored by particular hardware driver so that only the zero or non-zero values are significant.

Parameters:
cadence  Number of line Cadence bit map for ring pattern

Reimplemented in OpalIxJDevice, and OpalVoipBlasterDevice.

virtual BOOL OpalLineInterfaceDevice::SendCallerIDOnCallWaiting unsigned  line,
const PString &  idString
[virtual]
 

Send a Caller ID on call waiting command The full data of the caller ID string consists of the number field, the time/date and the name field separated by tabs ('').

If the date field is missing (two consecutive tabs) then the current time and date is used. Using an empty string will clear the caller ID so that no caller ID is sent on the next RingLine() call.

Parameters:
idString  Number of line ID string to use

Reimplemented in OpalIxJDevice, and OpalVoipBlasterDevice.

virtual BOOL OpalLineInterfaceDevice::SendVisualMessageWaitingIndicator unsigned  line,
BOOL  on
[virtual]
 

Send a Visual Message Waiting Indicator

Parameters:
on  Number of line

Reimplemented in OpalIxJDevice, and OpalVoipBlasterDevice.

virtual BOOL OpalLineInterfaceDevice::SetAEC unsigned  line,
AECLevels  level
[virtual]
 

Set acoustic echo cancellation. Note, not all devices may support this function.

Parameters:
level  Number of line AEC level

virtual BOOL OpalLineInterfaceDevice::SetCallerID unsigned  line,
const PString &  idString
[virtual]
 

Set Caller ID for use in next RingLine() call. The full data of the caller ID string consists of the number field, the time/date and the name field separated by tabs ('').

If the date field is missing (two consecutive tabs) then the current time and date is used. Using an empty string will clear the caller ID so that no caller ID is sent on the next RingLine() call.

Parameters:
idString  Number of line ID string to use

Reimplemented in OpalIxJDevice, and OpalVoipBlasterDevice.

virtual BOOL OpalLineInterfaceDevice::SetCountryCode T35CountryCodes  country  )  [virtual]
 

Set the country code set for the device. This may change the line analogue coefficients, ring detect, call disconnect detect and call progress tones to fit the countries telephone network.

Parameters:
country  COuntry code for device

virtual BOOL OpalLineInterfaceDevice::SetCountryCodeName const PString &  countryName  )  [virtual]
 

Set the country code set for the device.

Parameters:
countryName  COuntry code for device

virtual BOOL OpalLineInterfaceDevice::SetLineOffHook unsigned  line,
BOOL  newState = TRUE
[pure virtual]
 

Set the hook state of the line. Note that not be possible on a given line, for example a POTS line with a standard telephone handset. The hook state is determined by external hardware and cannot be changed by the software.

Parameters:
newState  Number of line New state to set

Implemented in OpalIxJDevice, OpalVoipBlasterDevice, and OpalVpbDevice.

virtual BOOL OpalLineInterfaceDevice::SetLineOnHook unsigned  line  )  [inline, virtual]
 

Set the hook state of the line. This is the complement of SetLineOffHook().

Parameters:
line  Number of line

virtual BOOL OpalLineInterfaceDevice::SetLineToLineDirect unsigned  line1,
unsigned  line2,
BOOL  connect
[virtual]
 

Directly connect the two lines.

Parameters:
line2  Number of first line
connect  Number of second line Flag for connect/disconnect

Reimplemented in OpalIxJDevice, and OpalVoipBlasterDevice.

virtual BOOL OpalLineInterfaceDevice::SetPlayVolume unsigned  line,
unsigned  volume
[virtual]
 

Set volume level for playing. A value of 100 is the maximum volume possible for the hardware. A value of 0 is the minimum volume possible for the hardware.

Parameters:
volume  Number of line Volume level from 0 to 100%

Reimplemented in OpalIxJDevice, OpalVoipBlasterDevice, and OpalVpbDevice.

virtual BOOL OpalLineInterfaceDevice::SetRawCodec unsigned  line  )  [virtual]
 

Set the line codec for reading/writing raw PCM data. A descendent may use this to do anything special to the device before beginning special PCM output. For example disabling AEC and set volume levels to standard values. This can then be used for generating standard tones using PCM if the driver is not capable of generating or detecting them directly.

The default behaviour simply does a SetReadCodec and SetWriteCodec for PCM data.

Parameters:
line  Number of line

Reimplemented in OpalIxJDevice, and OpalVoipBlasterDevice.

virtual BOOL OpalLineInterfaceDevice::SetReadCodec unsigned  line,
RTP_DataFrame::PayloadTypes  codec
[virtual]
 

Set the line codec for reading. Note this function is now deprecated as it could not distinguish between some codec subtypes (eg G.729 and G.729B) or non standard formats. Use the SetReadFormat function instead.

The default behaviour now finds the first OpalMediaFormat with the payload type and uses that.

Parameters:
codec  Number of line Codec type

virtual BOOL OpalLineInterfaceDevice::SetReadFormat unsigned  line,
const OpalMediaFormat mediaFormat
[pure virtual]
 

Set the media format (codec) for reading on the specified line.

Parameters:
mediaFormat  Number of line Codec type

Implemented in OpalIxJDevice, OpalVoipBlasterDevice, and OpalVpbDevice.

virtual BOOL OpalLineInterfaceDevice::SetReadFrameSize unsigned  line,
PINDEX  frameSize
[virtual]
 

Set the read frame size in bytes. Note that a LID may ignore this value so always use GetReadFrameSize() for I/O.

Parameters:
frameSize  Number of line New frame size

Reimplemented in OpalIxJDevice, OpalVoipBlasterDevice, and OpalVpbDevice.

virtual BOOL OpalLineInterfaceDevice::SetRecordVolume unsigned  line,
unsigned  volume
[virtual]
 

Set volume level for recording. A value of 100 is the maximum volume possible for the hardware. A value of 0 is the minimum volume possible for the hardware.

Parameters:
volume  Number of line Volume level from 0 to 100%

Reimplemented in OpalIxJDevice, OpalVoipBlasterDevice, and OpalVpbDevice.

virtual BOOL OpalLineInterfaceDevice::SetRemoveDTMF unsigned  line,
BOOL  removeTones
[virtual]
 

Set DTMF removal mode. When set in this mode the DTMF tones detected are removed from the encoded data stream as returned by ReadFrame().

Parameters:
removeTones  Number of line Flag for removing DTMF tones.

Reimplemented in OpalIxJDevice, and OpalVoipBlasterDevice.

virtual BOOL OpalLineInterfaceDevice::SetToneFilter unsigned  line,
CallProgressTones  tone,
const PString &  description
[virtual]
 

Set a tones filter information. The description string is of the form frequence ':' cadence where frequency is either frequency low '-' high and cadence is mintime ontime '-' offtime ontime '-' offtime '-' ontime '-' offtime examples: 300:0.25 300Hz for minimum 250ms 1100:0.4-0.4 1100Hz with cadence 400ms on, 400ms off 900-1300:1.5 900Hz to 1300Hz for minimum of 1.5 seconds 425:0.4-0.2-0.4-2 425Hz with cadence 400ms on, 200ms off, 400ms on, 2 seconds off

Parameters:
tone  Number of line
description  Tone filter to change Description of filter parameters

virtual BOOL OpalLineInterfaceDevice::SetToneFilterParameters unsigned  line,
CallProgressTones  tone,
unsigned  lowFrequency,
unsigned  highFrequency,
PINDEX  numCadences,
const unsigned *  onTimes,
const unsigned *  offTimes
[virtual]
 

Set a tones filter information.

Parameters:
tone  Number of line
lowFrequency  Tone filter to change
highFrequency  Low frequency
numCadences  High frequency
onTimes  Number of cadence times
offTimes  Cadence ON times Cadence OFF times

virtual BOOL OpalLineInterfaceDevice::SetVAD unsigned  line,
BOOL  enable
[virtual]
 

Set voice activity detection. Note, not all devices, or selected codecs, may support this function.

Parameters:
enable  Number of line Flag for enabling VAD

Reimplemented in OpalIxJDevice, and OpalVoipBlasterDevice.

virtual BOOL OpalLineInterfaceDevice::SetWinkDuration unsigned  line,
unsigned  winkDuration
[virtual]
 

Set wink detect minimum duration. This is the signal used by telcos to end PSTN call.

Parameters:
winkDuration  Number of line New minimum duration

Reimplemented in OpalIxJDevice.

virtual BOOL OpalLineInterfaceDevice::SetWriteCodec unsigned  line,
RTP_DataFrame::PayloadTypes  codec
[virtual]
 

Set the line codec for writing. Note this function is now deprecated as it could not distinguish between some codec subtypes (eg G.729 and G.729B) or non standard formats. Use the SetReadFormat function instead.

Parameters:
codec  Number of line Codec type

virtual BOOL OpalLineInterfaceDevice::SetWriteFormat unsigned  line,
const OpalMediaFormat mediaFormat
[pure virtual]
 

Set the media format (codec) for writing on the specified line.

Parameters:
mediaFormat  Number of line Codec type

Implemented in OpalIxJDevice, OpalVoipBlasterDevice, and OpalVpbDevice.

virtual BOOL OpalLineInterfaceDevice::SetWriteFrameSize unsigned  line,
PINDEX  frameSize
[virtual]
 

Set the write frame size in bytes. Note that a LID may ignore this value so always use GetReadFrameSize() for I/O.

Parameters:
frameSize  Number of line New frame size

Reimplemented in OpalIxJDevice, OpalVoipBlasterDevice, and OpalVpbDevice.

virtual BOOL OpalLineInterfaceDevice::StopAudio unsigned  line  )  [virtual]
 

Stop playing the Wave File

Parameters:
line  Number of line

Reimplemented in OpalVpbDevice.

virtual BOOL OpalLineInterfaceDevice::StopRawCodec unsigned  line  )  [virtual]
 

Stop the raw PCM mode codec.

Parameters:
line  Number of line

Reimplemented in OpalIxJDevice, and OpalVoipBlasterDevice.

virtual BOOL OpalLineInterfaceDevice::StopReadCodec unsigned  line  )  [virtual]
 

Stop the read codec.

Parameters:
line  Number of line

Reimplemented in OpalIxJDevice, OpalVoipBlasterDevice, and OpalVpbDevice.

virtual BOOL OpalLineInterfaceDevice::StopTone unsigned  line  )  [virtual]
 

Stop playing a tone.

Parameters:
line  Number of line

Reimplemented in OpalIxJDevice, OpalVoipBlasterDevice, and OpalVpbDevice.

virtual BOOL OpalLineInterfaceDevice::StopWriteCodec unsigned  line  )  [virtual]
 

Stop the write codec.

Parameters:
line  Number of line

Reimplemented in OpalIxJDevice, OpalVoipBlasterDevice, and OpalVpbDevice.

virtual BOOL OpalLineInterfaceDevice::WaitForTone unsigned  line,
CallProgressTones  tone,
unsigned  timeout = 3000
[virtual]
 

See if a specific tone is detected.

Parameters:
tone  Number of line
timeout  Tone to wait for Milliseconds to wait for

virtual unsigned OpalLineInterfaceDevice::WaitForToneDetect unsigned  line,
unsigned  timeout = 3000
[virtual]
 

See if any tone is detected.

Parameters:
timeout  Number of line Milliseconds to wait for

virtual BOOL OpalLineInterfaceDevice::WriteBlock unsigned  line,
const void *  buf,
PINDEX  count
[virtual]
 

High level write audio data to the device.

Parameters:
buf  Number of line
count  Pointer to a block of memory to write. Count of bytes to write.

virtual BOOL OpalLineInterfaceDevice::WriteFrame unsigned  line,
const void *  buf,
PINDEX  count,
PINDEX &  written
[pure virtual]
 

Low level write frame to the device.

Parameters:
buf  Number of line
count  Pointer to a block of memory to write.
written  Number of bytes to write, <= GetWriteFrameSize() Number of bytes written, <= GetWriteFrameSize()

Implemented in OpalIxJDevice, OpalVoipBlasterDevice, and OpalVpbDevice.


Member Data Documentation

T35CountryCodes OpalLineInterfaceDevice::countryCode [protected]
 

int OpalLineInterfaceDevice::os_handle [protected]
 

int OpalLineInterfaceDevice::osError [protected]
 

PBYTEArray OpalLineInterfaceDevice::readDeblockingBuffer [protected]
 

PINDEX OpalLineInterfaceDevice::readDeblockingOffset [protected]
 

PBYTEArray OpalLineInterfaceDevice::writeDeblockingBuffer [protected]
 

PINDEX OpalLineInterfaceDevice::writeDeblockingOffset [protected]
 


The documentation for this class was generated from the following file:
Generated on Mon Sep 26 15:45:29 2005 for OpenH323 by  doxygen 1.4.4