} else if (cause == SWITCH_CAUSE_PICKED_OFF || cause == SWITCH_CAUSE_LOSE_RACE) {
switch_snprintf(reason, sizeof(reason), "SIP;cause=200;text=\"Call completed elsewhere\"");
} else {
- switch_snprintf(reason, sizeof(reason), "FreeSWITCH;cause=%d;text=\"%s\"", cause, switch_channel_cause2str(cause));
+ switch_snprintf(reason, sizeof(reason), "%s;cause=%d;text=\"%s\"",
+ tech_pvt->profile->username,
+ cause,
+ switch_channel_cause2str(cause));
}
if (switch_channel_test_flag(channel, CF_ANSWERED)) {
sofia_set_flag_locked(tech_pvt, TFLAG_BYE);
if (sip->sip_reason && sip->sip_reason->re_protocol &&
- (!strcasecmp(sip->sip_reason->re_protocol, "Q.850") || !strcasecmp(sip->sip_reason->re_protocol, "FreeSWITCH")) && sip->sip_reason->re_cause) {
+ (!strcasecmp(sip->sip_reason->re_protocol, "Q.850")
+ || !strcasecmp(sip->sip_reason->re_protocol, "FreeSWITCH")
+ || !strcasecmp(sip->sip_reason->re_protocol, profile->username)) && sip->sip_reason->re_cause) {
tech_pvt->q850_cause = atoi(sip->sip_reason->re_cause);
cause = tech_pvt->q850_cause;
} else {
const char *ip = t38_options->ip;
uint32_t port = t38_options->port;
const char *family = "IP4";
+ const char *username = tech_pvt->profile->username;
if (!ip) {
if (!(ip = tech_pvt->adv_sdp_audio_ip)) {
family = strchr(ip, ':') ? "IP6" : "IP4";
switch_snprintf(buf, sizeof(buf),
"v=0\n"
- "o=FreeSWITCH %010u %010u IN %s %s\n"
- "s=FreeSWITCH\n"
+ "o=%s %010u %010u IN %s %s\n"
+ "s=%s\n"
"c=IN %s %s\n"
"t=0 0\n"
"m=image %d udptl t38\n"
"a=T38FaxUdpEC:%s\n"
"a=T38VendorInfo:%s\n",
+ username,
tech_pvt->owner_id,
tech_pvt->session_id,
family,
ip,
+ username,
family,
ip,
port,
const char *ov_fmtp = switch_channel_get_variable(tech_pvt->channel, "sip_force_video_fmtp");
char srbuf[128] = "";
const char *var_val;
+ const char *username = tech_pvt->profile->username;
if (sofia_test_pflag(tech_pvt->profile, PFLAG_SUPPRESS_CNG) ||
((val = switch_channel_get_variable(tech_pvt->channel, "supress_cng")) && switch_true(val)) ||
family = strchr(ip, ':') ? "IP6" : "IP4";
switch_snprintf(buf, sizeof(buf),
"v=0\n"
- "o=FreeSWITCH %010u %010u IN %s %s\n"
- "s=FreeSWITCH\n"
+ "o=%s %010u %010u IN %s %s\n"
+ "s=%s\n"
"c=IN %s %s\n" "t=0 0\n"
- "%sm=audio %d RTP/%sAVP",
- tech_pvt->owner_id, tech_pvt->session_id, family, ip, family, ip,
+ "%sm=audio %d RTP/%sAVP",
+ username,
+ tech_pvt->owner_id, tech_pvt->session_id, family, ip, username, family, ip,
srbuf,
port,
(!switch_strlen_zero(tech_pvt->local_crypto_key)