mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-09 22:45:49 +00:00
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
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user