#include <astinterface.h>
Public Member Functions | |
~AsteriskCall () | |
Destruct an asterisk call. | |
std::string | GetUniqueId () |
gets uniqueid attribute | |
void | SetAddress (std::string address) |
std::string | GetAddress () |
void | SetCallerId (std::string callerid) |
set AsteriskCall callerId | |
std::string | GetCallerId () |
sets callerId | |
bool | HasCallerId () |
void | SetCallerIdName (std::string calleridname) |
set AsteriskCall callerIdName | |
std::string | GetCallerIdName () |
sets callerIdName | |
std::string | GetConnectedLineNum () |
sets connectedLineId | |
void | SetConnectedLineNum (std::string connectedLineNum) |
set AsteriskCall connectedLineId | |
std::string | GetConnectedLineName () |
sets connectedLineId | |
void | SetConnectedLineName (std::string connectedLineName) |
set AsteriskCall connectedLineId | |
bool | HasCallerIdName () |
std::string | GetChannel () |
gets associated asterisk channel name (ie: local/201) | |
void | SetChannel (std::string newChannel) |
sets associated asterisk channel name (ie: local/201) | |
activa_call_state | GetState () |
gets state | |
std::string | GetStateString () |
gets state string | |
void | SetState (std::string newState) |
sets state | |
void | Link (AsteriskCall *pDestCall) |
links this call to a destination call | |
void | Unlink () |
unlinks this call from a destination call | |
void | LinkCSTACall (std::string cstaUniqueId) |
links two different CSTA Calls | |
bool | HasCSTALink () |
return true if exist a CSTA link | |
void | SetUserData (std::string userData) |
set userData | |
std::string | GetUserData () |
Get userData. | |
bool | HasSourceUniqueId () |
std::string | GetSourceUniqueId () |
gets reference to source call | |
std::string | GetLastRedirectionDevice () |
get device of the last redirection | |
void | SetLastRedirectionDevice (std::string redirecting) |
set device of the last redirection | |
bool | IsLocalChannel () |
Is local channel? | |
bool | IsLocalMasterChannel () |
Is local master leg? of the form local/xxx@yyy,1. | |
bool | IsLocalOutboundChannel () |
Is local outbound leg? of the form local/xxx@yyy,2. | |
void | SetCallId (DWORD newCallId) |
set a new callid to call | |
DWORD | GetCallId () |
return callId | |
void | Dump (ASTLogger &log) |
std::string | DumpToString () |
std::string | GetTypeChannel () |
bool | IsPredictiveCall () |
return true if call is predictive | |
void | SetPredictiveCall () |
set the call as predictive | |
call_cause | GetCause () |
return the cause of call | |
void | SetCause (call_cause cause) |
set any cause to call | |
Static Public Member Functions | |
static AsteriskCall * | Create (std::string uniqueId, std::string callerId, DWORD callId, std::string userData) |
factory method | |
static std::string | GetAddressFromChannel (std::string channel) |
Gets address from channel specification. | |
static std::string | GetDialableNumberFromChannel (std::string channel) |
Gets dialable number from Channel. | |
static std::string | getMasterChannelFromOutboundChannel (std::string channel) |
getMasterChannelFromOutboundChannel | |
static std::string | getOutboundChannelFromMasterChannel (std::string channel) |
getOutboundChannelFromMasterChannel | |
static std::string | GetCIDNamePrefix (std::string calleridname) |
parses cidname and if it has the form xxx:yyyyyy it returns xxx | |
static bool | IsUnknown (std::string device) |
true if device is void or equal to <unknown> |
AsteriskCall * AsteriskCall::Create | ( | std::string | _uniqueId, | |
std::string | _callerId, | |||
DWORD | _callId, | |||
std::string | _userData | |||
) | [static] |
factory method
create new AsteriskCall with uniqueId and callerId for this connection
_uniqueId | identifier of AsteriskCall | |
_callerId | ||
_callId | identifier of call | |
_userData |
void AsteriskCall::Dump | ( | ASTLogger & | log | ) |
Dump AsteriskCall
log |
std::string AsteriskCall::DumpToString | ( | ) |
Converts an AsteriskCall to String
std::string AsteriskCall::GetAddress | ( | ) | [inline] |
gets associated address. We differentiate between address and callerid since callerid may change. Usually read 'address' parsing the channel description.
std::string AsteriskCall::GetAddressFromChannel | ( | std::string | channel | ) | [static] |
Gets address from channel specification.
Gets extension from channel specification
channel | A pure address can also be passed. |
std::string AsteriskCall::GetCIDNamePrefix | ( | std::string | calleridname | ) | [static] |
parses cidname and if it has the form xxx:yyyyyy it returns xxx
Return CallerIdName prefix CIDName prefix has to be separated by ':' i.e.: 111: => callerIdName prefix is 111
calleridname |
std::string AsteriskCall::GetDialableNumberFromChannel | ( | std::string | channel | ) | [static] |
Gets dialable number from Channel.
Gets extension from channel specification
channel | A pure address can also be passed. |
std::string AsteriskCall::getMasterChannelFromOutboundChannel | ( | std::string | channel | ) | [static] |
getMasterChannelFromOutboundChannel
Return getMasterChannelFromOutboundChannel ( ast14 ->",2 =>,1" ; ast16->";2 =>;1" ) i.e.: Local/320@from-internal-6f9b,2 -> Local/320@from-internal-6f9b,1
std::string AsteriskCall::getOutboundChannelFromMasterChannel | ( | std::string | channel | ) | [static] |
getOutboundChannelFromMasterChannel
Return getOutboundChannelFromMasterChannel ( ast14 ->",1 =>,2" ; ast16->";1 =>;2" ) i.e.: Local/320@from-internal-6f9b,1 -> Local/320@from-internal-6f9b,2
std::string AsteriskCall::GetTypeChannel | ( | ) |
Returns type of channel. Recognise types:
bool AsteriskCall::HasCallerId | ( | ) | [inline] |
That function is currently not used return true if callerid attribute is different than ""
bool AsteriskCall::HasCallerIdName | ( | ) | [inline] |
That function is currently not used. return true if calleridname attribute is different than ""
bool AsteriskCall::HasCSTALink | ( | ) |
return true if exist a CSTA link
This link is only used when exist two differents CSTA Calls that are the same audio link
bool AsteriskCall::HasSourceUniqueId | ( | ) | [inline] |
bool AsteriskCall::IsLocalChannel | ( | ) |
Is local channel?
Return true if channel is Local i.e.: Local/320@from-internal-6f9
bool AsteriskCall::IsLocalMasterChannel | ( | ) |
Is local master leg? of the form local/xxx@yyy,1.
Return true if channel is localMaster i.e.: Local/320@from-internal-6f9b,1
bool AsteriskCall::IsLocalOutboundChannel | ( | ) |
Is local outbound leg? of the form local/xxx@yyy,2.
Return true if channel is localOutbound i.e.: Local/320@from-internal-6f9b,2
bool AsteriskCall::IsUnknown | ( | std::string | device | ) | [static] |
true if device is void or equal to <unknown>
Return true if device is <unknown> or ""
device |
void AsteriskCall::Link | ( | AsteriskCall * | pSourceCall | ) |
links this call to a destination call
links to destCall
pSourceCall | FIX: AsteriskCall::link makes an inverted link |
void AsteriskCall::SetAddress | ( | std::string | address | ) | [inline] |
Sets associated address. We differentiate between address and callerid since callerid may change. Usually read 'address' parsing the channel description.
void AsteriskCall::SetChannel | ( | std::string | newChannel | ) |
sets associated asterisk channel name (ie: local/201)
Set a Channel and address in AsteriskCall
newChannel |