104 int inuse=-1, option_state=0, string_compare=0, option_all_avail=0;
106 char *info, tmp[512], trychan[512], *
peers, *tech, *
number, *rest, *cur;
127 if (strchr(
args.options,
'a')) {
128 option_all_avail = 1;
130 if (strchr(
args.options,
's')) {
133 if (strchr(
args.options,
't')) {
137 peers =
args.reqchans;
142 rest = strchr(cur,
'&');
148 number = strchr(tech,
'/');
158 if (string_compare) {
162 snprintf(trychan,
sizeof(trychan),
"%s/%s",cur,number);
164 }
else if (option_state) {
169 snprintf(trychan,
sizeof(trychan),
"%s/%s",cur,number);
172 snprintf(tmp,
sizeof(tmp),
"%d", status);
177 snprintf(tmp,
sizeof(tmp),
"%s/%s", tech, number);
180 snprintf(tmp,
sizeof(tmp),
"%d", status);
186 if (!option_all_avail) {
int ast_hangup(struct ast_channel *chan)
Hang up a channel.
Main Channel structure associated with a channel.
ast_device_state
Device States.
char * ast_str_buffer(const struct ast_str *buf)
Returns the string buffer within the ast_str buf.
#define AST_DECLARE_APP_ARGS(name, arglist)
Declare a structure to hold an application's arguments.
enum ast_device_state ast_parse_device_state(const char *device)
Search the Channels by Name.
int ast_str_append(struct ast_str **buf, ssize_t max_len, const char *fmt,...)
Append to a thread local dynamic string.
#define ast_str_alloca(init_len)
static struct ao2_container * peers
static force_inline int attribute_pure ast_strlen_zero(const char *s)
#define ast_strdupa(s)
duplicate a string in memory from the stack
The descriptor of a dynamic string XXX storage will be optimized later if needed We use the ts field ...
const ast_string_field name
void ast_log(int level, const char *file, int line, const char *function, const char *fmt,...)
Used for sending a log message This is the standard logger function. Probably the only way you will i...
int pbx_builtin_setvar_helper(struct ast_channel *chan, const char *name, const char *value)
Add a variable to the channel variable stack, removing the most recently set value for the same name...
size_t ast_str_strlen(const struct ast_str *buf)
Returns the current length of the string stored within buf.
#define AST_APP_ARG(name)
Define an application argument.
#define AST_STANDARD_APP_ARGS(args, parse)
Performs the 'standard' argument separation process for an application.
struct ast_channel * ast_request(const char *type, format_t format, const struct ast_channel *requestor, void *data, int *status)
Requests a channel.