| Yate
    | 
An abstract communication channel. More...
#include <yatephone.h>
 
  
 | Public Member Functions | |
| virtual | ~Channel () | 
| virtual void * | getObject (const String &name) const | 
| virtual void | complete (Message &msg, bool minimal=false) const | 
| Message * | message (const char *name, bool minimal=false, bool data=false) | 
| Message * | message (const char *name, const NamedList *original, const char *params=0, bool minimal=false, bool data=false) | 
| Message * | message (const char *name, const NamedList &original, const char *params=0, bool minimal=false, bool data=false) | 
| virtual bool | msgProgress (Message &msg) | 
| virtual bool | msgRinging (Message &msg) | 
| virtual bool | msgAnswered (Message &msg) | 
| virtual bool | msgTone (Message &msg, const char *tone) | 
| virtual bool | msgText (Message &msg, const char *text) | 
| virtual bool | msgDrop (Message &msg, const char *reason) | 
| virtual bool | msgTransfer (Message &msg) | 
| virtual bool | msgUpdate (Message &msg) | 
| virtual bool | msgMasquerade (Message &msg) | 
| virtual void | msgStatus (Message &msg) | 
| virtual bool | msgControl (Message &msg) | 
| virtual void | checkTimers (Message &msg, const Time &tmr) | 
| virtual bool | callPrerouted (Message &msg, bool handled) | 
| virtual bool | callRouted (Message &msg) | 
| virtual void | callAccept (Message &msg) | 
| virtual void | callRejected (const char *error, const char *reason=0, const Message *msg=0) | 
| virtual void | callConnect (Message &msg) | 
| virtual bool | setDebug (Message &msg) | 
| const String & | status () const | 
| const String & | address () const | 
| bool | isOutgoing () const | 
| bool | isIncoming () const | 
| bool | isAnswered () const | 
| const char * | direction () const | 
| Driver * | driver () const | 
| u_int64_t | timeout () const | 
| void | timeout (u_int64_t tout) | 
| u_int64_t | maxcall () const | 
| void | maxcall (u_int64_t tout) | 
| void | setMaxcall (const Message &msg, int defTout=-1) | 
| void | setMaxcall (const Message *msg, int defTout=-1) | 
| u_int64_t | maxPDD () const | 
| void | maxPDD (u_int64_t tout) | 
| void | setMaxPDD (const Message &msg) | 
| const String & | targetid () const | 
| const String & | billid () const | 
| void | initChan () | 
| bool | startRouter (Message *msg) | 
| void | filterDebug (const String &item) | 
| const NamedList & | parameters () const | 
| void | setChanParams (const NamedList &list, bool in=false) | 
| void | copyChanParams (NamedList &list) const | 
| virtual void | dispatched (const Message &msg, bool handled) | 
|  Public Member Functions inherited from CallEndpoint | |
| virtual void | destroyed () | 
| virtual const String & | toString () const | 
| const String & | id () const | 
| CallEndpoint * | getPeer () const | 
| bool | getPeerId (String &id) const | 
| String | getPeerId () const | 
| bool | getLastPeerId (String &id) const | 
| void | setLastPeerId () | 
| Mutex * | mutex () const | 
| bool | connect (CallEndpoint *peer, const char *reason=0, bool notify=true) | 
| bool | disconnect (const char *reason=0, bool notify=true, const NamedList *params=0) | 
| bool | disconnect (const char *reason, const NamedList ¶ms) | 
| DataEndpoint * | getEndpoint (const String &type=CallEndpoint::audioType()) const | 
| DataEndpoint * | setEndpoint (const String &type=CallEndpoint::audioType()) | 
| void | clearEndpoint (const String &type=String::empty()) | 
| void | setSource (DataSource *source=0, const String &type=CallEndpoint::audioType()) | 
| DataSource * | getSource (const String &type=CallEndpoint::audioType()) const | 
| void | setConsumer (DataConsumer *consumer=0, const String &type=CallEndpoint::audioType()) | 
| DataConsumer * | getConsumer (const String &type=CallEndpoint::audioType()) const | 
| bool | clearData (DataNode *node, const String &type=CallEndpoint::audioType()) | 
|  Public Member Functions inherited from RefObject | |
| RefObject () | |
| virtual | ~RefObject () | 
| virtual bool | alive () const | 
| bool | ref () | 
| bool | deref () | 
| int | refcount () const | 
| virtual void | destruct () | 
|  Public Member Functions inherited from GenObject | |
| GenObject () | |
| virtual | ~GenObject () | 
| NamedCounter * | getObjCounter () const | 
| NamedCounter * | setObjCounter (NamedCounter *counter) | 
|  Public Member Functions inherited from DebugEnabler | |
| DebugEnabler (int level=TelEngine::debugLevel(), bool enabled=true) | |
| int | debugLevel () const | 
| int | debugLevel (int level) | 
| bool | debugEnabled () const | 
| void | debugEnabled (bool enable) | 
| const char * | debugName () const | 
| bool | debugAt (int level) const | 
| bool | debugChained () const | 
| void | debugChain (const DebugEnabler *chain=0) | 
| void | debugCopy (const DebugEnabler *original=0) | 
|  Public Member Functions inherited from MessageNotifier | |
| virtual | ~MessageNotifier () | 
| 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 Member Functions | |
| Channel (Driver *driver, const char *id=0, bool outgoing=false) | |
| Channel (Driver &driver, const char *id=0, bool outgoing=false) | |
| void | cleanup () | 
| void | dropChan () | 
| virtual void | zeroRefs () | 
| virtual void | connected (const char *reason) | 
| virtual void | disconnected (bool final, const char *reason) | 
| virtual void | setDisconnect (const NamedList *params) | 
| virtual void | endDisconnect (const Message &msg, bool handled) | 
| virtual void | setId (const char *newId) | 
| virtual Message * | getDisconnect (const char *reason) | 
| void | status (const char *newstat) | 
| virtual void | statusParams (String &str) | 
| void | setOutgoing (bool outgoing=true) | 
| bool | dtmfSequence (Message &msg) | 
| bool | dtmfEnqueue (Message *msg) | 
| bool | dtmfInband (const char *tone) | 
| bool | toneDetect (const char *sniffer=0) | 
| NamedList & | parameters () | 
|  Protected Member Functions inherited from CallEndpoint | |
| CallEndpoint (const char *id=0) | |
| void | setPeer (CallEndpoint *peer, const char *reason=0, bool notify=true, const NamedList *params=0) | 
| void | setEndpoint (DataEndpoint *endPoint) | 
|  Protected Member Functions inherited from RefObject | |
| bool | resurrect () | 
|  Protected Member Functions inherited from DebugEnabler | |
| void | debugName (const char *name) | 
| 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)
| 
 | virtual | 
