git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@8187 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Brian West 2008-04-23 22:36:47 +00:00
parent 2303545ccf
commit 9066389721
3 changed files with 2 additions and 19 deletions

View File

@ -285,7 +285,7 @@ switch_status_t sofia_on_hangup(switch_core_session_t *session)
if (switch_test_flag(tech_pvt, TFLAG_ANS)) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Sending BYE to %s\n", switch_channel_get_name(channel));
nua_bye(tech_pvt->nh, SIPTAG_RECORD_ROUTE_STR(tech_pvt->record_route), SIPTAG_REASON_STR(reason), TAG_END());
nua_bye(tech_pvt->nh, SIPTAG_REASON_STR(reason), TAG_END());
} else {
if (switch_test_flag(tech_pvt, TFLAG_OUTBOUND)) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Sending CANCEL to %s\n", switch_channel_get_name(channel));
@ -386,9 +386,7 @@ static switch_status_t sofia_answer_channel(switch_core_session_t *session)
}
}
printf("XXXXXXXXXXXXXXXXXXXXXXXXWTF [%s]\n", tech_pvt->record_route);
nua_respond(tech_pvt->nh, SIP_200_OK,
SIPTAG_RECORD_ROUTE_STR(tech_pvt->record_route),
NUTAG_AUTOANSWER(0),
NUTAG_SESSION_TIMER(session_timeout),
SIPTAG_CONTACT_STR(tech_pvt->reply_contact),

View File

@ -381,7 +381,6 @@ struct private_object {
char *gateway_name;
char *local_crypto_key;
char *remote_crypto_key;
char *record_route;
int crypto_tag;
unsigned char local_raw_key[SWITCH_RTP_MAX_CRYPTO_LEN];
unsigned char remote_raw_key[SWITCH_RTP_MAX_CRYPTO_LEN];
@ -422,8 +421,6 @@ struct private_object {
uint32_t video_count;
sofia_dtmf_t dtmf_type;
int q850_cause;
char *remote_ip;
int remote_port;
};
struct callback_t {

View File

@ -2586,7 +2586,7 @@ void sofia_handle_sip_i_invite(nua_t *nua, sofia_profile_t *profile, nua_handle_
uint32_t sess_max = switch_core_session_limit(0);
int is_auth = 0, calling_myself = 0;
su_addrinfo_t *my_addrinfo = msg_addrinfo(nua_current_request(nua));
int network_port = 0;
if (sess_count >= sess_max || !(profile->pflags & PFLAG_RUNNING)) {
nua_respond(nh, 503, "Maximum Calls In Progress", SIPTAG_RETRY_AFTER_STR("300"), TAG_END());
@ -2601,7 +2601,6 @@ void sofia_handle_sip_i_invite(nua_t *nua, sofia_profile_t *profile, nua_handle_
get_addr(network_ip, sizeof(network_ip), &((struct sockaddr_in *) my_addrinfo->ai_addr)->sin_addr);
network_port = ntohs(((struct sockaddr_in *) msg_addrinfo(nua_current_request(nua))->ai_addr)->sin_port);
if (profile->acl_count) {
uint32_t x = 0;
@ -2650,17 +2649,6 @@ void sofia_handle_sip_i_invite(nua_t *nua, sofia_profile_t *profile, nua_handle_
}
switch_mutex_init(&tech_pvt->flag_mutex, SWITCH_MUTEX_NESTED, switch_core_session_get_pool(session));
tech_pvt->remote_ip = switch_core_session_strdup(session, network_ip);
tech_pvt->remote_port = network_port;
if (sip->sip_contact && sip->sip_contact->m_url) {
tech_pvt->record_route = switch_core_session_sprintf(session, "<sip:%s@%s:%d;lr>",
sip->sip_contact->m_url->url_user,
tech_pvt->remote_ip,
tech_pvt->remote_port);
}
if (*key != '\0') {
tech_pvt->key = switch_core_session_strdup(session, key);
}