]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
Tue Apr 1 06:49:10 EDT 2008 Pekka.Pessi@nokia.com
authorMichael Jerris <mike@jerris.com>
Thu, 3 Apr 2008 22:33:12 +0000 (22:33 +0000)
committerMichael Jerris <mike@jerris.com>
Thu, 3 Apr 2008 22:33:12 +0000 (22:33 +0000)
  * nua_stack.c: include Allow-Events in most messages initiating dialog

  The Allow-Events header is now included with NOTIFY, PUBLISH, REGISTER, and
  initial INVITE, SUBSCRIBE, REFER, and OPTIONS, and also responses to
  SUBSCRIBE, REFER, OPTIONS, and PUBLISH as well as responses to initial
  INVITE and NOTIFY.

  Thanks to Jerry Richards for pointing out the problem.

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@8017 d0543943-73ff-0310-b7d9-9358b9ac24b2

libs/sofia-sip/.update
libs/sofia-sip/libsofia-sip-ua/nua/nua_stack.c

index 18fcffa1fbce570a5798fd8569c82521275dc6a3..053f34d713a7314f1bb47c3e5b9d04c60675b0cf 100644 (file)
@@ -1 +1 @@
-Thu Apr  3 18:31:42 EDT 2008
+Thu Apr  3 18:33:04 EDT 2008
index d52cb2a13d5986f7525942dde8d294b6b8d8df15..65ec3003a68dfe37a5d42567320e4f7f8f6a90fa 100644 (file)
@@ -1707,8 +1707,12 @@ int nua_server_respond(nua_server_request_t *sr, tagi_t const *tags)
           sip_add_dup(msg, sip, (void *)NH_PGET(nh, allow)) < 0)
     ;
   else if (!sip->sip_allow_events && 
-          (method == sip_method_publish || method == sip_method_subscribe) &&
           NH_PGET(nh, allow_events) &&
+          (method == sip_method_publish || method == sip_method_subscribe ||
+           method == sip_method_options || method == sip_method_refer || 
+           (sr->sr_initial &&
+            (method == sip_method_invite ||
+             method == sip_method_notify))) &&
           sip_add_dup(msg, sip, (void *)NH_PGET(nh, allow_events)) < 0)
     ;
   else if (!sip->sip_contact && sr->sr_status < 300 && sr->sr_add_contact &&