#include <astcstaprovider.h>

Public Member Functions | |
| AC_RESULT | Connect (std::string sHost, int nPort, std::string user, std::string pwd, AUTH_TYPE eAuthType=at_md5) |
| Connect to Asterisk. | |
| bool | Disconnect () |
| Disconnect from Asterisk. | |
| MonitorXref | OpenMonitor (std::string deviceId) |
| bool | CloseMonitor (MonitorXref xref) |
| Close a previously opened monitor. | |
| AC_RESULT | MakeCall (std::string callingDevice, std::string contextCalling, std::string calledDevice, DWORD &callid, std::string contextCalled, std::string callerIdName, std::string userData, std::string variable, bool bLockReaderAfterResponse=false) |
| Originates a call from callingDevice to calleddevice using 'context'. | |
| AC_RESULT | MakePredictiveCall (std::string callingDevice, std::string contextCalling, std::string calledDevice, std::string contextCalled, DWORD &callid, std::string callerId, std::string userData, DWORD timeout, std::string variable, bool bLockReaderAfterResponse=false) |
| Originate a predictive call from callingDevice to calledDevice using 'context'. | |
| AC_RESULT | ClearCall (DWORD callId) |
| Disconnects a call identified by uniqueid/callid. | |
| AC_RESULT | ClearConnection (DWORD callid, std::string address) |
| Disconnects a Connection identified by callId and device). | |
| AC_RESULT | FastTransfer (DWORD callId, std::string transferringDevice, std::string destination, std::string destinationContext) |
| Redirects a call to an extsnsion. | |
| AC_RESULT | SetDoNotDisturb (std::string deviceId, bool bDND_on, std::string dndContext) |
| Sets Do-not-disturb flag on/off. | |
| AC_RESULT | SetAgentStatus (std::string deviceId, std::string queue, AGENT_STATUS newStatus, std::string agentContext) |
| Set agentState. | |
| AC_RESULT | HoldCall (DWORD callId, std::string holdingDevice, std::string holdContext) |
| AC_RESULT | RetrieveCall (DWORD callId, std::string retreivingDevice, std::string retrieveContext) |
| AC_RESULT | StartRecording (DWORD callid, std::string address, std::string RecordingFileName, std::string format, std::string mix) |
| Start Recording. | |
| AC_RESULT | StopRecording (DWORD callid, std::string address) |
| Stop Recording. | |
| AC_RESULT | PauseRecording (DWORD callid, std::string address) |
| Pause Recording. | |
| AC_RESULT | UnpauseRecording (DWORD callid, std::string address) |
| Unpause Recording. | |
| AC_RESULT | ChangeRecordingFileName (DWORD callid, std::string address, std::string NewRecordingFileName) |
| Change Recording File Name. | |
| DWORD | GetNewCallId () |
| bool | DropCallId (DWORD idCall) |
| bool | GetMonitorSet (DWORD callId, Set_xref &setXref) |
| returns the monitor set linked to the given callid | |
| void | UnLockReader () |
| void | OnNewStateEvent (ManagerEvent ev) |
| OnNewStateEvent handler. | |
| void | OnNewCallerIdEvent (ManagerEvent ev) |
| OnNewCallerIdEvent handler. | |
| void | OnNewExten (ManagerEvent ev) |
| OnNewExten handler. | |
| void | OnChannelEvent (ManagerEvent ev) |
| OnChannelEvent handler. | |
| void | OnHangup (ManagerEvent ev) |
| OnHangup handler. | |
| void | OnNewChannelEvent (ManagerEvent ev) |
| OnNewChannelEvent handler. | |
| void | OnDialEvent (ManagerEvent ev) |
| OnDialEvent handler. | |
| void | OnRenameEvent (ManagerEvent ev) |
| OnRenameEvent handler. | |
| void | OnLinkEvent (ManagerEvent ev) |
| OnLinkEvent handler. | |
| void | OnUnlinkEvent (ManagerEvent ev) |
| OnUnLinkEvent handler. | |
| void | OnJoinEvent (ManagerEvent ev) |
| OnJoinEvent handler. | |
| void | OnLeaveEvent (ManagerEvent ev) |
| OnLeaveEvent handler. | |
| void | OnLinkDown () |
| OnLinkDown handler. | |
| void | OnUnparkedCallEvent (ManagerEvent ev) |
| OnUnparked handler. | |
| void | OnOriginateFailureEvent (ManagerEvent ev) |
| OnOriginateFailure handler. | |
| void | OnQueueCallerAbandonEvent (ManagerEvent ev) |
| OnQueueCallerAbandon handler Asterisk 1.4. | |
| void | OnHoldEvent (ManagerEvent ev) |
| OnHold event. | |
| void | OnUnholdEvent (ManagerEvent ev) |
| OnUnhold event. | |
Static Public Member Functions | |
| static ASTCstaProvider * | Create (ASTCstaListener *listener, ASTLogListener *logger) |
| factory method | |
Friends | |
| class | ASTTapiProvider |
This is the main class of Activa framework. Provides a csta-like programming interface. To create an instance you can call the Create() factory method Events are reported through a listener class implementing ASTCstaListener interface. A custom logger can be attached via ASTLogListener
| AC_RESULT ASTCstaProvider::ChangeRecordingFileName | ( | DWORD | callid, | |
| std::string | address, | |||
| std::string | NewRecordingFileName | |||
| ) | [virtual] |
Change Recording File Name.
Change recording file name
| callid | identifier of call | |
| address | device | |
| NewRecordingFileName | Recording file name |
Implements ASTCstaProviderInterface.
| AC_RESULT ASTCstaProvider::ClearCall | ( | DWORD | callid | ) | [virtual] |
Disconnects a call identified by uniqueid/callid.
Hang up an established call
| callid | identifier of call |
Implements ASTCstaProviderInterface.
| AC_RESULT ASTCstaProvider::ClearConnection | ( | DWORD | callid, | |
| std::string | address | |||
| ) | [virtual] |
Disconnects a Connection identified by callId and device).
Hang up an established Connection
| callid | identifier of call | |
| address | device |
Implements ASTCstaProviderInterface.
| bool ASTCstaProvider::CloseMonitor | ( | MonitorXref | xref | ) | [virtual] |
Close a previously opened monitor.
Close a monitor with reference xref
| xref | the monitor you want to close |
Implements ASTCstaProviderInterface.
| AC_RESULT ASTCstaProvider::Connect | ( | std::string | sHost, | |
| int | nPort, | |||
| std::string | user, | |||
| std::string | pwd, | |||
| AUTH_TYPE | eAuthType = at_md5 | |||
| ) | [virtual] |
Connect to Asterisk.
Connects to asterisk
| sHost | ip host address of asterisk box | |
| nPort | ip port asterisk manaegr api is listening to. Usually default asterisk configuration port is 5038 | |
| user | user, ie: admin | |
| pwd | password, ie: amp111 | |
| eAuthType | authentification type 0-plaintext 1-md5 |
Implements ASTCstaProviderInterface.
| ASTCstaProvider * ASTCstaProvider::Create | ( | ASTCstaListener * | cstaListener, | |
| ASTLogListener * | logger | |||
| ) | [static] |
factory method
ASTCstaProvider factory method. Creates a ASTCstaProvider and attach a listener.
| cstaListener | csta event listener | |
| logger | logger, can be null |
| bool ASTCstaProvider::Disconnect | ( | ) | [virtual] |
Disconnect from Asterisk.
Disconnect from Asterisk
Implements ASTCstaProviderInterface.
| bool ASTCstaProvider::DropCallId | ( | DWORD | idCall | ) | [inline, virtual] |
Implements ASTCstaProviderInterface.
| AC_RESULT ASTCstaProvider::FastTransfer | ( | DWORD | callId, | |
| std::string | transferringDevice, | |||
| std::string | destination, | |||
| std::string | destinationContext | |||
| ) | [virtual] |
Redirects a call to an extsnsion.
Do a FastTransfer from one device to another.
| callId | identifier of call | |
| transferringDevice | ||
| destination | ||
| destinationContext |
Implements ASTCstaProviderInterface.
| DWORD ASTCstaProvider::GetNewCallId | ( | ) | [inline, virtual] |
Implements ASTCstaProviderInterface.
| AC_RESULT ASTCstaProvider::HoldCall | ( | DWORD | callId, | |
| std::string | holdingDevice, | |||
| std::string | holdContext | |||
| ) | [virtual] |
Put a call in HOLD state
| callId | identifier of call | |
| holdingDevice | ||
| holdContext |
Implements ASTCstaProviderInterface.
| AC_RESULT ASTCstaProvider::MakeCall | ( | std::string | callingDevice, | |
| std::string | contextCalling, | |||
| std::string | calledDevice, | |||
| DWORD & | callid, | |||
| std::string | contextCalled, | |||
| std::string | callerIdName, | |||
| std::string | userData, | |||
| std::string | variable, | |||
| bool | bLockReaderAfterResponse = false | |||
| ) | [virtual] |
Originates a call from callingDevice to calleddevice using 'context'.
CallerIdName may set caller_id_name info
| callingDevice | Device who makes the call | |
| calledDevice | Device who is called | |
| callid | if callId is 0, it generates a new one | |
| context | ||
| callerIdName | ||
| userData |
Implements ASTCstaProviderInterface.
| AC_RESULT ASTCstaProvider::MakePredictiveCall | ( | std::string | callingDevice, | |
| std::string | contextCalling, | |||
| std::string | calledDevice, | |||
| std::string | contextCalled, | |||
| DWORD & | callid, | |||
| std::string | callerId, | |||
| std::string | userData, | |||
| DWORD | timeout, | |||
| std::string | variable, | |||
| bool | bLockReaderAfterResponse = false | |||
| ) | [virtual] |
Originate a predictive call from callingDevice to calledDevice using 'context'.
A predictive call is a call that originates in callingDevice an is transferred to callerDevice
| callingDevice | Device who makes the call | |
| contextCalling | ||
| calledDevice | Device who is called | |
| contextCalled | ||
| callid | if callId is 0, it generates a new one | |
| callerId | ||
| userData | ||
| timeout |
Implements ASTCstaProviderInterface.
| void ASTCstaProvider::OnChannelEvent | ( | ManagerEvent | ev | ) | [virtual] |
| void ASTCstaProvider::OnDialEvent | ( | ManagerEvent | ev | ) | [virtual] |
OnDialEvent handler.
Dial generates new call leg DialEvent info srcUniqueId = original call uniqueId destUniqueId = new call leg uniqueId
| ev |
/Fix: Asterisk 1.4 compatibility update source callerid
Implements ASTListener.
| void ASTCstaProvider::OnHangup | ( | ManagerEvent | ev | ) | [virtual] |
| void ASTCstaProvider::OnHoldEvent | ( | ManagerEvent | ev | ) | [virtual] |
OnHold event.
OnHold event. It's produce when a user press Hold button in phone
Implements ASTListener.
| void ASTCstaProvider::OnJoinEvent | ( | ManagerEvent | ev | ) | [virtual] |
OnJoinEvent handler.
Join Event: used when a call enter on a queue HEADER: event DATA: Join HEADER: privilege DATA: call,all HEADER: channel DATA: mISDN/1-1 HEADER: callerid DATA: 317 HEADER: calleridname DATA: unknown HEADER: queue DATA: 555 HEADER: position DATA: 1 HEADER: count DATA: 1
| ev |
Implements ASTListener.
| void ASTCstaProvider::OnLeaveEvent | ( | ManagerEvent | ev | ) | [virtual] |
OnLeaveEvent handler.
OnLeave event: Used when a call leave a queue
| ev |
m_log.LogTrace("ASTCstaProvider::handleConnectionDequeued uniqueId=%s, address=%s, queue=%s", pCall->GetUniqueId().c_str(), address.c_str(), queue.c_str());
Implements ASTListener.
| void ASTCstaProvider::OnLinkDown | ( | ) | [virtual] |
| void ASTCstaProvider::OnLinkEvent | ( | ManagerEvent | ev | ) | [virtual] |
OnLinkEvent handler.
Two channels got linked. This event is received when the audio channels are connected (too late). For this reason it can't be used to link calls
| ev |
Implements ASTListener.
| void ASTCstaProvider::OnNewCallerIdEvent | ( | ManagerEvent | ev | ) | [virtual] |
OnNewCallerIdEvent handler.
CallerId event is generated if the CallerId is set by the extensions configuration
| ev |
Implements ASTListener.
| void ASTCstaProvider::OnNewChannelEvent | ( | ManagerEvent | ev | ) | [virtual] |
| void ASTCstaProvider::OnNewExten | ( | ManagerEvent | ev | ) | [virtual] |
OnNewExten handler.
NewExten event used for dialplan. Currently not used
| ev |
Implements ASTListener.
| void ASTCstaProvider::OnNewStateEvent | ( | ManagerEvent | ev | ) | [virtual] |
| void ASTCstaProvider::OnOriginateFailureEvent | ( | ManagerEvent | ev | ) | [virtual] |
OnOriginateFailure handler.
OriginateFailure event. It's produced when a callback fails
Implements ASTListener.
| void ASTCstaProvider::OnQueueCallerAbandonEvent | ( | ManagerEvent | ev | ) | [virtual] |
OnQueueCallerAbandon handler Asterisk 1.4.
QueueCallerAbandon event. It's produce in Asterisk 1.4 when a caller abandon a queue
Implements ASTListener.
| void ASTCstaProvider::OnRenameEvent | ( | ManagerEvent | ev | ) | [virtual] |
OnRenameEvent handler.
Rename event
| ev |
Implements ASTListener.
| void ASTCstaProvider::OnUnholdEvent | ( | ManagerEvent | ev | ) | [virtual] |
OnUnhold event.
OnUnhold event. It's produced when a user press unhold button in phone
Implements ASTListener.
| void ASTCstaProvider::OnUnlinkEvent | ( | ManagerEvent | ev | ) | [virtual] |
OnUnLinkEvent handler.
Channels link was broken This event is received when the audio channels are broken (too early). For this reason this event cannot be used to unlink calls.
| ev |
Implements ASTListener.
| void ASTCstaProvider::OnUnparkedCallEvent | ( | ManagerEvent | ev | ) | [virtual] |
OnUnparked handler.
UnparkedCall event: used when a call leave a park extension FIX: if the call before to be parked had a CSTALink, the call after unparked will have it too
it is possible that they have been sent events to a new call. To correct it, we send a hangup of pACFrom and then link the two calls.
Implements ASTListener.
| MonitorXref ASTCstaProvider::OpenMonitor | ( | std::string | channel | ) | [virtual] |
Opens a monitor to a device. Monitors are refererd by an opaque int handler known as monitor xref (monitor cross-reference)
Opens a new monitor interested in events on specific deviceID. DeviceId can be an address/extension (example: 311) or a full channel spec (example: sip/311) and it is parsed to extract the address part.
| channel | what channel, address or extension do you want to monitoring |
Implements ASTCstaProviderInterface.
| AC_RESULT ASTCstaProvider::PauseRecording | ( | DWORD | callid, | |
| std::string | address | |||
| ) | [virtual] |
Pause Recording.
Pause recording
| callid | identifier of call | |
| address | device |
Implements ASTCstaProviderInterface.
| AC_RESULT ASTCstaProvider::RetrieveCall | ( | DWORD | callId, | |
| std::string | retreivingDevice, | |||
| std::string | retrieveContext | |||
| ) | [virtual] |
Retrieve a hold call
| callId | identifier of call | |
| retreivingDevice | ||
| retrieveContext |
Implements ASTCstaProviderInterface.
| AC_RESULT ASTCstaProvider::SetAgentStatus | ( | std::string | deviceId, | |
| std::string | queue, | |||
| AGENT_STATUS | newStatus, | |||
| std::string | agentContext | |||
| ) | [virtual] |
Set agentState.
Set agentState. If deviceId is not a full channel identifier including technology will default to local/deviceId
| deviceId | ||
| queue | ||
| newStatus | ||
| agentContext |
Implements ASTCstaProviderInterface.
| AC_RESULT ASTCstaProvider::SetDoNotDisturb | ( | std::string | deviceId, | |
| bool | bDND_on, | |||
| std::string | dndContext | |||
| ) | [virtual] |
Sets Do-not-disturb flag on/off.
SetDoNotDisturb actually implemented as SetAgentStatus (READY/NOTREADY)
| deviceId | ||
| bDND_on | ||
| dndContext |
Implements ASTCstaProviderInterface.
| AC_RESULT ASTCstaProvider::StartRecording | ( | DWORD | callid, | |
| std::string | address, | |||
| std::string | RecordingFileName, | |||
| std::string | format, | |||
| std::string | mix | |||
| ) | [virtual] |
Start Recording.
Start recording
| callid | identifier of call | |
| address | device | |
| RecordingFileName | Recording file name |
Implements ASTCstaProviderInterface.
| AC_RESULT ASTCstaProvider::StopRecording | ( | DWORD | callid, | |
| std::string | address | |||
| ) | [virtual] |
Stop Recording.
Stop recording
| callid | identifier of call | |
| address | device |
Implements ASTCstaProviderInterface.
| void ASTCstaProvider::UnLockReader | ( | ) | [inline, virtual] |
UnLocks Reader Thread
Implements ASTCstaProviderInterface.
| AC_RESULT ASTCstaProvider::UnpauseRecording | ( | DWORD | callid, | |
| std::string | address | |||
| ) | [virtual] |
Unpause Recording.
Continue recording after pause
| callid | identifier of call | |
| address | device |
Implements ASTCstaProviderInterface.
1.5.9