astxx::manager::action::redirect Class Reference

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

Inheritance diagram for astxx::manager::action::redirect:

Inheritance graph
[legend]
Collaboration diagram for astxx::manager::action::redirect:

Collaboration graph
[legend]

List of all members.


Detailed Description

Reirect a call.

Definition at line 41 of file redirect.h.


Public Member Functions

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.
redirectextra_channel (const std::string &extra_channel)
 Set the ExtraChannel header.
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.
 redirect (const std::string &channel, const std::string &context, unsigned int exten, unsigned int priority)
 Redirect a call.
 redirect (const std::string &channel, const std::string &context, const std::string &exten, unsigned int priority)
 Redirect a call.
 redirect (const std::string &channel, const std::string &context, unsigned int exten, const std::string &priority)
 Redirect a call.
 redirect (const std::string &channel, const std::string &context, const std::string &exten, const std::string &priority)
 Redirect a call.

Constructor & Destructor Documentation

astxx::manager::action::redirect::redirect ( const std::string &  channel,
const std::string &  context,
const std::string &  exten,
const std::string &  priority 
) [inline]

Redirect a call.

Parameters:
channel the channel to redirect
exten the extension to redirect the call(s) to
context the context to redirect the call(s) to
priority the priority to redirect the call(s) to

Definition at line 49 of file redirect.h.

astxx::manager::action::redirect::redirect ( const std::string &  channel,
const std::string &  context,
unsigned int  exten,
const std::string &  priority 
) [inline]

Redirect a call.

Parameters:
channel the channel to redirect
exten the extension to redirect the call(s) to
context the context to redirect the call(s) to
priority the priority to redirect the call(s) to

Definition at line 59 of file redirect.h.

astxx::manager::action::redirect::redirect ( const std::string &  channel,
const std::string &  context,
const std::string &  exten,
unsigned int  priority 
) [inline]

Redirect a call.

Parameters:
channel the channel to redirect
exten the extension to redirect the call(s) to
context the context to redirect the call(s) to
priority the priority to redirect the call(s) to

Definition at line 69 of file redirect.h.

astxx::manager::action::redirect::redirect ( const std::string &  channel,
const std::string &  context,
unsigned int  exten,
unsigned int  priority 
) [inline]

Redirect a call.

Parameters:
channel the channel to redirect
exten the extension to redirect the call(s) to
context the context to redirect the call(s) to
priority the priority to redirect the call(s) to

Definition at line 79 of file redirect.h.


Member Function Documentation

message::action astxx::manager::action::redirect::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.

Returns:
a message::action message to send to Asterisk

Implements astxx::manager::basic_action.

Definition at line 93 of file redirect.h.

virtual std::string astxx::manager::basic_action::action_id (  )  const [inline, virtual, inherited]

Get the ActionID for this action.

Returns:
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().

redirect& astxx::manager::action::redirect::extra_channel ( const std::string &  extra_channel  )  [inline]

Set the ExtraChannel header.

Parameters:
extra_channel an additional channel to redirect (generally used for bridged calls)
Returns:
a reference to this action

Definition at line 88 of file redirect.h.

message::response astxx::manager::basic_action::handle_response ( message::response  response  )  [virtual, inherited]

Handle a response from Asterisk.

Parameters:
response the response to handle
This function is called from basic_action::operator()() and passed the response from Asterisk. This function may opt to throw exceptions if an error occours. The default implementation handles errors common to most manager actions. Overriding methods should call this method before processing the response if they would like to keep this error handling.

Returns:
the message::response we were passed
Exceptions:
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.

Parameters:
c the connection to use
This function sends this action over the give connection to Asterisk and then passes the response through basic_action::handle_response() before returning it. basic_action::handle_response() will throw exceptions for most common errors.

Returns:
the response from Asterisk

Definition at line 103 of file basic_action.cc.

References astxx::manager::basic_action::handle_response().


The documentation for this class was generated from the following file:

Generated on Thu Jul 3 01:32:51 2008 for Astxx by  doxygen 1.5.6