mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-10-11 22:04:13 +00:00
FS-9809: [mod_sofia] url encode caller id number before sticking it in the from header in case we have non url safe chars in the cid number in the caller profile
This commit is contained in:
1 parent
c0423c5877
commit
ad183fdea4
3 files changed
+61
-1
No files matched your search
@@ -860,6 +860,7 @@ switch_status_t sofia_glue_do_invite(switch_core_session_t *session)
|
||||
if (!tech_pvt->from_str) {
|
||||
const char *sipip;
|
||||
const char *format;
|
||||
char *use_cid_num = switch_core_session_url_encode(tech_pvt->session, cid_num);
|
||||
|
||||
sipip = tech_pvt->profile->sipip;
|
||||
|
||||
@@ -873,7 +874,7 @@ switch_status_t sofia_glue_do_invite(switch_core_session_t *session)
|
||||
|
||||
format = strchr(sipip, ':') ? "\"%s\" <sip:%s%s[%s]>" : "\"%s\" <sip:%s%s%s>";
|
||||
|
||||
tech_pvt->from_str = switch_core_session_sprintf(tech_pvt->session, format, cid_name, cid_num, !zstr(cid_num) ? "@" : "", sipip);
|
||||
tech_pvt->from_str = switch_core_session_sprintf(tech_pvt->session, format, cid_name, use_cid_num, !zstr(cid_num) ? "@" : "", sipip);
|
||||
}
|
||||
|
||||
if (from_var) {
|
||||
|
||||
Reference in new issue
Block a user