[svn-commits] mmichelson: branch mmichelson/sip_options r393979 - in /team/mmichelson/sip_o...
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Wed Jul 10 09:42:56 CDT 2013
Author: mmichelson
Date: Wed Jul 10 09:42:54 2013
New Revision: 393979
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=393979
Log:
Add 'tonezone' option for endpoints.
Modified:
team/mmichelson/sip_options/channels/chan_gulp.c
team/mmichelson/sip_options/include/asterisk/res_sip.h
team/mmichelson/sip_options/res/res_sip/sip_configuration.c
Modified: team/mmichelson/sip_options/channels/chan_gulp.c
URL: http://svnview.digium.com/svn/asterisk/team/mmichelson/sip_options/channels/chan_gulp.c?view=diff&rev=393979&r1=393978&r2=393979
==============================================================================
--- team/mmichelson/sip_options/channels/chan_gulp.c (original)
+++ team/mmichelson/sip_options/channels/chan_gulp.c Wed Jul 10 09:42:54 2013
@@ -56,6 +56,7 @@
#include "asterisk/dsp.h"
#include "asterisk/stasis_endpoints.h"
#include "asterisk/stasis_channels.h"
+#include "asterisk/indications.h"
#include "asterisk/res_sip.h"
#include "asterisk/res_sip_session.h"
@@ -600,6 +601,14 @@
ast_channel_named_callgroups_set(chan, session->endpoint->named_callgroups);
ast_channel_named_pickupgroups_set(chan, session->endpoint->named_pickupgroups);
+
+ if (!ast_strlen_zero(session->endpoint->zone)) {
+ struct ast_tone_zone *zone = ast_get_indication_zone(session->endpoint->zone);
+ if (!zone) {
+ ast_log(LOG_ERROR, "Unknown country code '%s' for tonezone. Check indications.conf for available country codes.\n", session->endpoint->zone);
+ }
+ ast_channel_zone_set(chan, zone);
+ }
ast_endpoint_add_channel(session->endpoint->persistent, chan);
Modified: team/mmichelson/sip_options/include/asterisk/res_sip.h
URL: http://svnview.digium.com/svn/asterisk/team/mmichelson/sip_options/include/asterisk/res_sip.h?view=diff&rev=393979&r1=393978&r2=393979
==============================================================================
--- team/mmichelson/sip_options/include/asterisk/res_sip.h (original)
+++ team/mmichelson/sip_options/include/asterisk/res_sip.h Wed Jul 10 09:42:54 2013
@@ -325,6 +325,8 @@
AST_STRING_FIELD(mailboxes);
/*! Configured RTP engine for this endpoint. */
AST_STRING_FIELD(rtp_engine);
+ /*! Configured tone zone for this endpoint. */
+ AST_STRING_FIELD(zone);
);
/*! Identification information for this endpoint */
struct ast_party_id id;
Modified: team/mmichelson/sip_options/res/res_sip/sip_configuration.c
URL: http://svnview.digium.com/svn/asterisk/team/mmichelson/sip_options/res/res_sip/sip_configuration.c?view=diff&rev=393979&r1=393978&r2=393979
==============================================================================
--- team/mmichelson/sip_options/res/res_sip/sip_configuration.c (original)
+++ team/mmichelson/sip_options/res/res_sip/sip_configuration.c Wed Jul 10 09:42:54 2013
@@ -659,6 +659,7 @@
ast_sorcery_object_field_register_custom(sip_sorcery, "endpoint", "namedpickupgroup", "", named_groups_handler, NULL, 0, 0);
ast_sorcery_object_field_register(sip_sorcery, "endpoint", "devicestate_busy_at", "0", OPT_UINT_T, 0, FLDSET(struct ast_sip_endpoint, devicestate_busy_at));
ast_sorcery_object_field_register(sip_sorcery, "endpoint", "rtpengine", "asterisk", OPT_STRINGFIELD_T, 0, STRFLDSET(struct ast_sip_endpoint, rtp_engine));
+ ast_sorcery_object_field_register(sip_sorcery, "endpoint", "tonezone", "", OPT_STRINGFIELD_T, 0, STRFLDSET(struct ast_sip_endpoint, zone));
if (ast_sip_initialize_sorcery_transport(sip_sorcery)) {
ast_log(LOG_ERROR, "Failed to register SIP transport support with sorcery\n");
More information about the svn-commits
mailing list