|
Yate
|
An abstract communication channel. More...
#include <yatephone.h>
Static Public Member Functions | |
| static Mutex & | paramMutex () |
| static unsigned int | allocId () |
Static Public Member Functions inherited from CallEndpoint | |
| static Mutex & | commonMutex () |
| static const String & | audioType () |
Static Public Member Functions inherited from RefObject | |
| static bool | alive (const RefObject *obj) |
| static bool | efficientIncDec () |
Static Public Member Functions inherited from GenObject | |
| static void * | getObject (const String &name, const GenObject *obj) |
| static bool | getObjCounting () |
| static void | setObjCounting (bool enable) |
| static NamedCounter * | getObjCounter (const String &name, bool create=true) |
| static ObjList & | getObjCounters () |
Protected Attributes | |
| String | m_status |
| String | m_address |
| String | m_targetid |
| String | m_billid |
| bool | m_answered |
Protected Attributes inherited from CallEndpoint | |
| ObjList | m_data |
| Mutex * | m_mutex |
Friends | |
| class | Driver |
| class | Router |
An abstract communication channel.
A class that holds common channel related features (a.k.a. call leg)
Alternate constructor provided for convenience
Get the current link address of the channel
Allocate an unique (per engine run) call ID
Get the billing identifier.
Notification on success of incoming call
| msg | Notification call.execute message just after being dispatched |
Reimplemented in ClientChannel.
Common processing after connecting the outgoing call, should be called from Driver's msgExecute()
| msg | Notification call.execute message while being dispatched |
Notification on progress of prerouting incoming call
| msg | Notification call.preroute message just after being dispatched |
| handled | True if a handler claimed having handled prerouting |
|
virtual |
Notification on failure of incoming call
| error | Standard error keyword |
| reason | Textual failure reason |
| msg | Pointer to message causing the rejection, if any |
Reimplemented in ClientChannel.
Notification on progress of routing incoming call
| msg | Notification call.route message just after being dispatched |
Reimplemented in ClientChannel.
Timer check method, by default handles channel timeouts
| msg | Timer message |
| tmr | Current time against which timers are compared |
|
protected |
Perform destruction time cleanup. You can call this method earlier if destruction is to be postponed.
Put channel variables into a message
| msg | Message to fill in |
| minimal | True to fill in only a minimum of parameters |
Connect notification method.
| reason | Text that describes connect reason. |
Reimplemented from CallEndpoint.
Reimplemented in ClientChannel.
Copy channel parameters
| list | Destination list |
References NamedList::copyParams(), and Channel::paramMutex().
Get the direction of the channel as string
Disconnect notification method.
| final | True if this disconnect was called from the destructor. |
| reason | Text that describes disconnect reason. |
Reimplemented from CallEndpoint.
Reimplemented in ClientChannel.
Notification for dispatched messages
| msg | Message that was dispatched |
| handled | Result of handling the message |
Implements MessageNotifier.
|
inline |
Get the driver of this channel
|
protected |
Remove the channel from the parent driver list
Add sequence number to chan.dtmf and enqueue it, delete if duplicate
| msg | chan.dtmf message to sequence and enqueue |
Attempt to install an override data source to send DTMF inband. Needs a tone generator module capable to override with "tone/dtmfstr/xyz"
| tone | Pointer to the tone sequence to send |
Add sequence number to chan.dtmf message, check for duplicates
| msg | chan.dtmf message to apply sequence number |
Notification after chan.disconnected handling
| msg | The chan.disconnected message |
| handled | True if the message was handled |
Enable or disable debugging according to driver's filter rules
| item | Value of the item to match |
Create a properly populated chan.disconnect message
| reason | Channel disconnect reason if available |
Get a pointer to a derived class given that class name
| name | Name of the class we are asking for |
Reimplemented from CallEndpoint.
Retrieve Channel status This method is not thread safe
Referenced by Channel::putStatus().
Get the current status of the channel This method is thread safe
| buf | Destination buffer |
| append | True to append to destination buffer, false to set (replace contents) |
| void initChan | ( | ) |
Add the channel to the parent driver list This method must be called exactly once after the object is fully constructed
|
inline |
Check if the call was answered or not
|
inline |
Get the direction of the channel
|
inline |
Get the direction of the channel
|
inline |
Get the time this channel will time out on outgoing calls
|
inline |
Set the time this channel will time out on outgoing calls
| tout | New timeout time or zero to disable |
|
inline |
Get the time this channel will time out while waiting for some progress on outgoing calls
|
inline |
Set the time this channel will time out while waiting for some progress on outgoing calls
| tout | New timeout time or zero to disable |
Create a filled notification message
| name | Name of the message to create |
| minimal | Set to true to fill in only a minimum of parameters |
| data | Set the channel as message data |
Referenced by Channel::message().
|
inline |
Create a filled notification message, copy some parameters from another message
| name | Name of the message to create |
| original | Parameters to copy from |
| params | Comma separated list of parameters to copy, if NULL will be taken from the "copyparams" parameter of original |
| minimal | Set to true to fill in only a minimum of parameters |
| data | Set the channel as message data |
References Channel::message().
| Message * message | ( | const char * | name, |
| const NamedList * | original, | ||
| const char * | params = 0, |
||
| bool | minimal = false, |
||
| bool | data = false |
||
| ) |
Create a filled notification message, copy some parameters from another message
| name | Name of the message to create |
| original | Parameters to copy from, can be NULL |
| params | Comma separated list of parameters to copy, if NULL will be taken from the "copyparams" parameter of original |
| minimal | Set to true to fill in only a minimum of parameters |
| data | Set the channel as message data |
Notification on remote answered. Note that the answered flag will be set
| msg | Notification message |
Reimplemented in ClientChannel.
Control message handler that is invoked only for messages to this channel
| msg | Control message |
Notification on current call drop request
| msg | Notification message |
| reason | Pointer to drop reason text or NULL if none provided |
Reimplemented in ClientChannel.
Notification on message masquerade as channel request
| msg | Message already modified to masquerade as this channel |
Notification on remote call making some progress, not enabled by default
| msg | Notification message |
Reimplemented in ClientChannel.
Notification on remote ringing
| msg | Notification message |
Reimplemented in ClientChannel.
Status message handler that is invoked only for messages to this channel
| msg | Status message |
Notification on remote text messaging (sms)
| msg | Notification message |
| text | Pointer to the received text |
Notification on remote tone(s)
| msg | Notification message |
| tone | Pointer to the received tone(s) |
Notification on native transfer request
| msg | Notification message |
Notification on call parameters update request
| msg | Notification message |
|
inlineprotected |
Get the disconnect parameters list
Get the disconnect parameters list
Get the big mutex that serializes access to all disconnect parameter lists
Referenced by Channel::copyChanParams(), and Channel::setChanParams().
Get the current status of the channel. Add it in list parameters This method is thread safe
| list | Destination list |
| param | Parameter name |
| append | True to append parameter to list, false to replace |
References NamedList::addParam(), Channel::getStatus(), and NamedList::setParam().
Set channel parameters
| list | List of parameters |
| in | True if set for incoming channel (called for (pre)routed/rejected,accepted) |
References NamedList::copySubParams(), and Channel::paramMutex().
Set the local debugging level
| msg | Debug setting message |
Set disconnect parameters
| params | Pointer to disconnect cause parameters, NULL to reset them |
Reimplemented from CallEndpoint.
Set a new ID for this channel
| newId | New ID to set to this channel |
Reimplemented from CallEndpoint.
Set the time this channel will time out on outgoing calls
| msg | Reference of message possibly holding "maxcall" parameter |
| defTout | Default timeout to apply, negative to not alter |
References Channel::setMaxcall().
Referenced by Channel::setMaxcall().
Set the time this channel will time out on outgoing calls
| msg | Pointer to message possibly holding "maxcall" parameter |
| defTout | Default timeout to apply, negative to not alter |
Set the time this channel will time out while waiting for some progress on outgoing calls
| msg | Reference of message possibly holding "maxpdd" parameter |
Set the current direction of the channel
| outgoing | True if this is an outgoing call channel |
Start a routing thread for this channel, dereference dynamic channels
| msg | Pointer to message to route, typically a "call.route", will be destroyed after routing fails or completes |
Set the current status of the channel. Note that a value of "answered" will set the answered flag
| newstat | The new status as String |
Build the parameter reporting part of the status answer
| str | String variable to fill up |
Get the connected channel identifier.
|
inline |
Get the time this channel will time out
|
inline |
Set the time this channel will time out
| tout | New timeout time or zero to disable |
Attempt to install a data sniffer to detect inband tones Needs a tone detector module capable of attaching sniffer consumers.
| sniffer | Name of the sniffer to install, default will detect all tones |
This method is overriden to safely remove the channel from the parent driver list before actually destroying the channel.
Reimplemented from RefObject.