[calls] sip: origin: Don't fetch the contact header repeatedly



commit 2c7569c608c1e3b04ba30df4b38e2b757264f80e
Author: Evangelos Ribeiro Tzaras <devrtz fortysixandtwo eu>
Date:   Fri Jun 17 02:05:06 2022 +0200

    sip: origin: Don't fetch the contact header repeatedly
    
    This somewhat reduces the logspam:
    response to get_params: 200 OK
    
    origin->contact_header

 plugins/sip/calls-sip-origin.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/plugins/sip/calls-sip-origin.c b/plugins/sip/calls-sip-origin.c
index bfece4c8..116eb0ab 100644
--- a/plugins/sip/calls-sip-origin.c
+++ b/plugins/sip/calls-sip-origin.c
@@ -474,7 +474,10 @@ sip_r_register (int              status,
     change_state (origin,
                   CALLS_ACCOUNT_STATE_ONLINE,
                   CALLS_ACCOUNT_STATE_REASON_CONNECTED);
-    nua_get_params (nua, TAG_ANY (), TAG_END ());
+
+    /* Fix for https://github.com/freeswitch/sofia-sip/issues/25 */
+    if (!origin->contact_header)
+      nua_get_params (nua, TAG_ANY (), TAG_END ());
 
     if (sip->sip_contact && sip->sip_contact->m_url && sip->sip_contact->m_url->url_host) {
       g_free (origin->own_ip);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]