class OpalLineInterfaceDevice |
Line Interface Device abstraction.
![]() | OpalLineInterfaceDevice () Construct a new line interface device |
![]() | Open ( const PString & device ) Open the line interface device. |
![]() | IsOpen () const Determine if the line interface device is open |
![]() | Close () Close the line interface device |
![]() | GetName () const Determine the type of line interface device. |
![]() | GetLineCount () Get the total number of lines supported by this device |
![]() | IsLineTerminal ( unsigned line ) Get the type of the line. |
![]() | IsLinePresent ( unsigned line, BOOL force = FALSE ) Determine if a physical line is present on the logical line. |
![]() | IsLineOffHook ( unsigned line ) Determine if line is currently off hook. |
![]() | SetLineOffHook ( unsigned line, BOOL newState = TRUE ) Set the hook state of the line. |
![]() | SetLineOnHook ( unsigned line ) Set the hook state of the line. |
![]() | HookFlash ( unsigned line, unsigned flashTime = 200 ) Set the hook state off then straight back on again. |
![]() | HasHookFlash (unsigned line) Return TRUE if a hook flash has been detected |
![]() | IsLineRinging ( unsigned line, DWORD* cadence = NULL ) Determine if line is ringing. |
![]() | RingLine ( unsigned line, DWORD cadence ) Begin ringing local phone set with specified cadence. |
![]() | RingLine ( unsigned line, PINDEX nCadence, unsigned* pattern ) Begin ringing local phone set with specified cadence. |
![]() | IsLineDisconnected ( unsigned line, BOOL checkForWink = TRUE ) Determine if line has been disconnected from a call. |
![]() | SetLineToLineDirect ( unsigned line1, unsigned line2, BOOL connect ) Directly connect the two lines. |
![]() | IsLineToLineDirect ( unsigned line1, unsigned line2 ) Determine if the two lines are directly connected. |
![]() | GetMediaFormats () const Get the media formats this device is capable of using |
![]() | SetReadFormat ( unsigned line, const OpalMediaFormat & mediaFormat ) Set the media format (codec) for reading on the specified line. |
![]() | SetWriteFormat ( unsigned line, const OpalMediaFormat & mediaFormat ) Set the media format (codec) for writing on the specified line. |
![]() | GetReadFormat ( unsigned line ) Get the media format (codec) for reading on the specified line. |
![]() | GetWriteFormat ( unsigned line ) Get the media format (codec) for writing on the specified line. |
![]() | SetReadCodec ( unsigned line, RTP_DataFrame::PayloadTypes codec ) Set the line codec for reading. |
![]() | SetWriteCodec ( unsigned line, RTP_DataFrame::PayloadTypes codec ) Set the line codec for writing. |
![]() | SetRawCodec ( unsigned line ) Set the line codec for reading/writing raw PCM data. |
![]() | StopReadCodec ( unsigned line ) Stop the read codec. |
![]() | StopWriteCodec ( unsigned line ) Stop the write codec. |
![]() | StopRawCodec ( unsigned line ) Stop the raw PCM mode codec. |
![]() | SetReadFrameSize ( unsigned line, PINDEX frameSize ) Set the read frame size in bytes. |
![]() | SetWriteFrameSize ( unsigned line, PINDEX frameSize ) Set the write frame size in bytes. |
![]() | GetReadFrameSize ( unsigned line ) Get the read frame size in bytes. |
![]() | GetWriteFrameSize ( unsigned line ) Get the write frame size in bytes. |
![]() | ReadFrame ( unsigned line, void* buf, PINDEX & count ) Low level read of a frame from the device. |
![]() | WriteFrame ( unsigned line, const void* buf, PINDEX count, PINDEX & written ) Low level write frame to the device. |
![]() | ReadBlock ( unsigned line, void* buf, PINDEX count ) High level read of audio data from the device. |
![]() | WriteBlock ( unsigned line, const void* buf, PINDEX count ) High level write audio data to the device. |
![]() | GetAverageSignalLevel ( unsigned line, BOOL playback ) Get average signal level in last frame. |
![]() | EnableAudio ( unsigned line, BOOL enable = TRUE ) Enable audio for the line. |
![]() | DisableAudio ( unsigned line ) Disable audio for the line. |
![]() | IsAudioEnabled ( unsigned line ) Determine if audio for the line is enabled. |
![]() | SetRecordVolume ( unsigned line, unsigned volume ) Set volume level for recording. |
![]() | SetPlayVolume ( unsigned line, unsigned volume ) Set volume level for playing. |
![]() | GetRecordVolume ( unsigned line, unsigned & volume ) Get volume level for recording. |
![]() | GetPlayVolume ( unsigned line, unsigned & volume ) Set volume level for playing. |
![]() | GetAEC ( unsigned line ) Get acoustic echo cancellation. |
![]() | SetAEC ( unsigned line, AECLevels level ) Set acoustic echo cancellation. |
![]() | GetWinkDuration ( unsigned line ) Get wink detect minimum duration. |
![]() | SetWinkDuration ( unsigned line, unsigned winkDuration ) Set wink detect minimum duration. |
![]() | GetVAD ( unsigned line ) Get voice activity detection. |
![]() | SetVAD ( unsigned line, BOOL enable ) Set voice activity detection. |
![]() | GetCallerID ( unsigned line, PString & idString, BOOL full = FALSE ) Get Caller ID from the last incoming ring. |
![]() | SetCallerID ( unsigned line, const PString & idString ) Set Caller ID for use in next RingLine() call. |
![]() | SendCallerIDOnCallWaiting ( unsigned line, const PString & idString ) 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 ('\t'). |
![]() | SendVisualMessageWaitingIndicator ( unsigned line, BOOL on ) Send a Visual Message Waiting Indicator |
![]() | PlayDTMF ( unsigned line, const char* digits, DWORD onTime = DefaultDTMFOnTime, DWORD offTime = DefaultDTMFOffTime ) Play a DTMF digit. |
![]() | ReadDTMF ( unsigned line ) Read a DTMF digit detected. |
![]() | GetRemoveDTMF ( unsigned line ) Get DTMF removal mode. |
![]() | SetRemoveDTMF ( unsigned line, BOOL removeTones ) Set DTMF removal mode. |
![]() | IsToneDetected ( unsigned line ) See if any tone is detected. |
![]() | WaitForToneDetect ( unsigned line, unsigned timeout = 3000 ) See if any tone is detected. |
![]() | WaitForTone ( unsigned line, CallProgressTones tone, unsigned timeout = 3000 ) See if a specific tone is detected. |
![]() | SetToneFilter ( unsigned line, CallProgressTones tone, const PString & description ) Set a tones filter information. |
![]() | SetToneFilterParameters ( unsigned line, CallProgressTones tone, unsigned lowFrequency, unsigned highFrequency, PINDEX numCadences, const unsigned* onTimes, const unsigned* offTimes ) Set a tones filter information. |
![]() | PlayTone ( unsigned line, CallProgressTones tone ) Play a tone. |
![]() | IsTonePlaying ( unsigned line ) Determine if a tone is still playing |
![]() | StopTone ( unsigned line ) Stop playing a tone. |
![]() | PlayAudio ( unsigned line, const PString & filename ) Play a wav file |
![]() | StopAudio ( unsigned line ) Stop playing the Wave File |
![]() | DialOut ( unsigned line, const PString & number, BOOL requireTones = FALSE ) Dial a number on network line. |
![]() | GetCountryCode () const Get the country code set for the device |
![]() | GetCountryCodeName () const Get the country code set for the device as a string |
![]() | GetCountryCodeName (T35CountryCodes code) Get the country code set for the device as a string |
![]() | SetCountryCode ( T35CountryCodes country ) Set the country code set for the device. |
![]() | SetCountryCodeName ( const PString & countryName ) Set the country code set for the device. |
![]() | GetCountryCodeNameList () const Get the list of countries actually supported by the device |
![]() | GetErrorNumber () const Return number for last error |
![]() | GetErrorText () const Return text for last error |
Line Interface Device abstraction. Note all functions in this device abstraction are assumed to be thread atomic.
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.
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.
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 }
The default behaviour now finds the first OpalMediaFormat with the payload type and uses that.
The default behaviour simply does a SetReadCodec and SetWriteCodec for PCM data.
The full data of the caller ID string consists of the number field, the time/date and the name field separated by tabs ('\t').
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.
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.
E = 800 F = 1000 G = 1250 H = 950 I = 1100 J = 1400 K = 1500 L = 1600 M = 1800 N = 2100 O = 1300 P = 2450
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
Alphabetic index HTML hierarchy of classes or Java