mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-05-17 21:33:21 +00:00
cleanup
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@14203 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
ff44ec8482
commit
1ccd61b097
@ -383,7 +383,10 @@ switch_status_t sofia_on_hangup(switch_core_session_t *session)
|
|||||||
} else if (cause == SWITCH_CAUSE_PICKED_OFF || cause == SWITCH_CAUSE_LOSE_RACE) {
|
} else if (cause == SWITCH_CAUSE_PICKED_OFF || cause == SWITCH_CAUSE_LOSE_RACE) {
|
||||||
switch_snprintf(reason, sizeof(reason), "SIP;cause=200;text=\"Call completed elsewhere\"");
|
switch_snprintf(reason, sizeof(reason), "SIP;cause=200;text=\"Call completed elsewhere\"");
|
||||||
} else {
|
} 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)) {
|
if (switch_channel_test_flag(channel, CF_ANSWERED)) {
|
||||||
|
@ -300,7 +300,9 @@ void sofia_handle_sip_i_bye(switch_core_session_t *session, int status,
|
|||||||
sofia_set_flag_locked(tech_pvt, TFLAG_BYE);
|
sofia_set_flag_locked(tech_pvt, TFLAG_BYE);
|
||||||
|
|
||||||
if (sip->sip_reason && sip->sip_reason->re_protocol &&
|
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);
|
tech_pvt->q850_cause = atoi(sip->sip_reason->re_cause);
|
||||||
cause = tech_pvt->q850_cause;
|
cause = tech_pvt->q850_cause;
|
||||||
} else {
|
} else {
|
||||||
|
@ -43,6 +43,7 @@ void sofia_glue_set_image_sdp(private_object_t *tech_pvt, switch_t38_options_t *
|
|||||||
const char *ip = t38_options->ip;
|
const char *ip = t38_options->ip;
|
||||||
uint32_t port = t38_options->port;
|
uint32_t port = t38_options->port;
|
||||||
const char *family = "IP4";
|
const char *family = "IP4";
|
||||||
|
const char *username = tech_pvt->profile->username;
|
||||||
|
|
||||||
if (!ip) {
|
if (!ip) {
|
||||||
if (!(ip = tech_pvt->adv_sdp_audio_ip)) {
|
if (!(ip = tech_pvt->adv_sdp_audio_ip)) {
|
||||||
@ -69,8 +70,8 @@ void sofia_glue_set_image_sdp(private_object_t *tech_pvt, switch_t38_options_t *
|
|||||||
family = strchr(ip, ':') ? "IP6" : "IP4";
|
family = strchr(ip, ':') ? "IP6" : "IP4";
|
||||||
switch_snprintf(buf, sizeof(buf),
|
switch_snprintf(buf, sizeof(buf),
|
||||||
"v=0\n"
|
"v=0\n"
|
||||||
"o=FreeSWITCH %010u %010u IN %s %s\n"
|
"o=%s %010u %010u IN %s %s\n"
|
||||||
"s=FreeSWITCH\n"
|
"s=%s\n"
|
||||||
"c=IN %s %s\n"
|
"c=IN %s %s\n"
|
||||||
"t=0 0\n"
|
"t=0 0\n"
|
||||||
"m=image %d udptl t38\n"
|
"m=image %d udptl t38\n"
|
||||||
@ -84,10 +85,12 @@ void sofia_glue_set_image_sdp(private_object_t *tech_pvt, switch_t38_options_t *
|
|||||||
"a=T38FaxUdpEC:%s\n"
|
"a=T38FaxUdpEC:%s\n"
|
||||||
"a=T38VendorInfo:%s\n",
|
"a=T38VendorInfo:%s\n",
|
||||||
|
|
||||||
|
username,
|
||||||
tech_pvt->owner_id,
|
tech_pvt->owner_id,
|
||||||
tech_pvt->session_id,
|
tech_pvt->session_id,
|
||||||
family,
|
family,
|
||||||
ip,
|
ip,
|
||||||
|
username,
|
||||||
family,
|
family,
|
||||||
ip,
|
ip,
|
||||||
port,
|
port,
|
||||||
@ -119,6 +122,7 @@ void sofia_glue_set_local_sdp(private_object_t *tech_pvt, const char *ip, uint32
|
|||||||
const char *ov_fmtp = switch_channel_get_variable(tech_pvt->channel, "sip_force_video_fmtp");
|
const char *ov_fmtp = switch_channel_get_variable(tech_pvt->channel, "sip_force_video_fmtp");
|
||||||
char srbuf[128] = "";
|
char srbuf[128] = "";
|
||||||
const char *var_val;
|
const char *var_val;
|
||||||
|
const char *username = tech_pvt->profile->username;
|
||||||
|
|
||||||
if (sofia_test_pflag(tech_pvt->profile, PFLAG_SUPPRESS_CNG) ||
|
if (sofia_test_pflag(tech_pvt->profile, PFLAG_SUPPRESS_CNG) ||
|
||||||
((val = switch_channel_get_variable(tech_pvt->channel, "supress_cng")) && switch_true(val)) ||
|
((val = switch_channel_get_variable(tech_pvt->channel, "supress_cng")) && switch_true(val)) ||
|
||||||
@ -166,11 +170,12 @@ void sofia_glue_set_local_sdp(private_object_t *tech_pvt, const char *ip, uint32
|
|||||||
family = strchr(ip, ':') ? "IP6" : "IP4";
|
family = strchr(ip, ':') ? "IP6" : "IP4";
|
||||||
switch_snprintf(buf, sizeof(buf),
|
switch_snprintf(buf, sizeof(buf),
|
||||||
"v=0\n"
|
"v=0\n"
|
||||||
"o=FreeSWITCH %010u %010u IN %s %s\n"
|
"o=%s %010u %010u IN %s %s\n"
|
||||||
"s=FreeSWITCH\n"
|
"s=%s\n"
|
||||||
"c=IN %s %s\n" "t=0 0\n"
|
"c=IN %s %s\n" "t=0 0\n"
|
||||||
"%sm=audio %d RTP/%sAVP",
|
"%sm=audio %d RTP/%sAVP",
|
||||||
tech_pvt->owner_id, tech_pvt->session_id, family, ip, family, ip,
|
username,
|
||||||
|
tech_pvt->owner_id, tech_pvt->session_id, family, ip, username, family, ip,
|
||||||
srbuf,
|
srbuf,
|
||||||
port,
|
port,
|
||||||
(!switch_strlen_zero(tech_pvt->local_crypto_key)
|
(!switch_strlen_zero(tech_pvt->local_crypto_key)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user