#include <ivr.h>
Inheritance diagram for OpalIVRConnection:
Public Member Functions | |
virtual PBoolean | StartVXML () |
virtual void | OnStopMediaPatch (OpalMediaPatch &patch) |
PTextToSpeech * | SetTextToSpeech (PTextToSpeech *_tts, PBoolean autoDelete=PFalse) |
PTextToSpeech * | SetTextToSpeech (const PString &ttsName) |
PTextToSpeech * | GetTextToSpeech () |
Construction | |
OpalIVRConnection (OpalCall &call, OpalIVREndPoint &endpoint, void *userData, const PString &vxml, unsigned int options, OpalConnection::StringOptions *stringOptions=NULL) | |
~OpalIVRConnection () | |
Overrides from OpalConnection | |
virtual bool | IsNetworkConnection () const |
virtual PString | GetLocalPartyURL () const |
void | OnEstablished () |
virtual OpalMediaFormatList | GetMediaFormats () const |
virtual OpalMediaStream * | CreateMediaStream (const OpalMediaFormat &mediaFormat, unsigned sessionID, PBoolean isSource) |
virtual PBoolean | SendUserInputString (const PString &value) |
Protected Attributes | |
OpalIVREndPoint & | endpoint |
PString | vxmlToLoad |
OpalMediaFormatList | vxmlMediaFormats |
OpalVXMLSession | vxmlSession |
OpalIVRConnection::OpalIVRConnection | ( | OpalCall & | call, | |
OpalIVREndPoint & | endpoint, | |||
void * | userData, | |||
const PString & | vxml, | |||
unsigned int | options, | |||
OpalConnection::StringOptions * | stringOptions = NULL | |||
) |
Create a new endpoint.
call | Owner calll for connection |
endpoint | Owner endpoint for connection |
userData | Arbitrary data to pass to connection |
vxml | vxml to execute |
OpalIVRConnection::~OpalIVRConnection | ( | ) |
Destroy endpoint.
virtual OpalMediaStream* OpalIVRConnection::CreateMediaStream | ( | const OpalMediaFormat & | mediaFormat, | |
unsigned | sessionID, | |||
PBoolean | isSource | |||
) | [virtual] |
Open a new media stream. This will create a media stream of an appropriate subclass as required by the underlying connection protocol. For instance H.323 would create an OpalRTPStream.
The sessionID parameter may not be needed by a particular media stream and may be ignored. In the case of an OpalRTPStream it us used.
Note that media streams may be created internally to the underlying protocol. This function is not the only way a stream can come into existance.
The default behaviour is pure.
mediaFormat | Media format for stream |
sessionID | Session number for stream |
isSource | Is a source stream |
Reimplemented from OpalLocalConnection.
virtual PString OpalIVRConnection::GetLocalPartyURL | ( | ) | const [virtual] |
Get the local name/alias.
Reimplemented from OpalConnection.
virtual OpalMediaFormatList OpalIVRConnection::GetMediaFormats | ( | ) | const [virtual] |
Get the data formats this connection is capable of operating. This provides a list of media data format names that an OpalMediaStream may be created in within this connection.
The default behaviour returns the formats the PSoundChannel can do, typically only PCM-16.
Reimplemented from OpalConnection.
PTextToSpeech* OpalIVRConnection::GetTextToSpeech | ( | ) | [inline] |
virtual bool OpalIVRConnection::IsNetworkConnection | ( | ) | const [inline, virtual] |
Get indication of connection being to a "network". This indicates the if the connection may be regarded as a "network" connection. The distinction is about if there is a concept of a "remote" party being connected to and is best described by example: sip, h323, iax and pstn are all "network" connections as they connect to something "remote". While pc, pots and ivr are not as the entity being connected to is intrinsically local.
Reimplemented from OpalLocalConnection.
void OpalIVRConnection::OnEstablished | ( | ) | [virtual] |
A call back function whenever a connection is "established". This indicates that a connection to an endpoint was established. This usually occurs after OnConnected() and indicates that the connection is both connected and has media flowing.
Reimplemented from OpalConnection.
virtual void OpalIVRConnection::OnStopMediaPatch | ( | OpalMediaPatch & | patch | ) | [virtual] |
Call back when media stream patch thread stops.
Reimplemented from OpalConnection.
virtual PBoolean OpalIVRConnection::SendUserInputString | ( | const PString & | value | ) | [virtual] |
Send a user input indication to the remote endpoint. This sends an arbitrary string as a user indication. If DTMF tones in particular are required to be sent then the SendIndicationTone() function should be used.
The default behaviour plays the DTMF tones on the line.
value | String value of indication |
Reimplemented from OpalLocalConnection.
PTextToSpeech* OpalIVRConnection::SetTextToSpeech | ( | const PString & | ttsName | ) | [inline] |
PTextToSpeech* OpalIVRConnection::SetTextToSpeech | ( | PTextToSpeech * | _tts, | |
PBoolean | autoDelete = PFalse | |||
) | [inline] |
virtual PBoolean OpalIVRConnection::StartVXML | ( | ) | [virtual] |
Called when a call needs to start the outgoing VXML. This can be used to do different behaviour
OpalIVREndPoint& OpalIVRConnection::endpoint [protected] |
Reimplemented from OpalLocalConnection.
OpalVXMLSession OpalIVRConnection::vxmlSession [protected] |
PString OpalIVRConnection::vxmlToLoad [protected] |