#include <astxx/manager/action/originate.h>


Definition at line 45 of file originate.h.
Public Member Functions | |
| action::originate & | account (const std::string &account) |
| Set the account for this call. | |
| message::action | action () const |
| Format this command as a header for sending to Asterisk. | |
| virtual void | action_id (const std::string &id) |
| Set the ActionID for this action. | |
| virtual std::string | action_id () const |
| Get the ActionID for this action. | |
| action::originate & | async (bool state) |
| Set or unset the asynchronyous flag for this originate. | |
| action::originate & | caller_id (const std::string &cid) |
| Set the CallerID for this call. | |
| virtual message::response | handle_response (message::response response) |
| Handle a response from Asterisk. | |
| message::response | operator() (connection &c) |
| Send this action over this connection and handle the response. | |
| originate (const std::string &channel, const std::string &application, const std::string &data) | |
| Originate a call. | |
| originate (const std::string &channel, const std::string &context, unsigned int exten, unsigned int priority) | |
| Originate a call. | |
| originate (const std::string &channel, const std::string &context, const std::string &exten, unsigned int priority) | |
| Originate a call. | |
| originate (const std::string &channel, const std::string &context, unsigned int exten, const std::string &priority) | |
| Originate a call. | |
| originate (const std::string &channel, const std::string &context, const std::string &exten, const std::string &priority) | |
| Originate a call. | |
| action::originate & | timeout (time_duration to) |
| Set the timeout for this call. | |
| action::originate & | variables (const std::map< std::string, std::string > &vars) |
| Set the variables for this call. | |
| astxx::manager::action::originate::originate | ( | const std::string & | channel, | |
| const std::string & | context, | |||
| const std::string & | exten, | |||
| const std::string & | priority | |||
| ) | [inline] |
| astxx::manager::action::originate::originate | ( | const std::string & | channel, | |
| const std::string & | context, | |||
| unsigned int | exten, | |||
| const std::string & | priority | |||
| ) | [inline] |
| astxx::manager::action::originate::originate | ( | const std::string & | channel, | |
| const std::string & | context, | |||
| const std::string & | exten, | |||
| unsigned int | priority | |||
| ) | [inline] |
| astxx::manager::action::originate::originate | ( | const std::string & | channel, | |
| const std::string & | context, | |||
| unsigned int | exten, | |||
| unsigned int | priority | |||
| ) | [inline] |
| astxx::manager::action::originate::originate | ( | const std::string & | channel, | |
| const std::string & | application, | |||
| const std::string & | data | |||
| ) | [inline] |
Originate a call.
| channel | the channel to originate | |
| application | the application to execute on the originated channel | |
| data | the data to pass to that application |
Definition at line 93 of file originate.h.
| action::originate& astxx::manager::action::originate::account | ( | const std::string & | account | ) | [inline] |
Set the account for this call.
| account | the account code to use |
Definition at line 122 of file originate.h.
| message::action astxx::manager::action::originate::action | ( | ) | const [inline, virtual] |
Format this command as a header for sending to Asterisk.
This function is called by manager::connection::send_action() to get the data to send to Asterisk.
Implements astxx::manager::basic_action.
Definition at line 146 of file originate.h.
References astxx::manager::message::basic_message< message_traits >::insert().
| virtual std::string astxx::manager::basic_action::action_id | ( | ) | const [inline, virtual, inherited] |
Get the ActionID for this action.
Definition at line 62 of file basic_action.h.
Referenced by astxx::manager::action::status::action(), and astxx::manager::connection::send_action_async().
| action::originate& astxx::manager::action::originate::async | ( | bool | state | ) | [inline] |
Set or unset the asynchronyous flag for this originate.
| state | set to true for asynchronous behavior |
Definition at line 131 of file originate.h.
| action::originate& astxx::manager::action::originate::caller_id | ( | const std::string & | cid | ) | [inline] |
Set the CallerID for this call.
| cid | the caller id (in the format '"Caller Name" <number>' or 'Name' or 'number' or any other format Asterisk accepts) |
Definition at line 113 of file originate.h.
| message::response astxx::manager::basic_action::handle_response | ( | message::response | response | ) | [virtual, inherited] |
Handle a response from Asterisk.
| response | the response to handle |
| manager::permission_denied | on a permission error | |
| manager::authentication_required | on an authentication error | |
| manager::action::missing_data | if required data was not provided | |
| manager::action::bad_data | if the given data was invalid (invalid priority, channel, timeout...) | |
| manager::action::channel_not_found | if the given channel was not found |
Reimplemented in astxx::manager::action::command, astxx::manager::action::getvar, and astxx::manager::action::login.
Definition at line 48 of file basic_action.cc.
References astxx::manager::basic_action::action().
Referenced by astxx::manager::action::login::handle_response(), astxx::manager::action::getvar::handle_response(), astxx::manager::action::command::handle_response(), and astxx::manager::basic_action::operator()().
| message::response astxx::manager::basic_action::operator() | ( | connection & | c | ) | [inherited] |
Send this action over this connection and handle the response.
| c | the connection to use |
Definition at line 103 of file basic_action.cc.
References astxx::manager::basic_action::handle_response().
| action::originate& astxx::manager::action::originate::timeout | ( | time_duration | to | ) | [inline] |
Set the timeout for this call.
| to | the timeout to set (use posix_time::pos_infin for no timeout) Asterisk defaults this to 30 seconds |
Definition at line 102 of file originate.h.
| action::originate& astxx::manager::action::originate::variables | ( | const std::map< std::string, std::string > & | vars | ) | [inline] |
Set the variables for this call.
| vars | the variables to assign to the channel created by this originate action |
Definition at line 141 of file originate.h.
1.5.6