summaryrefslogtreecommitdiff
path: root/channels
diff options
context:
space:
mode:
authorMark Michelson <mmichelson@digium.com>2013-07-18 19:25:51 +0000
committerMark Michelson <mmichelson@digium.com>2013-07-18 19:25:51 +0000
commitc47787feab34d9572b41ebe7148c169b52362fbd (patch)
tree85410d3780938b31d9605f6d05cef9a744c3932d /channels
parent3c86832f9f271c8d479cf956155424fda512c76b (diff)
Add a bunch of options from sip.conf to res_sip.conf
For a complete list of the options added, see the review linked at the bottom of this commit message. (closes issue ASTERISK-21506) reported by Matt Jordan Review: https://reviewboard.asterisk.org/r/2671 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@394759 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels')
-rw-r--r--channels/chan_gulp.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/channels/chan_gulp.c b/channels/chan_gulp.c
index ad50b8f4e..beb235b75 100644
--- a/channels/chan_gulp.c
+++ b/channels/chan_gulp.c
@@ -56,6 +56,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#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"
@@ -601,6 +602,18 @@ static struct ast_channel *gulp_new(struct ast_sip_session *session, int state,
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->language)) {
+ ast_channel_language_set(chan, session->endpoint->language);
+ }
+
+ 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);
return chan;