linphone-developers
[Top][All Lists]
Advanced

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

[Linphone-developers] [PATCH] Add sending of 405 Method Not Allowed on U


From: Hendrik Lippek
Subject: [Linphone-developers] [PATCH] Add sending of 405 Method Not Allowed on UPDATE-Message
Date: Wed, 25 Aug 2010 20:21:49 +0200

From 84e877690fd370db80019d296dc4d0a59857ff1a Mon Sep 17 00:00:00 2001
From: Hendrik Lippek <address@hidden(none)>
Date: Wed, 25 Aug 2010 20:16:17 +0200
Subject: [PATCH] Add sending of 405 Method Not Allowed on UPDATE-Message

Some Servers send an UPDATE when incall and session parameters
are changed. when not replying this, the session will be
terminated after some time.
---
 linphone/coreapi/sal_eXosip2.c |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/linphone/coreapi/sal_eXosip2.c b/linphone/coreapi/sal_eXosip2.c
index 19e3a21..f59c171 100644
--- a/linphone/coreapi/sal_eXosip2.c
+++ b/linphone/coreapi/sal_eXosip2.c
@@ -1237,6 +1237,18 @@ static void call_message_new(Sal *sal, eXosip_event_t *ev){
             eXosip_unlock();
             osip_free(from);
         }
+        if(MSG_IS_UPDATE(ev->request))
+        {
+            osip_message_t *msg = NULL;
+            eXosip_lock();
+            eXosip_call_build_answer (ev->tid, 405, &msg);
+            if(msg!=NULL)
+            {
+                osip_message_set_allow (msg, "INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO");   
+                eXosip_call_send_answer (ev->tid, 405, msg);
+            }
+            eXosip_unlock();
+        }
     }else ms_warning("call_message_new: No request ?");
 }
 
--
1.7.0.4

 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]