diff --git a/apps/app_disa.c b/apps/app_disa.c index 8217a2456d96a97ede3c708943fe0b653a1e302b..e5814dd3c5d288c541d518e8bdb6ffb7a479e257 100644 --- a/apps/app_disa.c +++ b/apps/app_disa.c @@ -124,7 +124,7 @@ AST_APP_OPTIONS(app_opts, { static void play_dialtone(struct ast_channel *chan, char *mailbox) { - const struct ind_tone_zone_sound *ts = NULL; + const struct tone_zone_sound *ts = NULL; if(ast_app_has_voicemail(mailbox, NULL)) ts = ast_get_indication_tone(chan->zone, "dialrecall"); else diff --git a/apps/app_read.c b/apps/app_read.c index f03597b2fd6fe1defac7567d3e92f0b164a964ee..6fb00b779f758e320af064d608c4306fc7b75621 100644 --- a/apps/app_read.c +++ b/apps/app_read.c @@ -132,7 +132,7 @@ static int read_exec(struct ast_channel *chan, void *data) int tries = 1, to = 0, x = 0; double tosec; char *argcopy = NULL; - struct ind_tone_zone_sound *ts = NULL; + struct tone_zone_sound *ts = NULL; struct ast_flags flags = {0}; const char *status = "ERROR"; diff --git a/apps/app_readexten.c b/apps/app_readexten.c index b556391555771519d90378006044b5f1fa02e05d..5649a34a17eb74c090d3a13a1b94f36b3c1aad50 100644 --- a/apps/app_readexten.c +++ b/apps/app_readexten.c @@ -132,7 +132,7 @@ static int readexten_exec(struct ast_channel *chan, void *data) int maxdigits = sizeof(exten) - 1; int timeout = 0, digit_timeout = 0, x = 0; char *argcopy = NULL, *status = ""; - struct ind_tone_zone_sound *ts = NULL; + struct tone_zone_sound *ts = NULL; struct ast_flags flags = {0}; AST_DECLARE_APP_ARGS(arglist, diff --git a/channels/chan_misdn.c b/channels/chan_misdn.c index 341f950f0ce5592b11dd64ffdc56c4ff86d26be9..9a8632c4dc7ae4a368e4fdfcb89b7b2cc5b8a362 100644 --- a/channels/chan_misdn.c +++ b/channels/chan_misdn.c @@ -377,7 +377,7 @@ struct chan_list { * \brief Tone zone sound used for dialtone generation. * \note Used as a boolean. Non-NULL to prod generation if enabled. */ - const struct ind_tone_zone_sound *ts; + const struct tone_zone_sound *ts; /*! * \brief Enables overlap dialing for the set amount of seconds. (0 = Disabled) @@ -3280,7 +3280,7 @@ static enum ast_bridge_result misdn_bridge (struct ast_channel *c0, static int dialtone_indicate(struct chan_list *cl) { - const struct ind_tone_zone_sound *ts = NULL; + const struct tone_zone_sound *ts = NULL; struct ast_channel *ast = cl->ast; int nd = 0; diff --git a/channels/chan_skinny.c b/channels/chan_skinny.c index 474eb451215fa36fad87f6452a111837937a1263..60b276548437e1d61f2620bd839bc52fd293362d 100644 --- a/channels/chan_skinny.c +++ b/channels/chan_skinny.c @@ -3767,7 +3767,7 @@ static int skinny_transfer(struct skinny_subchannel *sub) { struct skinny_subchannel *xferor; /* the sub doing the transferring */ struct skinny_subchannel *xferee; /* the sub being transferred */ - const struct ind_tone_zone_sound *ts = NULL; + const struct tone_zone_sound *ts = NULL; if (ast_bridged_channel(sub->owner) || ast_bridged_channel(sub->related->owner)) { if (sub->xferor) { diff --git a/channels/chan_unistim.c b/channels/chan_unistim.c index bd15f28969784b48e89fead0b0c842d3eed5982e..13c397808bf50222cea907e4de3a7989b9090559 100644 --- a/channels/chan_unistim.c +++ b/channels/chan_unistim.c @@ -439,7 +439,7 @@ static struct unistim_device { char datetimeformat; /*!< format used for displaying time/date */ char contrast; /*!< contrast */ char country[3]; /*!< country used for dial tone frequency */ - struct ind_tone_zone *tz; /*!< Tone zone for res_indications (ring, busy, congestion) */ + struct tone_zone *tz; /*!< Tone zone for res_indications (ring, busy, congestion) */ char ringvolume; /*!< Ring volume */ char ringstyle; /*!< Ring melody */ int rtp_port; /*!< RTP port used by the phone */ @@ -4057,10 +4057,10 @@ static char *control2str(int ind) return "UNKNOWN"; } -static void in_band_indication(struct ast_channel *ast, const struct ind_tone_zone *tz, +static void in_band_indication(struct ast_channel *ast, const struct tone_zone *tz, const char *indication) { - const struct ind_tone_zone_sound *ts = NULL; + const struct tone_zone_sound *ts = NULL; ts = ast_get_indication_tone(tz, indication); diff --git a/funcs/func_channel.c b/funcs/func_channel.c index 4393c2e337651ce357482ddcd76b388111c4d864..959f332d2613333c696accbe5a3adb73e51ff233 100644 --- a/funcs/func_channel.c +++ b/funcs/func_channel.c @@ -296,7 +296,7 @@ static int func_channel_write(struct ast_channel *chan, const char *function, } #endif else if (!strcasecmp(data, "tonezone")) { - struct ind_tone_zone *new_zone; + struct tone_zone *new_zone; if (!(new_zone = ast_get_indication_zone(value))) { ast_log(LOG_ERROR, "Unknown country code '%s' for tonezone. Check indications.conf for available country codes.\n", value); ret = -1; diff --git a/include/asterisk/channel.h b/include/asterisk/channel.h index 3c3e0f6e142fd6f8fa9704f19bf9fccb18dd8ed4..c62a43ae8abcc201de2acab3667dc14096826efd 100644 --- a/include/asterisk/channel.h +++ b/include/asterisk/channel.h @@ -424,7 +424,7 @@ struct ast_channel { struct ast_trans_pvt *readtrans; /*!< Read translation path */ struct ast_audiohook_list *audiohooks; struct ast_cdr *cdr; /*!< Call Detail Record */ - struct ind_tone_zone *zone; /*!< Tone zone as set in indications.conf or + struct tone_zone *zone; /*!< Tone zone as set in indications.conf or in the CHANNEL dialplan function */ struct ast_channel_monitor *monitor; /*!< Channel monitoring */ #ifdef HAVE_EPOLL diff --git a/include/asterisk/indications.h b/include/asterisk/indications.h index be65b9ba9b8435da96b2c78c78359d44c2832ad0..b32fe500edf9ff064c0963a11b17d46b7553b198 100644 --- a/include/asterisk/indications.h +++ b/include/asterisk/indications.h @@ -39,41 +39,41 @@ are no spaces. The sequence is repeated back to the first tone description not preceeded by !. Duration is specified in milliseconds */ -struct ind_tone_zone_sound { +struct tone_zone_sound { const char *name; /*!< Identifing name */ const char *data; /*!< Actual zone description */ - AST_LIST_ENTRY(ind_tone_zone_sound) list; + AST_LIST_ENTRY(tone_zone_sound) list; }; -struct ind_tone_zone { - AST_RWLIST_ENTRY(ind_tone_zone) list; +struct tone_zone { + AST_RWLIST_ENTRY(tone_zone) list; char country[5]; /*!< Country code */ char alias[5]; /*!< is this an alias? */ char description[40]; /*!< Description */ int nrringcadence; /*!< # registered ringcadence elements */ int *ringcadence; /*!< Ring cadence */ - AST_LIST_HEAD_NOLOCK(, ind_tone_zone_sound) tones; /*!< The known tones for this zone */ + AST_LIST_HEAD_NOLOCK(, tone_zone_sound) tones; /*!< The known tones for this zone */ }; /*! \brief set the default tone country */ int ast_set_indication_country(const char *country); /*! \brief locate tone_zone, given the country. if country == NULL, use the default country */ -struct ind_tone_zone *ast_get_indication_zone(const char *country); +struct tone_zone *ast_get_indication_zone(const char *country); /*! \brief locate a tone_zone_sound, given the tone_zone. if tone_zone == NULL, use the default tone_zone */ -struct ind_tone_zone_sound *ast_get_indication_tone(const struct ind_tone_zone *zone, const char *indication); +struct tone_zone_sound *ast_get_indication_tone(const struct tone_zone *zone, const char *indication); /*! \brief deallocate the passed tone zone */ -void ast_destroy_indication_zone(struct ind_tone_zone *zone); +void ast_destroy_indication_zone(struct tone_zone *zone); /*! \brief add a new country, if country exists, it will be replaced. */ -int ast_register_indication_country(struct ind_tone_zone *country); +int ast_register_indication_country(struct tone_zone *country); /*! \brief remove an existing country and all its indications, country must exist */ int ast_unregister_indication_country(const char *country); /*! \brief add a new indication to a tone_zone. tone_zone must exist. if the indication already * exists, it will be replaced. */ -int ast_register_indication(struct ind_tone_zone *zone, const char *indication, const char *tonelist); +int ast_register_indication(struct tone_zone *zone, const char *indication, const char *tonelist); /*! \brief remove an existing tone_zone's indication. tone_zone must exist */ -int ast_unregister_indication(struct ind_tone_zone *zone, const char *indication); +int ast_unregister_indication(struct tone_zone *zone, const char *indication); /*! \brief Start a tone-list going */ int ast_playtones_start(struct ast_channel *chan, int vol, const char* tonelist, int interruptible); @@ -81,10 +81,10 @@ int ast_playtones_start(struct ast_channel *chan, int vol, const char* tonelist, void ast_playtones_stop(struct ast_channel *chan); /*! \brief support for walking through a list of indications */ -struct ind_tone_zone *ast_walk_indications(const struct ind_tone_zone *cur); +struct tone_zone *ast_walk_indications(const struct tone_zone *cur); #if 0 -extern struct ind_tone_zone *tone_zones; +extern struct tone_zone *tone_zones; extern ast_mutex_t tzlock; #endif diff --git a/main/app.c b/main/app.c index bda021d561cdcf82178aa02001ba4dd5d14d5e47..5bae8574a223a7fdb05f2bb1d166194dc2a9a108 100644 --- a/main/app.c +++ b/main/app.c @@ -72,7 +72,7 @@ static AST_RWLIST_HEAD_STATIC(groups, ast_group_info); */ int ast_app_dtget(struct ast_channel *chan, const char *context, char *collect, size_t size, int maxlen, int timeout) { - struct ind_tone_zone_sound *ts; + struct tone_zone_sound *ts; int res = 0, x = 0; if (maxlen > size) diff --git a/main/channel.c b/main/channel.c index 7e8d2fa7b5d8e782dd3a83d7a7fe3c3fd53644a8..49108b65c0edc1e4f1ec0022868a67cf489cc257 100644 --- a/main/channel.c +++ b/main/channel.c @@ -2894,7 +2894,7 @@ int ast_indicate_data(struct ast_channel *chan, int _condition, /* By using an enum, we'll get compiler warnings for values not handled * in switch statements. */ enum ast_control_frame_type condition = _condition; - const struct ind_tone_zone_sound *ts = NULL; + const struct tone_zone_sound *ts = NULL; int res = -1; ast_channel_lock(chan); diff --git a/main/indications.c b/main/indications.c index 2057fd32112154a14aaace17150a5336baf4a980..c96dc41f1d07267dcb6b94a235aeee888ceb7163 100644 --- a/main/indications.c +++ b/main/indications.c @@ -332,12 +332,12 @@ void ast_playtones_stop(struct ast_channel *chan) /*--------------------------------------------*/ -static AST_RWLIST_HEAD_STATIC(tone_zones, ind_tone_zone); -static struct ind_tone_zone *current_tonezone; +static AST_RWLIST_HEAD_STATIC(tone_zones, tone_zone); +static struct tone_zone *current_tonezone; -struct ind_tone_zone *ast_walk_indications(const struct ind_tone_zone *cur) +struct tone_zone *ast_walk_indications(const struct tone_zone *cur) { - struct ind_tone_zone *tz = NULL; + struct tone_zone *tz = NULL; AST_RWLIST_RDLOCK(&tone_zones); /* If cur is not NULL, then we have to iterate through - otherwise just return the first entry */ @@ -358,7 +358,7 @@ struct ind_tone_zone *ast_walk_indications(const struct ind_tone_zone *cur) /* Set global indication country */ int ast_set_indication_country(const char *country) { - struct ind_tone_zone *zone = NULL; + struct tone_zone *zone = NULL; /* If no country is specified or we are unable to find the zone, then return not found */ if (!country || !(zone = ast_get_indication_zone(country))) @@ -376,9 +376,9 @@ int ast_set_indication_country(const char *country) } /* locate tone_zone, given the country. if country == NULL, use the default country */ -struct ind_tone_zone *ast_get_indication_zone(const char *country) +struct tone_zone *ast_get_indication_zone(const char *country) { - struct ind_tone_zone *tz = NULL; + struct tone_zone *tz = NULL; int alias_loop = 0; AST_RWLIST_RDLOCK(&tone_zones); @@ -411,9 +411,9 @@ struct ind_tone_zone *ast_get_indication_zone(const char *country) } /* locate a tone_zone_sound, given the tone_zone. if tone_zone == NULL, use the default tone_zone */ -struct ind_tone_zone_sound *ast_get_indication_tone(const struct ind_tone_zone *zone, const char *indication) +struct tone_zone_sound *ast_get_indication_tone(const struct tone_zone *zone, const char *indication) { - struct ind_tone_zone_sound *ts = NULL; + struct tone_zone_sound *ts = NULL; AST_RWLIST_RDLOCK(&tone_zones); @@ -439,7 +439,7 @@ struct ind_tone_zone_sound *ast_get_indication_tone(const struct ind_tone_zone * return ts; } -static inline void clear_zone_sound(struct ind_tone_zone_sound *ts) +static inline void clear_zone_sound(struct tone_zone_sound *ts) { /* Deconstify the 'const char *'s so the compiler doesn't complain. (but it's safe) */ ast_free((char *) ts->name); @@ -447,9 +447,9 @@ static inline void clear_zone_sound(struct ind_tone_zone_sound *ts) } /*! \brief deallocate the passed tone zone */ -void ast_destroy_indication_zone(struct ind_tone_zone *zone) +void ast_destroy_indication_zone(struct tone_zone *zone) { - struct ind_tone_zone_sound *current; + struct tone_zone_sound *current; while ((current = AST_LIST_REMOVE_HEAD(&zone->tones, list))) { clear_zone_sound(current); @@ -465,9 +465,9 @@ void ast_destroy_indication_zone(struct ind_tone_zone *zone) /*--------------------------------------------*/ /* add a new country, if country exists, it will be replaced. */ -int ast_register_indication_country(struct ind_tone_zone *zone) +int ast_register_indication_country(struct tone_zone *zone) { - struct ind_tone_zone *tz = NULL; + struct tone_zone *tz = NULL; AST_RWLIST_WRLOCK(&tone_zones); AST_RWLIST_TRAVERSE_SAFE_BEGIN(&tone_zones, tz, list) { @@ -500,7 +500,7 @@ int ast_register_indication_country(struct ind_tone_zone *zone) * Also, all countries which are an alias for the specified country are removed. */ int ast_unregister_indication_country(const char *country) { - struct ind_tone_zone *tz = NULL; + struct tone_zone *tz = NULL; int res = -1; AST_RWLIST_WRLOCK(&tone_zones); @@ -526,9 +526,9 @@ int ast_unregister_indication_country(const char *country) /* add a new indication to a tone_zone. tone_zone must exist. if the indication already * exists, it will be replaced. */ -int ast_register_indication(struct ind_tone_zone *zone, const char *indication, const char *tonelist) +int ast_register_indication(struct tone_zone *zone, const char *indication, const char *tonelist) { - struct ind_tone_zone_sound *ts; + struct tone_zone_sound *ts; int found = 0; /* is it an alias? stop */ @@ -566,9 +566,9 @@ int ast_register_indication(struct ind_tone_zone *zone, const char *indication, } /* remove an existing country's indication. Both country and indication must exist */ -int ast_unregister_indication(struct ind_tone_zone *zone, const char *indication) +int ast_unregister_indication(struct tone_zone *zone, const char *indication) { - struct ind_tone_zone_sound *ts; + struct tone_zone_sound *ts; int res = -1; /* is it an alias? stop */ diff --git a/main/pbx.c b/main/pbx.c index 5c1755329c91f849376eb4866111962c3f5e6b10..b62314aded94fc925867f6d31d1d7d40d06b0244 100644 --- a/main/pbx.c +++ b/main/pbx.c @@ -8531,7 +8531,7 @@ static int pbx_builtin_waitexten(struct ast_channel *chan, void *data) } else if (ast_test_flag(&flags, WAITEXTEN_MOH)) { ast_indicate_data(chan, AST_CONTROL_HOLD, opts[0], strlen(opts[0])); } else if (ast_test_flag(&flags, WAITEXTEN_DIALTONE)) { - const struct ind_tone_zone_sound *ts = ast_get_indication_tone(chan->zone, "dial"); + const struct tone_zone_sound *ts = ast_get_indication_tone(chan->zone, "dial"); if (ts) ast_playtones_start(chan, 0, ts->data, 0); else diff --git a/res/res_indications.c b/res/res_indications.c index eb61a02f137a6115f5e1745c80352d982a242ac6..b2ba5fcef21ba9edbd4726c3ca27222a8a3f88ca 100644 --- a/res/res_indications.c +++ b/res/res_indications.c @@ -92,7 +92,7 @@ static const char config[] = "indications.conf"; */ static char *handle_cli_indication_add(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) { - struct ind_tone_zone *tz; + struct tone_zone *tz; int created_country = 0; switch (cmd) { @@ -142,7 +142,7 @@ static char *handle_cli_indication_add(struct ast_cli_entry *e, int cmd, struct */ static char *handle_cli_indication_remove(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) { - struct ind_tone_zone *tz; + struct tone_zone *tz; switch (cmd) { case CLI_INIT: @@ -187,7 +187,7 @@ static char *handle_cli_indication_remove(struct ast_cli_entry *e, int cmd, stru */ static char *handle_cli_indication_show(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) { - struct ind_tone_zone *tz = NULL; + struct tone_zone *tz = NULL; char buf[256]; int found_country = 0; @@ -216,7 +216,7 @@ static char *handle_cli_indication_show(struct ast_cli_entry *e, int cmd, struct int i, j; for (i = 2; i < a->argc; i++) { if (strcasecmp(tz->country, a->argv[i]) == 0 && !tz->alias[0]) { - struct ind_tone_zone_sound *ts; + struct tone_zone_sound *ts; if (!found_country) { found_country = 1; ast_cli(a->fd, "Country Indication PlayList\n"); @@ -249,7 +249,7 @@ static char *handle_cli_indication_show(struct ast_cli_entry *e, int cmd, struct */ static int handle_playtones(struct ast_channel *chan, void *data) { - struct ind_tone_zone_sound *ts; + struct tone_zone_sound *ts; int res; if (!data || !((char*)data)[0]) { @@ -284,7 +284,7 @@ static int ind_load_module(int reload) struct ast_variable *v; char *cxt; char *c; - struct ind_tone_zone *tones; + struct tone_zone *tones; const char *country = NULL; struct ast_flags config_flags = { reload ? CONFIG_FLAG_FILEUNCHANGED : 0 }; @@ -345,7 +345,7 @@ static int ind_load_module(int reload) c = countries; country = strsep(&c,","); while (country) { - struct ind_tone_zone* azone; + struct tone_zone* azone; if (!(azone = ast_calloc(1, sizeof(*azone)))) { ast_config_destroy(cfg); ast_destroy_indication_zone(tones); @@ -361,7 +361,7 @@ static int ind_load_module(int reload) country = strsep(&c,","); } } else { - struct ind_tone_zone_sound *ts; + struct tone_zone_sound *ts; /* add tone to country */ AST_LIST_TRAVERSE(&tones->tones, ts, list) { diff --git a/res/snmp/agent.c b/res/snmp/agent.c index 6af14db931d60e091b9e4965f30e227209878407..6acf53680c2ad772f4b0d09fa5938bdf2f6b53a2 100644 --- a/res/snmp/agent.c +++ b/res/snmp/agent.c @@ -644,7 +644,7 @@ static u_char *ast_var_indications(struct variable *vp, oid *name, size_t *lengt int exact, size_t *var_len, WriteMethod **write_method) { static unsigned long long_ret; - struct ind_tone_zone *tz = NULL; + struct tone_zone *tz = NULL; if (header_generic(vp, name, length, exact, var_len, write_method)) return NULL; @@ -674,7 +674,7 @@ static u_char *ast_var_indications_table(struct variable *vp, oid *name, size_t int exact, size_t *var_len, WriteMethod **write_method) { static unsigned long long_ret; - struct ind_tone_zone *tz = NULL; + struct tone_zone *tz = NULL; int i; if (header_simple_table(vp, name, length, exact, var_len, write_method, -1))