]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Merged revisions 378565,378585 via svnmerge from
authorAutomerge script <automerge@asterisk.org>
Fri, 4 Jan 2013 22:19:35 +0000 (22:19 +0000)
committerAutomerge script <automerge@asterisk.org>
Fri, 4 Jan 2013 22:19:35 +0000 (22:19 +0000)
file:///srv/subversion/repos/asterisk/trunk

................
  r378565 | elguero | 2013-01-04 15:20:12 -0600 (Fri, 04 Jan 2013) | 27 lines

  Fix SIP Notify Messages To Have The Proper IP Address In The FROM Field

  On a multihomed server when sending a NOTIFY message, we were not figuring out
  which network should be used to contact the peer.

  This patch fixes the problem by calling ast_sip_ouraddrfor() and then
  build_via() so that our NOTIFY message contains the correct IP address.

  Also, a debug message is being added to help follow the call-id changes that
  occur.  This was helpful for confirming that the IP address was set properly
  since the call-id contains the IP address.  It also will be helpful for
  troubleshooting purposes when following a call in the debug logs.

  (closes issue ASTERISK-20805)
  Reported by: Bryan Hunt
  Tested by: Bryan Hunt, Michael L. Young
  Patches:
      asterisk-20805-notify-ip-v2.diff uploaded by Michael L. Young (license 5026)

  Review: https://reviewboard.asterisk.org/r/2255/
  ........

  Merged revisions 378554 from http://svn.asterisk.org/svn/asterisk/branches/1.8
  ........

  Merged revisions 378559 from http://svn.asterisk.org/svn/asterisk/branches/11
................
  r378585 | kmoore | 2013-01-04 16:19:16 -0600 (Fri, 04 Jan 2013) | 13 lines

  Fix pjproject compilation in certain circumstances

  On a fresh checkout of Asterisk 11, running make before ./configure
  could cause the pjproject subdirectory to get in an odd state that
  would prevent compilation. This patch by Tilghman prevents that from
  occurring.

  (closes issue ASTERISK-20681)
Patch-by: Tilghman Lesher
  ........

  Merged revisions 378582 from http://svn.asterisk.org/svn/asterisk/branches/11
................

git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@378586 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c
res/pjproject/aconfigure
res/pjproject/aconfigure.ac
res/pjproject/build/common.mak

index 18c14eacd3f2cb4da13098b3ca202246a442a584..528403d8a8465689c59c6060469d52fd3c094dd1 100644 (file)
@@ -8553,6 +8553,7 @@ static void change_callid_pvt(struct sip_pvt *pvt, const char *callid)
 {
        int in_dialog_container;
        int in_rtp_container;
+       char *oldid = ast_strdupa(pvt->callid);
 
        ao2_lock(dialogs);
        ao2_lock(dialogs_rtpcheck);
@@ -8573,6 +8574,10 @@ static void change_callid_pvt(struct sip_pvt *pvt, const char *callid)
        }
        ao2_unlock(dialogs_rtpcheck);
        ao2_unlock(dialogs);
+
+       if (strcmp(oldid, pvt->callid)) {
+               ast_debug(1, "SIP call-id changed from '%s' to '%s'\n", oldid, pvt->callid);
+       }
 }
 
 /*! \brief Build SIP Call-ID value for a REGISTER transaction */
@@ -21553,7 +21558,12 @@ static char *sip_cli_notify(struct ast_cli_entry *e, int cmd, struct ast_cli_arg
                        }
                }
 
-               /* Recalculate our side, and recalculate Call ID */
+               /* Now that we have the peer's address, set our ip and change callid */
+               ast_sip_ouraddrfor(&p->sa, &p->ourip, p);
+               build_via(p);
+
+               change_callid_pvt(p, NULL);
+
                ast_cli(a->fd, "Sending NOTIFY of type '%s' to '%s'\n", a->argv[2], a->argv[i]);
                sip_scheddestroy(p, SIP_TRANS_TIMEOUT);
                transmit_invite(p, SIP_NOTIFY, 0, 2, NULL);
index 73683e805b7220cbf41b532ed58979d4290fbc01..64cc6f014d0faa92de5d2ef3329e6053962ebc6b 100755 (executable)
@@ -2401,7 +2401,7 @@ test -n "$target_alias" &&
   program_prefix=${target_alias}-
 ac_config_headers="$ac_config_headers pjlib/include/pj/compat/os_auto.h pjlib/include/pj/compat/m_auto.h pjmedia/include/pjmedia/config_auto.h pjmedia/include/pjmedia-codec/config_auto.h pjsip/include/pjsip/sip_autoconf.h"
 
-ac_config_files="$ac_config_files build.mak build/os-auto.mak build/cc-auto.mak pjlib/build/os-auto.mak pjlib-util/build/os-auto.mak pjmedia/build/os-auto.mak pjsip/build/os-auto.mak third_party/build/os-auto.mak third_party/build/portaudio/os-auto.mak"
+ac_config_files="$ac_config_files build.mak build/os-auto.mak pjlib/build/os-auto.mak pjlib-util/build/os-auto.mak pjmedia/build/os-auto.mak pjsip/build/os-auto.mak third_party/build/os-auto.mak third_party/build/portaudio/os-auto.mak"
 
 
 
@@ -7799,7 +7799,6 @@ do
     "pjsip/include/pjsip/sip_autoconf.h") CONFIG_HEADERS="$CONFIG_HEADERS pjsip/include/pjsip/sip_autoconf.h" ;;
     "build.mak") CONFIG_FILES="$CONFIG_FILES build.mak" ;;
     "build/os-auto.mak") CONFIG_FILES="$CONFIG_FILES build/os-auto.mak" ;;
-    "build/cc-auto.mak") CONFIG_FILES="$CONFIG_FILES build/cc-auto.mak" ;;
     "pjlib/build/os-auto.mak") CONFIG_FILES="$CONFIG_FILES pjlib/build/os-auto.mak" ;;
     "pjlib-util/build/os-auto.mak") CONFIG_FILES="$CONFIG_FILES pjlib-util/build/os-auto.mak" ;;
     "pjmedia/build/os-auto.mak") CONFIG_FILES="$CONFIG_FILES pjmedia/build/os-auto.mak" ;;
index 1de41faafa42da08d9c763110f7f3d049d8103d9..a19b84eebaeb33e032e35863a9158bfba4862063 100644 (file)
@@ -13,7 +13,6 @@ AC_CONFIG_HEADER([pjlib/include/pj/compat/os_auto.h
                 ])
 AC_CONFIG_FILES([build.mak 
                 build/os-auto.mak 
-                build/cc-auto.mak
                 pjlib/build/os-auto.mak 
                 pjlib-util/build/os-auto.mak 
                 pjmedia/build/os-auto.mak
index ad6df03e944c91ce6f384ef7cf7cdedea6f3a094..d6000078ead034fffbf9e0dd6d4badeeda8e9730 100644 (file)
@@ -16,15 +16,6 @@ include $(PJDIR)/build/cc-$(CC_NAME).mak
 #
 -include cc-$(CC_NAME).mak
 
-#
-# Include auto configured compiler specification.
-# This will override the compiler settings above.
-# Currently this is made OPTIONAL, to prevent people
-# from getting errors because they don't re-run ./configure
-# after downloading new PJSIP.
-#
--include $(PJDIR)/build/cc-auto.mak
-
 #
 # Include global machine specific definitions
 #