wip
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@9884 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
263afcaba8
commit
7a9928f1c3
|
@ -1020,16 +1020,24 @@ void sofia_reg_handle_sip_r_register(int status,
|
||||||
if (sofia_private && sofia_private->gateway) {
|
if (sofia_private && sofia_private->gateway) {
|
||||||
switch (status) {
|
switch (status) {
|
||||||
case 200:
|
case 200:
|
||||||
if (sip && sip->sip_contact && sip->sip_contact->m_expires) {
|
if (sip && sip->sip_contact) { // && sip->sip_contact->m_expires
|
||||||
char *new_expires = (char *) sip->sip_contact->m_expires;
|
sip_contact_t *contact = sip->sip_contact;
|
||||||
uint32_t expi = (uint32_t) atoi(new_expires);
|
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) {
|
if (expi != sofia_private->gateway->freq) {
|
||||||
sofia_private->gateway->freq = expi;
|
sofia_private->gateway->freq = expi;
|
||||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG,
|
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);
|
"Changing expire time to %d by request of proxy %s\n", expi, sofia_private->gateway->register_proxy);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
sofia_private->gateway->state = REG_STATE_REGISTER;
|
sofia_private->gateway->state = REG_STATE_REGISTER;
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue