mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-07-23 20:51:58 +00:00
Add optional <variables> and <params> tag to <gateway> tag.
current gateways are: <gateway> <param name="foo" value="bar"/> </gateway> now can also be: <gateway> <params> <param name="foo" value="bar"/> </params> </gateway> now can also be: <gateway> <params> <param name="foo" value="bar"/> </params> <variables> <variable name="myvar" val="myval"/> </variables> </gateway> any variables will be set on all outgoing channels using that gateway. git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@10103 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
@@ -2029,6 +2029,16 @@ static switch_call_cause_t sofia_outgoing_channel(switch_core_session_t *session
|
||||
} else {
|
||||
tech_pvt->invite_contact = switch_core_session_strdup(nsession, gateway_ptr->register_contact);
|
||||
}
|
||||
|
||||
if (gateway_ptr->vars) {
|
||||
switch_event_header_t *hp;
|
||||
for(hp = gateway_ptr->vars->headers; hp; hp = hp->next) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "%s setting variable [%s]=[%s]\n",
|
||||
switch_channel_get_name(nchannel), hp->name, hp->value);
|
||||
switch_channel_set_variable(nchannel, hp->name, hp->value);
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
if (!(dest = strchr(profile_name, '/'))) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Invalid URL\n");
|
||||
|
||||
Reference in New Issue
Block a user