Destructor
Alternate constructor provided for convenience
| 
 | inline | 
Get the current link address of the channel
| 
 | static | 
Allocate an unique (per engine run) call ID
| 
 | inline | 
Get the billing identifier.
| 
 | virtual | 
Notification on success of incoming call
| msg | Notification call.execute message just after being dispatched | 
Reimplemented in ClientChannel.
| 
 | virtual | 
Common processing after connecting the outgoing call, should be called from Driver's msgExecute()
| msg | Notification call.execute message while being dispatched | 
| 
 | virtual | 
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.
| 
 | virtual | 
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.
| 
 | virtual | 
Put channel variables into a message
| msg | Message to fill in | 
| minimal | True to fill in only a minimum of parameters | 
| 
 | protectedvirtual | 
Connect notification method.
| reason | Text that describes connect reason. | 
Reimplemented from CallEndpoint.
Reimplemented in ClientChannel.
| 
 | inline | 
Copy channel parameters
| list | Destination list | 
References NamedList::copyParams(), and Channel::paramMutex().
| const char* direction | ( | ) | const | 
Get the direction of the channel as string
| 
 | protectedvirtual | 
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.
| 
 | virtual | 
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
| 
 | protected | 
Add sequence number to chan.dtmf and enqueue it, delete if duplicate
| msg | chan.dtmf message to sequence and enqueue | 
| 
 | protected | 
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 | 
| 
 | protected | 
