96 char *dialtech, *tmp[100], buf[13];
111 ast_log(
LOG_WARNING,
"ParkAndAnnounce requires arguments: (announce_template,timeout,dial,[return_context])\n");
119 timeout = atoi(
args.timeout) * 1000;
122 ast_log(
LOG_WARNING,
"PARK: A dial resource must be specified i.e: Console/dsp or DAHDI/g1/5551212\n");
127 ast_verb(3,
"Dial Tech,String: (%s,%s)\n", dialtech,
args.dial);
141 ast_verb(3,
"Warning: Return Context Invalid, call will return to default|s\n");
160 ast_verb(3,
"Call parked in space: %d, timeout: %d, return-context: %s\n",
161 lot, timeout,
args.return_context ?
args.return_context :
"");
165 snprintf(buf,
sizeof(buf),
"%d", lot);
170 S_COR(caller_id.number.valid, caller_id.number.str, NULL),
171 S_COR(caller_id.name.valid, caller_id.name.str, NULL),
179 ast_verb(4,
"Channel %s was never answered.\n", dchan->
name);
195 for (looptemp = 0; looptemp <
ARRAY_LEN(tmp); looptemp++) {
196 if ((tmp[looptemp] =
strsep(&
args.template,
":")) != NULL)
202 for (i = 0; i < looptemp; i++) {
203 ast_verb(4,
"Announce:%s\n", tmp[i]);
204 if (!strcmp(tmp[i],
"PARKED")) {
int ast_hangup(struct ast_channel *chan)
Hang up a channel.
Information needed to identify an endpoint in a call.
#define ast_channel_lock(chan)
Main Channel structure associated with a channel.
char * str
Subscriber phone number (Malloced)
int ast_streamfile(struct ast_channel *c, const char *filename, const char *preflang)
Streams a file.
struct ast_party_caller caller
Channel Caller ID information.
char * strsep(char **str, const char *delims)
struct ast_channel * parent_channel
char context[AST_MAX_CONTEXT]
struct ast_channel * __ast_request_and_dial(const char *type, format_t format, const struct ast_channel *requestor, void *data, int timeout, int *reason, const char *cid_num, const char *cid_name, struct outgoing_helper *oh)
Request a channel of a given type, with data as optional information used by the low level module and...
#define AST_DECLARE_APP_ARGS(name, arglist)
Declare a structure to hold an application's arguments.
void ast_party_id_copy(struct ast_party_id *dest, const struct ast_party_id *src)
Copy the source party id information to the destination party id.
int ast_say_digits(struct ast_channel *chan, int num, const char *ints, const char *lang)
says digits
void ast_party_id_free(struct ast_party_id *doomed)
Destroy the party id contents.
void ast_variables_destroy(struct ast_variable *var)
Free variable list.
#define ast_verb(level,...)
struct ast_variable * vars
int ast_masq_park_call(struct ast_channel *park_me, struct ast_channel *parker, int timeout, int *extout)
Park a call via a masqueraded channel.
struct ast_party_id id
Caller party ID.
static force_inline int attribute_pure ast_strlen_zero(const char *s)
int ast_parseable_goto(struct ast_channel *chan, const char *goto_string)
#define S_COR(a, b, c)
returns the equivalent of logic or for strings, with an additional boolean check: second one if not e...
int ast_exists_extension(struct ast_channel *c, const char *context, const char *exten, int priority, const char *callerid)
Determine whether an extension exists.
#define ast_strdupa(s)
duplicate a string in memory from the stack
enum ast_channel_state _state
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...
#define ast_channel_unlock(chan)
void ast_party_id_init(struct ast_party_id *init)
Initialize the given party id structure.
#define ast_clear_flag(p, flag)
#define AST_FORMAT_SLINEAR
int ast_waitstream(struct ast_channel *c, const char *breakon)
Waits for a stream to stop or digit to be pressed.
#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.
unsigned char valid
TRUE if the number information is valid/present.
const ast_string_field language
char exten[AST_MAX_EXTENSION]
int ast_stopstream(struct ast_channel *c)
Stops a stream.
struct ast_variable * ast_variable_new(const char *name, const char *value, const char *filename)
struct ast_party_number number
Subscriber phone number.