[Freeswitch-svn] [commit] r9884 - freeswitch/trunk/src/mod/endpoints/mod_sofia
Freeswitch SVN
mikej at freeswitch.org
Tue Oct 7 17:55:59 EDT 2008
Author: mikej
Date: Tue Oct 7 17:55:58 2008
New Revision: 9884
Modified:
freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_reg.c
Log:
wip
Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_reg.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_reg.c (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_reg.c Tue Oct 7 17:55:58 2008
@@ -1020,16 +1020,24 @@
if (sofia_private && sofia_private->gateway) {
switch (status) {
case 200:
- if (sip && sip->sip_contact && sip->sip_contact->m_expires) {
- char *new_expires = (char *) sip->sip_contact->m_expires;
- uint32_t expi = (uint32_t) atoi(new_expires);
-
- if (expi != sofia_private->gateway->freq) {
- sofia_private->gateway->freq = expi;
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG,
- "Changing expire time to %d by request of proxy %s\n", expi, sofia_private->gateway->register_proxy);
+ if (sip && sip->sip_contact) { // && sip->sip_contact->m_expires
+ sip_contact_t *contact = sip->sip_contact;
+ const char *new_expires;
+ uint32_t expi;
+ if (contact->m_next) {
+ //const char *sipip = profile->extsipip ? profile->extsipip : profile->sipip;
+ //find the contact
+ }
+ if (contact->m_expires) {
+ new_expires = contact->m_expires;
+ expi = (uint32_t) atoi(new_expires);
+
+ if (expi != sofia_private->gateway->freq) {
+ sofia_private->gateway->freq = expi;
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG,
+ "Changing expire time to %d by request of proxy %s\n", expi, sofia_private->gateway->register_proxy);
+ }
}
-
}
sofia_private->gateway->state = REG_STATE_REGISTER;
break;
More information about the Freeswitch-svn
mailing list