Add sequence number to chan.dtmf message, check for duplicates
| msg | chan.dtmf message to apply sequence number | 
| 
 | protectedvirtual | 
Notification after chan.disconnected handling
| msg | The chan.disconnected message | 
| handled | True if the message was handled | 
| void filterDebug | ( | const String & | item | ) | 
Enable or disable debugging according to driver's filter rules
| item | Value of the item to match | 
| 
 | protectedvirtual | 
Create a properly populated chan.disconnect message
| reason | Channel disconnect reason if available | 
| 
 | virtual | 
Get a pointer to a derived class given that class name
| name | Name of the class we are asking for | 
Reimplemented from CallEndpoint.
| 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 | 
| Message* message | ( | const char * | name, | 
| bool | minimal = false, | ||
| bool | data = false | ||
| ) | 
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().
| 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 | 
| 
 | 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().
| 
 | virtual | 
Notification on remote answered. Note that the answered flag will be set
| msg | Notification message | 
Reimplemented in ClientChannel.
| 
 | virtual | 
Control message handler that is invoked only for messages to this channel
| msg | Control message | 
| 
 | virtual | 
Notification on current call drop request
| msg | Notification message | 
| reason | Pointer to drop reason text or NULL if none provided | 
Reimplemented in ClientChannel.
| 
 | virtual | 
Notification on message masquerade as channel request
| msg | Message already modified to masquerade as this channel | 
| 
 | virtual | 
Notification on remote call making some progress, not enabled by default
| msg | Notification message | 
Reimplemented in ClientChannel.
| 
 | virtual | 
Notification on remote ringing
| msg | Notification message | 
Reimplemented in ClientChannel.
| 
 | virtual | 
Status message handler that is invoked only for messages to this channel
| msg | Status message | 
| 
 | virtual | 
Notification on remote text messaging (sms)
| msg | Notification message | 
| text | Pointer to the received text | 
| 
 | virtual | 
Notification on remote tone(s)
| msg | Notification message | 
| tone | Pointer to the received tone(s) | 
| 
 | virtual | 
Notification on native transfer request
| msg | Notification message | 
| 
 | virtual | 
Notification on call parameters update request
| msg | Notification message | 
| 
 | inline | 
Get the disconnect parameters list
| 
 | inlineprotected | 
Get the disconnect parameters list
| 
 | static | 
Get the big mutex that serializes access to all disconnect parameter lists
Referenced by Channel::copyChanParams(), and Channel::setChanParams().
| 
 | inline | 
Set channel parameters
| list | List of parameters | 
| in | True if set for incoming channel (called for (pre)routed/rejected,accepted) | 
References NamedList::copySubParams(), Channel::paramMutex(), and TelEngine::YSTRING().
| 
 | virtual | 
Set the local debugging level
| msg | Debug setting message | 
| 
 | protectedvirtual | 
Set disconnect parameters
| params | Pointer to disconnect cause parameters, NULL to reset them | 
Reimplemented from CallEndpoint.
| 
 | protectedvirtual | 
Set a new ID for this channel
| newId | New ID to set to this channel | 
Reimplemented from CallEndpoint.
| 
 | inline | 
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 | 
| void setMaxcall | ( | const Message * | msg, | 
| int | defTout = -1 | ||
| ) | 
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 | 
| void setMaxPDD | ( | const Message & | msg | ) | 
Set the time this channel will time out while waiting for some progress on outgoing calls
| msg | Reference of message possibly holding "maxpdd" parameter | 
| 
 | inlineprotected | 
Set the current direction of the channel
| outgoing | True if this is an outgoing call channel | 
| bool startRouter | ( | Message * | msg | ) | 
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 | 
| 
 | inline | 
Get the current status of the channel
| 
 | protected | 
Set the current status of the channel. Note that a value of "answered" will set the answered flag
| newstat | The new status as String | 
| 
 | protectedvirtual | 
Build the parameter reporting part of the status answer
| str | String variable to fill up | 
| 
 | inline | 
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 | 
| 
 | protected | 
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 | 
| 
 | protectedvirtual | 
This method is overriden to safely remove the channel from the parent driver list before actually destroying the channel.
Reimplemented from RefObject.
 1.8.8
 1.8.8