if (!switch_event_get_header(ovars, "origination_caller_id_name")) {
if ((caller_id_name = switch_event_get_header(pop, "caller-caller-id-name"))) {
- if (node->outbound_name) {
+ if (!zstr(node->outbound_name)) {
switch_event_add_header(ovars, SWITCH_STACK_BOTTOM, "origination_caller_id_name", "(%s) %s", node->outbound_name, caller_id_name);
} else {
switch_event_add_header_string(ovars, SWITCH_STACK_BOTTOM, "origination_caller_id_name", caller_id_name);
originate_string = switch_mprintf("{execute_on_answer='unset fifo_hangup_check',fifo_hangup_check='%q'}%s",
node->name, h->originate_string);
} else {
- if (node->outbound_name) {
+ if (!zstr(node->outbound_name)) {
originate_string = switch_mprintf("{execute_on_answer='unset fifo_hangup_check',fifo_hangup_check='%q',"
"origination_caller_id_name=Queue,origination_caller_id_number='Queue: %q'}%s",
node->name, node->outbound_name, h->originate_string);
node = create_node(name, imp, globals.sql_mutex);
}
- if ((val = switch_xml_attr(fifo, "outbound_name"))) {
+ if ((val = switch_xml_attr(fifo, "outbound_name")) && !zstr(val)) {
node->outbound_name = switch_core_strdup(node->pool, val);
}