[commit] r8187 - freeswitch/trunk/src/mod/endpoints/mod_sofia
Author: brian Date: Wed Apr 23 18:36:47 2008 New Revision: 8187 Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.h freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c Log: oops Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c ============================================================================== --- freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c (original) +++ freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c Wed Apr 23 18:36:47 2008 @@ -285,7 +285,7 @@ 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 @@ } } - 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), Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.h ============================================================================== --- freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.h (original) +++ freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.h Wed Apr 23 18:36:47 2008 @@ -381,7 +381,6 @@ 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 @@ uint32_t video_count; sofia_dtmf_t dtmf_type; int q850_cause; - char *remote_ip; - int remote_port; }; struct callback_t { Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c ============================================================================== --- freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c (original) +++ freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c Wed Apr 23 18:36:47 2008 @@ -2586,7 +2586,7 @@ 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 @@ 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 @@ } 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); }
participants (1)
-
Freeswitch SVN