]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
[core] don't double set caller-id
authorAnthony Minessale <anthm@signalwire.com>
Sat, 26 Sep 2020 02:09:34 +0000 (02:09 +0000)
committerAndrey Volk <andywolk@gmail.com>
Sat, 23 Oct 2021 19:01:01 +0000 (22:01 +0300)
src/mod/endpoints/mod_verto/mod_verto.c

index 7ff6b1e7993126aac0aea8bda2e32a1f5c0b4cb7..b08f06ae65678be17d895658faba11643df0f598 100644 (file)
@@ -4033,7 +4033,9 @@ static switch_bool_t verto__invite_func(const char *method, cJSON *params, jsock
                        caller_id_name = var;
                }
        } else if (caller_id_name) {
-               switch_event_add_header_string(jsock->params, SWITCH_STACK_BOTTOM, "caller-id-name", caller_id_name);
+               if (!switch_event_get_header(jsock->params, "caller-id-name")) {
+                       switch_event_add_header_string(jsock->params, SWITCH_STACK_BOTTOM, "caller-id-name", caller_id_name);
+               }
        }
 
        if (zstr(caller_id_number)) {