Initializes a QuickNet PhoneCARD and handles hardware control
Inheritance:
Public Methods
-
PhoneCardDevice( const char* deviceName, Sptr < Fifo < Sptr < SipProxyEvent > > > inputQ, Sptr < Fifo < Sptr < SipProxyEvent > > > outputQ )
- Creates a hardware object to control a single port gateway.
-
~PhoneCardDevice()
- Destructor
-
void* hardwareMain(void* parms)
- Starts the main processing loop of the hardware
-
int addToFdSet(fd_set* fd)
- Add device's socket to the fd (File Descriptor)
-
int process(fd_set* fd)
- Process all pending hardware events
-
int audioStart(const HardwareAudioRequest& request)
- Start audio channel on device
-
int audioStop()
- Stops audio channel on device
-
int audioSuspend()
- Suspend audio channel on device
-
int audioResume(const HardwareAudioRequest& request)
- Resume audio channel on device
-
virtual void processRTP()
- process RTP audio packets
-
virtual int getRtpPort()
- Instantiates a rtp session and reserves a rtp port
-
virtual void releaseRtpPort()
- Release the port and deallocate the rtp session
Private Fields
-
Sptr< Fifo < Sptr < SipProxyEvent > > > sessionQ
- Output queue to notify endpoint of occurence of hardware events
-
bool audioActive
- true if RTP audio packets are being processed
-
bool audioHalfActive
- true if only sending RTP audio packets
-
bool playDialTone
- Used to turn off dialtone after pressing a digit
-
RtpSession* audioStack
- RTP session variables
-
int ringbackFd
- variables for remote ringback tone
-
VMutex deviceMutex
- This is used to lock the RTP thread and the hardware thread so that they don't access the hardware device simultaneously
-
int stdinFD
- needed for proper terminal control
Private Methods
-
int getRingbackTone(char* , int size)
- ???
-
void onhookOrFlash()
- Used to determine when an onhook event becomes a flash event
-
void startSendRingback()
-
void stopSendRingback()
-
void provideDialToneStart()
-
void provideDialToneStop()
-
void provideRingStart()
-
void provideRingStop()
-
void provideLocalRingbackStart()
-
void provideLocalRingbackStop()
-
void provideBusyToneStart()
-
void provideBusyToneStop()
-
void provideFastBusyToneStart()
-
void provideFastBusyToneStop()
-
void provideCallInfo(string, string, string)
- Currently used only in VmcpDevice
-
void provideDtmf(DeviceSignalType)
- Prints dtmf digit or symbol to stdout
-
void killTone()
- Sends ioctl to hardware to stop dialtone
-
void provideCallWaitingBeepStart()
-
void provideCallWaitingBeepStop()
-
void provideTone( PhoneCardTone tone )
- Provide simulated tones by playing corresponding audio file
Public Methods
-
virtual void setCallId( const Sptr<SipCallId> newCallId )
-
virtual Sptr<SipCallId> getCallId() const
-
virtual void addCallWaitingId( const Sptr<SipCallId> newCallId )
-
virtual Sptr<SipCallId> getCallWaitingId() const
-
virtual void removeCallWaitingId( const SipCallId& newCallId )
-
virtual Sptr<DigitCollector> getDigitCollector()
-
virtual HardwareStatusType getHardwareStatus()
-
virtual bool isMyHardware(const SipCallId& callid)
-
virtual bool isOnCallWaiting(const SipCallId& callid)
-
inline Sptr< Fifo < Sptr<SipProxyEvent> > > getQ()
-
inline int getFD()
-
void setUseRsvp( bool flag )
Public Members
-
Creates a hardware object to control a multi port gateway
Protected Fields
-
bool useRsvp
-
int myFD
-
Sptr< Fifo < Sptr< SipProxyEvent > > > myQ
-
bool hookStateOffhook
-
Sptr<SipCallId> callId
-
Sptr<CallWaitingIdList> callWaitingIdList
-
EntryState myEntryState
-
Data myTextEntry
-
Sptr<DigitCollector> digitCollector
Protected Methods
-
int provideSignal( DeviceSignalType signal )
-
void processSessionMsg( Sptr < SipProxyEvent > event )
-
void reportEvent( Sptr < Fifo < Sptr< SipProxyEvent > > > outputQ, DeviceEventType eventType )
Documentation
Initializes a QuickNet PhoneCARD and handles hardware control
PhoneCardDevice( const char* deviceName, Sptr < Fifo < Sptr < SipProxyEvent > > > inputQ, Sptr < Fifo < Sptr < SipProxyEvent > > > outputQ )
- Creates a hardware object to control a single port gateway.
- Parameters:
- deviceName - name of PhoneCARD linux system device
inputQ - input queue to the hardware
outputQ - output queue to the hardware
~PhoneCardDevice()
- Destructor
void* hardwareMain(void* parms)
- Starts the main processing loop of the hardware
- Parameters:
- parms -
int addToFdSet(fd_set* fd)
- Add device's socket to the fd (File Descriptor)
- Parameters:
- fd - File Descriptor
- Returns:
- 0 if successful, error code otherwise
int process(fd_set* fd)
- Process all pending hardware events
- Parameters:
- fd - File Descriptor
- Returns:
- 0 if successful, error code otherwise
int audioStart(const HardwareAudioRequest& request)
- Start audio channel on device
- Parameters:
- request -
- Returns:
- 0 if successful, errorcode otherwise
int audioStop()
- Stops audio channel on device
- Returns:
- 0 if successful, error code otherwise
int audioSuspend()
- Suspend audio channel on device
- Returns:
- 0 if successful, error code otherwise
int audioResume(const HardwareAudioRequest& request)
- Resume audio channel on device
- Parameters:
- request -
- Returns:
- 0 if successful, error code otherwise
virtual void processRTP()
- process RTP audio packets
virtual int getRtpPort()
- Instantiates a rtp session and reserves a rtp port
- Returns:
- reserved RTP port
virtual void releaseRtpPort()
- Release the port and deallocate the rtp session
int getRingbackTone(char* , int size)
- ???
void onhookOrFlash()
- Used to determine when an onhook event becomes a flash event
- See Also:
- deviceEventFlash
void startSendRingback()
void stopSendRingback()
void provideDialToneStart()
void provideDialToneStop()
void provideRingStart()
void provideRingStop()
void provideLocalRingbackStart()
void provideLocalRingbackStop()
void provideBusyToneStart()
void provideBusyToneStop()
void provideFastBusyToneStart()
void provideFastBusyToneStop()
void provideCallInfo(string, string, string)
- Currently used only in VmcpDevice
void provideDtmf(DeviceSignalType)
- Prints dtmf digit or symbol to stdout
void killTone()
- Sends ioctl to hardware to stop dialtone
void provideCallWaitingBeepStart()
void provideCallWaitingBeepStop()
void provideTone( PhoneCardTone tone )
- Provide simulated tones by playing corresponding audio file
Sptr< Fifo < Sptr < SipProxyEvent > > > sessionQ
- Output queue to notify endpoint of occurence of hardware events
bool audioActive
- true if RTP audio packets are being processed
bool audioHalfActive
- true if only sending RTP audio packets
bool playDialTone
- Used to turn off dialtone after pressing a digit
RtpSession* audioStack
- RTP session variables
int ringbackFd
- variables for remote ringback tone
VMutex deviceMutex
- This is used to lock the RTP thread and the hardware thread so that
they don't access the hardware device simultaneously
int stdinFD
- needed for proper terminal control
- This class has no child classes.
- Author:
- zolli
- See Also:
- QuickNetDevice
NullHwDevice
ResGwDevice
Alphabetic index HTML hierarchy of classes or Java