[asterisk-commits] seanbright: branch group/asterisk-cpp r169150 - in /team/group/asterisk-cpp: ...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Jan 16 21:26:27 CST 2009


Author: seanbright
Date: Fri Jan 16 21:26:27 2009
New Revision: 169150

URL: http://svn.digium.com/svn-view/asterisk?view=rev&rev=169150
Log:
Merged revisions 168711-168712,168719,168722,168725,168728,168732,168734,168737,168746,168759-168760,168832,168898,168941,168976,169044,169080,169116 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

................
  r168711 | oej | 2009-01-15 12:55:53 -0500 (Thu, 15 Jan 2009) | 4 lines
  
  Clarify some misunderstandings and make it even more clear that you can refer to a peer
  in the register= line.
................
  r168712 | oej | 2009-01-15 13:08:59 -0500 (Thu, 15 Jan 2009) | 3 lines
  
  Make sure that we have the same terminology in sip.conf.sample and the source code warning.
  Thanks Nick Lewis for pointing this out in the bug tracker.
................
  r168719 | tilghman | 2009-01-15 13:39:56 -0500 (Thu, 15 Jan 2009) | 4 lines
  
  Resolve issue with negative vs non-negative length parameters.
  (closes issue #14245)
   Reported by: dveiga
................
  r168722 | oej | 2009-01-15 13:47:14 -0500 (Thu, 15 Jan 2009) | 10 lines
  
  Merged revisions 168721 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
  r168721 | oej | 2009-01-15 19:43:43 +0100 (Tor, 15 Jan 2009) | 2 lines
  
  Meetme actually has realtime but wasn't documented
  
  ........
................
  r168725 | mmichelson | 2009-01-15 14:00:06 -0500 (Thu, 15 Jan 2009) | 17 lines
  
  Remove an unneeded condition for line addition to a SIP request/response
  
  In Asterisk 1.4 and 1.6.0, the sip_request structure had a statically
  allocated buffer to hold the text of the request. There was a check in the
  add_line function to not attempt to write the line into the buffer if we
  did not have room for it.
  
  In trunk and Asterisk versions starting with 1.6.1, an expandable ast_str
  structure is used to hold the text. Since it may grow to fit an arbitrarily
  sized string, this check in add_line is no longer valid.
  
  I found this oddity while attempting to fix issue #14220; however, I do not
  believe that this is the fix for that issue since the output supplied by the
  reporter did not contain the warning message that would be printed had this
  condition been satisfied.
................
  r168728 | mmichelson | 2009-01-15 14:16:29 -0500 (Thu, 15 Jan 2009) | 3 lines
  
  Fix the compactheaders option in sip.conf
................
  r168732 | mmichelson | 2009-01-15 15:00:46 -0500 (Thu, 15 Jan 2009) | 3 lines
  
  Add missing brace
................
  r168734 | kpfleming | 2009-01-15 15:18:53 -0500 (Thu, 15 Jan 2009) | 5 lines
  
  remove the PBX_ODBC logic from the configure script, and add GENERIC_ODCB logic that includes copying the relevant LIB and INCLUDE data from either UnixODBC or iODBC, based on which was found; if both were found, prefer UnixODBC
  
  this stops modules from being linked against both sets of libraries on systems that have both installed
................
  r168737 | murf | 2009-01-15 15:54:59 -0500 (Thu, 15 Jan 2009) | 16 lines
  
  This patch allows null args in ast_expr2 func calls, and fixes commas being converted to pipes, which was 1.4 type stuff.
  
  If the user says count=ENUMLOOKUP(${EXTEN},ALL,c,,enum.mydomain.tld);
  
  then it won't complain about the empty arg (c,,...) and fabled's patch
  won't let it swap the commas for pipes.
  
  Ran it thru my dialplan and no complaints.
  
  
  (closes issue #14169)
  Reported by: fabled
  Patches:
        function-argument-separator-fix.diff uploaded by fabled (license 448)
................
  r168746 | murf | 2009-01-15 19:34:31 -0500 (Thu, 15 Jan 2009) | 20 lines
  
  Merged revisions 168745 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r168745 | murf | 2009-01-15 17:19:12 -0700 (Thu, 15 Jan 2009) | 14 lines
    
    This patch fixes a problem where a goto (or jump, in this case)
    fails a consistency check because it can't find a matching 
    extension. The problem was a missing instruction to end
    the range notation in the code where it converts the pattern
    into a regex and uses the regex code to determine the match.
    
    I tested using the AEL code the user supplied, and now,
    the consistency check passes.
    
    
    (closes issue #14141)
    Reported by: dimas
  ........
................
  r168759 | russell | 2009-01-16 11:18:41 -0500 (Fri, 16 Jan 2009) | 1 line
  
  build in dev mode
................
  r168760 | russell | 2009-01-16 12:09:13 -0500 (Fri, 16 Jan 2009) | 2 lines
  
  Fix a spelling mistake.
................
  r168832 | tilghman | 2009-01-16 13:49:09 -0500 (Fri, 16 Jan 2009) | 13 lines
  
  Merged revisions 168828 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r168828 | tilghman | 2009-01-16 12:41:35 -0600 (Fri, 16 Jan 2009) | 6 lines
    
    Fix the conjugation of Russian and Ukrainian languages.
    (related to issue #12475)
     Reported by: chappell
     Patches: 
           vm_multilang.patch uploaded by chappell (license 8)
  ........
................
  r168898 | mmichelson | 2009-01-16 14:54:39 -0500 (Fri, 16 Jan 2009) | 26 lines
  
  Fix a logic error that occur when using the timerfd interface
  
  This sequence of events posed a problem
  
  timerfd_timer_open
  timerfd_timer_enable_continuous
  timerfd_timer_set_rate
  timerfd_timer_disable_continuous
  
  The reason was that the timing module was written under the assumption
  that timerfd_timer_set_rate would not be called between enabling and
  disabling continuous mode. What happened in this situation was that 
  timerfd_timer_enable_continuous saved off our previously set timer (in this
  situation a 0 timer, meaning it never runs out). Then timerfd_timer_disable_continuous
  would restore this 0 timer, even though it logically should set the timer to be whatever
  was set in timerfd_timer_set_rate.
  
  Now the behavior in timerfd_timer_set_rate is to overwrite the saved timer that may
  or may not have been set in timerfd_timer_enable_continuous. Even if
  timerfd_timer_enable_continuous has not been previously called, this will not harm the
  operation.
  
  Thanks to Terry Wilson for discovering the problem and giving me a really great debug
  capture that pointed out the problem clearly
................
  r168941 | twilson | 2009-01-16 17:16:23 -0500 (Fri, 16 Jan 2009) | 19 lines
  
  Merged revisions 168716 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r168716 | twilson | 2009-01-15 12:22:49 -0600 (Thu, 15 Jan 2009) | 12 lines
    
    Convert call to park_call_full to masq_park_call_announce
    
    Since we removed the AST_PBX_KEEPALIVE return value, we need to use masqueraded
    parking, otherwise we will try to call ast_hangup() in __pbx_run() and in
    do_parking_thread() and then promptly crash.
    (closes issue #14215)
    	Reported by: waverly360	
    	Tested by: otherwiseguy
    (closes issue #14228)
    	Reported by: kobaz
    	Tested by: otherwiseguy
  ........
................
  r168976 | mmichelson | 2009-01-16 17:43:09 -0500 (Fri, 16 Jan 2009) | 26 lines
  
  Merged revisions 168975 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
  r168975 | mmichelson | 2009-01-16 16:42:13 -0600 (Fri, 16 Jan 2009) | 18 lines
  
  Account for possible NULL pointer when we receive a 408 in response to a REGISTER
  
  It may be that by the time we receive a reply to a REGISTER request, the attempt has
  timed out and thus the registry structure pointed to by the corresponding sip_pvt has
  gone away. This situation was handled properly for a 200 OK response, but the 408
  case assumed that the sip_registry struct was non-NULL, thus potentially causing a crash
  
  This commit fixes this assumption and prints out a message to the console if we should
  receive a late 408 response to a REGISTER
  
  
  (closes issue #14211)
  Reported by: aborghi
  Patches:
        14211.diff uploaded by putnopvut (license 60)
  Tested by: aborghi
  
  
  ........
................
  r169044 | twilson | 2009-01-16 19:03:39 -0500 (Fri, 16 Jan 2009) | 8 lines
  
  Fix port :0 added to SIP INVITE URI when outboundproxy used
  
  (closes issue #14233)
  Reported by: chris-mac
  Patches: 
        asterisk-bug14233.diff.txt uploaded by jamesgolovich (license 176)
  Tested by: jamesgolovich, chris-mac, otherwiseguy
................
  r169080 | twilson | 2009-01-16 20:56:36 -0500 (Fri, 16 Jan 2009) | 8 lines
  
  Fix qualify for TCP peer
  
  (closes issue #14192)
  Reported by: pabelanger
  Patches: 
        asterisk-bug14192.diff.txt uploaded by jamesgolovich (license 176)
  Tested by: jamesgolovich
................
  r169116 | seanbright | 2009-01-16 21:52:30 -0500 (Fri, 16 Jan 2009) | 8 lines
  
  Change intializer types.  Found while working on asterisk-cpp.  I have a new
  favorite error message from g++:
  
      pbx_dundi.c:4580: sorry, unimplemented: non-trivial designated
                        initializers not supported
  
  I like it when compilers are apologetic.
................

Modified:
    team/group/asterisk-cpp/   (props changed)
    team/group/asterisk-cpp/CHANGES
    team/group/asterisk-cpp/apps/app_voicemail.c
    team/group/asterisk-cpp/build_tools/menuselect-deps.in
    team/group/asterisk-cpp/cdr/cdr_adaptive_odbc.c
    team/group/asterisk-cpp/cdr/cdr_odbc.c
    team/group/asterisk-cpp/channels/chan_misdn.c
    team/group/asterisk-cpp/channels/chan_sip.c
    team/group/asterisk-cpp/configs/extconfig.conf.sample
    team/group/asterisk-cpp/configs/sip.conf.sample
    team/group/asterisk-cpp/configure
    team/group/asterisk-cpp/configure.ac
    team/group/asterisk-cpp/funcs/func_odbc.c
    team/group/asterisk-cpp/include/asterisk/say.h
    team/group/asterisk-cpp/include/asterisk/strings.h
    team/group/asterisk-cpp/include/asterisk/tcptls.h
    team/group/asterisk-cpp/main/ast_expr2.c
    team/group/asterisk-cpp/main/ast_expr2.y
    team/group/asterisk-cpp/main/features.c
    team/group/asterisk-cpp/main/http.c
    team/group/asterisk-cpp/main/say.c
    team/group/asterisk-cpp/main/tcptls.c
    team/group/asterisk-cpp/makeopts.in
    team/group/asterisk-cpp/pbx/pbx_dundi.c
    team/group/asterisk-cpp/res/ael/pval.c
    team/group/asterisk-cpp/res/res_config_odbc.c
    team/group/asterisk-cpp/res/res_odbc.c
    team/group/asterisk-cpp/res/res_timing_timerfd.c

Propchange: team/group/asterisk-cpp/
------------------------------------------------------------------------------
    automerge = kthxbai

Propchange: team/group/asterisk-cpp/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.

Propchange: team/group/asterisk-cpp/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Fri Jan 16 21:26:27 2009
@@ -1,1 +1,1 @@
-/trunk:1-168708
+/trunk:1-169116

Modified: team/group/asterisk-cpp/CHANGES
URL: http://svn.digium.com/svn-view/asterisk/team/group/asterisk-cpp/CHANGES?view=diff&rev=169150&r1=169149&r2=169150
==============================================================================
--- team/group/asterisk-cpp/CHANGES (original)
+++ team/group/asterisk-cpp/CHANGES Fri Jan 16 21:26:27 2009
@@ -40,7 +40,7 @@
    version received is different from the current SDP session version.  This
    option is required to interoperate with devices that have non-standard SDP
    session version implementations (observed with Microsoft OCS).  This option
-   is diabled by default.
+   is disabled by default.
  * The parsing of register => lines in sip.conf has been modified to allow a port
    to be present in the "user" portion. Please see the sip.conf.sample file for more
    information

Modified: team/group/asterisk-cpp/apps/app_voicemail.c
URL: http://svn.digium.com/svn-view/asterisk/team/group/asterisk-cpp/apps/app_voicemail.c?view=diff&rev=169150&r1=169149&r2=169150
==============================================================================
--- team/group/asterisk-cpp/apps/app_voicemail.c (original)
+++ team/group/asterisk-cpp/apps/app_voicemail.c Fri Jan 16 21:26:27 2009
@@ -47,10 +47,8 @@
 /*** MAKEOPTS
 <category name="MENUSELECT_OPTS_app_voicemail" displayname="Voicemail Build Options" positive_output="yes" remove_on_change="apps/app_voicemail.o apps/app_voicemail.so apps/app_directory.o apps/app_directory.so">
 	<member name="ODBC_STORAGE" displayname="Storage of Voicemail using ODBC">
-		<depend>odbc</depend>
+		<depend>generic_odbc</depend>
 		<depend>ltdl</depend>
-		<use>unixodbc</use>
-		<use>iodbc</use>
 		<conflict>IMAP_STORAGE</conflict>
 		<defaultenabled>no</defaultenabled>
 	</member>
@@ -7176,7 +7174,102 @@
 	return res;
 }
 
-/* Hebrew syntax */
+/* Version of vm_intro() designed to work for many languages.
+ *
+ * It is hoped that this function can prevent the proliferation of 
+ * language-specific vm_intro() functions and in time replace the language-
+ * specific functions which already exist.  An examination of the language-
+ * specific functions revealed that they all corrected the same deficiencies
+ * in vm_intro_en() (which was the default function). Namely:
+ *
+ *  1) The vm-Old and vm-INBOX sound files were overloaded.  The English 
+ *     wording of the voicemail greeting hides this problem.  For example,
+ *     vm-INBOX contains only the word "new".  This means that both of these
+ *     sequences produce valid utterances:
+ *      * vm-youhave digit/1 vm-INBOX vm-message (you have one new message)
+ *      * vm-press digit/1 vm-for vm-INBOX vm-messages (press 1 for new messages)
+ *     However, if we rerecord vm-INBOX to say "the new" (which is unavoidable
+ *     in many languages) the first utterance becomes "you have 1 the new message".
+ *  2) The function contains hardcoded rules for pluralizing the word "message".
+ *     These rules are correct for English, but not for many other languages.
+ *  3) No attempt is made to pluralize the adjectives ("old" and "new") as
+ *     required in many languages.
+ *  4) The gender of the word for "message" is not specified. This is a problem
+ *     because in many languages the gender of the number in phrases such
+ *     as "you have one new message" must match the gender of the word
+ *     meaning "message".
+ *
+ * Fixing these problems for each new language has meant duplication of effort.
+ * This new function solves the problems in the following general ways:
+ *  1) Add new sound files vm-new and vm-old.  These can be linked to vm-INBOX
+ *     and vm-Old respectively for those languages where it makes sense.
+ *  2) Call ast_say_counted_noun() to put the proper gender and number prefix
+ *     on vm-message.
+ *  3) Call ast_say_counted_adjective() to put the proper gender and number
+ *     prefix on vm-new and vm-old (none for English).
+ *  4) Pass the gender of the language's word for "message" as an agument to
+ *     this function which is can in turn pass on to the functions which 
+ *     say numbers and put endings on nounds and adjectives.
+ *
+ * All languages require these messages:
+ *  vm-youhave		"You have..."
+ *  vm-and		"and"
+ *  vm-no		"no" (in the sense of "none", as in "you have no messages")
+ *
+ * To use it for English, you will need these additional sound files:
+ *  vm-new		"new"
+ *  vm-message		"message", singular
+ *  vm-messages		"messages", plural
+ *
+ * If you use it for Russian and other slavic languages, you will need these additional sound files:
+ *
+ *  vm-newn		"novoye" (singular, neuter)
+ *  vm-newx		"novikh" (counting plural form, genative plural)
+ *  vm-message		"sobsheniye" (singular form)
+ *  vm-messagex1	"sobsheniya" (first counting plural form, genative singular)
+ *  vm-messagex2	"sobsheniy" (second counting plural form, genative plural)
+ *  digits/1n		"odno" (neuter singular for phrases such as "one message" or "thirty one messages")
+ *  digits/2n		"dva" (neuter singular)
+ */
+static int vm_intro_multilang(struct ast_channel *chan, struct vm_state *vms, const char message_gender[])
+{
+	int res;
+	int lastnum = 0;
+
+	res = ast_play_and_wait(chan, "vm-youhave");
+
+	if (!res && vms->newmessages) {
+		lastnum = vms->newmessages;
+
+		if (!(res = ast_say_number(chan, lastnum, AST_DIGIT_ANY, chan->language, message_gender))) {
+			res = ast_say_counted_adjective(chan, lastnum, "vm-new", message_gender);
+		}
+
+		if (!res && vms->oldmessages) {
+			res = ast_play_and_wait(chan, "vm-and");
+		}
+	}
+
+	if (!res && vms->oldmessages) {
+		lastnum = vms->oldmessages;
+
+		if (!(res = ast_say_number(chan, lastnum, AST_DIGIT_ANY, chan->language, message_gender))) {
+			res = ast_say_counted_adjective(chan, lastnum, "vm-old", message_gender);
+		}
+	}
+
+	if (!res) {
+		if (lastnum == 0) {
+			res = ast_play_and_wait(chan, "vm-no");
+		} else {
+			res = ast_say_counted_noun(chan, lastnum, "vm-message");
+		}
+	}
+
+	return res;
+}
+
+/* Default Hebrew syntax */
 static int vm_intro_he(struct ast_channel *chan, struct vm_state *vms)
 {
 	int res = 0;
@@ -7859,78 +7952,6 @@
 	return res;
 }
 
-static int get_lastdigits(int num)
-{
-	num %= 100;
-	return (num < 20) ? num : num % 10;
-}
-
-static int vm_intro_ru(struct ast_channel *chan,struct vm_state *vms)
-{
-	int res;
-	int lastnum = 0;
-	int dcnum;
-
-	res = ast_play_and_wait(chan, "vm-youhave");
-	if (!res && vms->newmessages) {
-		lastnum = get_lastdigits(vms->newmessages);
-		dcnum = vms->newmessages - lastnum;
-		if (dcnum)
-			res = say_and_wait(chan, dcnum, chan->language);
-		if (!res && lastnum) {
-			if (lastnum == 1) 
-				res = ast_play_and_wait(chan, "digits/odno");
-			else
-				res = say_and_wait(chan, lastnum, chan->language);
-		}
-
-		if (!res)
-			res = ast_play_and_wait(chan, (lastnum == 1) ? "vm-novoe" : "vm-novyh");
-
-		if (!res && vms->oldmessages)
-			res = ast_play_and_wait(chan, "vm-and");
-	}
-
-	if (!res && vms->oldmessages) {
-		lastnum = get_lastdigits(vms->oldmessages);
-		dcnum = vms->oldmessages - lastnum;
-		if (dcnum)
-			res = say_and_wait(chan, dcnum, chan->language);
-		if (!res && lastnum) {
-			if (lastnum == 1) 
-				res = ast_play_and_wait(chan, "digits/odno");
-			else
-				res = say_and_wait(chan, lastnum, chan->language);
-		}
-
-		if (!res)
-			res = ast_play_and_wait(chan, (lastnum == 1) ? "vm-staroe" : "vm-staryh");
-	}
-
-	if (!res && !vms->newmessages && !vms->oldmessages) {
-		lastnum = 0;
-		res = ast_play_and_wait(chan, "vm-no");
-	}
-
-	if (!res) {
-		switch (lastnum) {
-		case 1:
-			res = ast_play_and_wait(chan, "vm-soobshenie");
-			break;
-		case 2:
-		case 3:
-		case 4:
-			res = ast_play_and_wait(chan, "vm-soobsheniya");
-			break;
-		default:
-			res = ast_play_and_wait(chan, "vm-soobsheniy");
-			break;
-		}
-	}
-
-	return res;
-}
-
 /* CHINESE (Taiwan) syntax */
 static int vm_intro_tw(struct ast_channel *chan, struct vm_state *vms)
 {
@@ -7967,77 +7988,6 @@
 		if (!res)
 			res = ast_play_and_wait(chan, "vm-messages");
 	}
-	return res;
-}
-
-/* UKRAINIAN syntax */
-/* in ukrainian the syntax is different so we need the following files
- * --------------------------------------------------------
- * /digits/ua/1e 'odne'
- * vm-nove       'nove'
- * vm-stare      'stare'
- */
-static int vm_intro_ua(struct ast_channel *chan,struct vm_state *vms)
-{
-	int res;
-	int lastnum = 0;
-	int dcnum;
-
-	res = ast_play_and_wait(chan, "vm-youhave");
-	if (!res && vms->newmessages) {
-		lastnum = get_lastdigits(vms->newmessages);
-		dcnum = vms->newmessages - lastnum;
-		if (dcnum)
-			res = say_and_wait(chan, dcnum, chan->language);
-		if (!res && lastnum) {
-			if (lastnum == 1) 
-				res = ast_play_and_wait(chan, "digits/ua/1e");
-			else
-				res = say_and_wait(chan, lastnum, chan->language);
-		}
-
-		if (!res)
-			res = ast_play_and_wait(chan, (lastnum == 1) ? "vm-nove" : "vm-INBOX");
-
-		if (!res && vms->oldmessages)
-			res = ast_play_and_wait(chan, "vm-and");
-	}
-
-	if (!res && vms->oldmessages) {
-		lastnum = get_lastdigits(vms->oldmessages);
-		dcnum = vms->oldmessages - lastnum;
-		if (dcnum)
-			res = say_and_wait(chan, dcnum, chan->language);
-		if (!res && lastnum) {
-			if (lastnum == 1) 
-				res = ast_play_and_wait(chan, "digits/ua/1e");
-			else
-				res = say_and_wait(chan, lastnum, chan->language);
-		}
-
-		if (!res)
-			res = ast_play_and_wait(chan, (lastnum == 1) ? "vm-stare" : "vm-Old");
-	}
-
-	if (!res && !vms->newmessages && !vms->oldmessages) {
-		lastnum = 0;
-		res = ast_play_and_wait(chan, "vm-no");
-	}
-
-	if (!res) {
-		switch (lastnum) {
-		case 1:
-		case 2:
-		case 3:
-		case 4:
-			res = ast_play_and_wait(chan, "vm-message");
-			break;
-		default:
-			res = ast_play_and_wait(chan, "vm-messages");
-			break;
-		}
-	}
-
 	return res;
 }
 
@@ -8081,11 +8031,11 @@
 	} else if (!strcasecmp(chan->language, "no")) {	/* NORWEGIAN syntax */
 		return vm_intro_no(chan, vms);
 	} else if (!strcasecmp(chan->language, "ru")) { /* RUSSIAN syntax */
-		return vm_intro_ru(chan, vms);
+		return vm_intro_multilang(chan, vms, "n");
 	} else if (!strcasecmp(chan->language, "tw")) { /* CHINESE (Taiwan) syntax */
 		return vm_intro_tw(chan, vms);
 	} else if (!strcasecmp(chan->language, "ua")) { /* UKRAINIAN syntax */
-		return vm_intro_ua(chan, vms);
+		return vm_intro_multilang(chan, vms, "n");
 	} else if (!strcasecmp(chan->language, "he")) { /* HEBREW syntax */
 		 return vm_intro_he(chan, vms);
 	} else {					/* Default to ENGLISH */

Modified: team/group/asterisk-cpp/build_tools/menuselect-deps.in
URL: http://svn.digium.com/svn-view/asterisk/team/group/asterisk-cpp/build_tools/menuselect-deps.in?view=diff&rev=169150&r1=169149&r2=169150
==============================================================================
--- team/group/asterisk-cpp/build_tools/menuselect-deps.in (original)
+++ team/group/asterisk-cpp/build_tools/menuselect-deps.in Fri Jan 16 21:26:27 2009
@@ -3,6 +3,7 @@
 CURL=@PBX_CURL@
 DAHDI=@PBX_DAHDI@
 FREETDS=@PBX_FREETDS@
+GENERIC_ODBC=@PBX_GENERIC_ODBC@
 GMIME=@PBX_GMIME@
 GNU_LD=@GNU_LD@
 GSM=@PBX_GSM@
@@ -24,7 +25,6 @@
 NBS=@PBX_NBS@
 NETSNMP=@PBX_NETSNMP@
 NEWT=@PBX_NEWT@
-ODBC=@PBX_ODBC@
 OGG=@PBX_OGG@
 OPENH323=@PBX_OPENH323@
 OSPTK=@PBX_OSPTK@

Modified: team/group/asterisk-cpp/cdr/cdr_adaptive_odbc.c
URL: http://svn.digium.com/svn-view/asterisk/team/group/asterisk-cpp/cdr/cdr_adaptive_odbc.c?view=diff&rev=169150&r1=169149&r2=169150
==============================================================================
--- team/group/asterisk-cpp/cdr/cdr_adaptive_odbc.c (original)
+++ team/group/asterisk-cpp/cdr/cdr_adaptive_odbc.c Fri Jan 16 21:26:27 2009
@@ -25,9 +25,8 @@
  */
 
 /*** MODULEINFO
-	<depend>odbc</depend>
-	<use>unixodbc</use>
-	<use>iodbc</use>
+	<depend>generic_odbc</depend>
+	<depend>ltdl</depend>
  ***/
 
 #include "asterisk.h"

Modified: team/group/asterisk-cpp/cdr/cdr_odbc.c
URL: http://svn.digium.com/svn-view/asterisk/team/group/asterisk-cpp/cdr/cdr_odbc.c?view=diff&rev=169150&r1=169149&r2=169150
==============================================================================
--- team/group/asterisk-cpp/cdr/cdr_odbc.c (original)
+++ team/group/asterisk-cpp/cdr/cdr_odbc.c Fri Jan 16 21:26:27 2009
@@ -29,10 +29,8 @@
  */
 
 /*** MODULEINFO
-	<depend>odbc</depend>
+	<depend>generic_odbc</depend>
 	<depend>ltdl</depend>
-	<use>unixodbc</use>
-	<use>iodbc</use>
  ***/
 
 #include "asterisk.h"

Modified: team/group/asterisk-cpp/channels/chan_misdn.c
URL: http://svn.digium.com/svn-view/asterisk/team/group/asterisk-cpp/channels/chan_misdn.c?view=diff&rev=169150&r1=169149&r2=169150
==============================================================================
--- team/group/asterisk-cpp/channels/chan_misdn.c (original)
+++ team/group/asterisk-cpp/channels/chan_misdn.c Fri Jan 16 21:26:27 2009
@@ -5493,7 +5493,7 @@
 		}
 
 		if (strlen(args.arg[0]) >= sizeof(ch->bc->fac_out.u.CDeflection.DeflectedToNumber)) {
-			ast_log(LOG_WARNING, "Facility: Number argument too long (up to %d digits are allowed). Ignoring.\n", sizeof(ch->bc->fac_out.u.CDeflection.DeflectedToNumber));
+			ast_log(LOG_WARNING, "Facility: Number argument too long (up to %ld digits are allowed). Ignoring.\n", sizeof(ch->bc->fac_out.u.CDeflection.DeflectedToNumber));
 			return 0;
 		}
 		ch->bc->fac_out.Function = Fac_CD;

Modified: team/group/asterisk-cpp/channels/chan_sip.c
URL: http://svn.digium.com/svn-view/asterisk/team/group/asterisk-cpp/channels/chan_sip.c?view=diff&rev=169150&r1=169149&r2=169150
==============================================================================
--- team/group/asterisk-cpp/channels/chan_sip.c (original)
+++ team/group/asterisk-cpp/channels/chan_sip.c Fri Jan 16 21:26:27 2009
@@ -4806,12 +4806,11 @@
 	/* Get the outbound proxy information */
 	ref_proxy(dialog, obproxy_get(dialog, NULL));
 
-	/* If we have an outbound proxy, don't bother with DNS resolution at all */
-	if (dialog->outboundproxy)
-		return 0;
-
-	/* This address should be updated using dnsmgr */
-	if (sin) {
+	if (dialog->outboundproxy) {
+		/* If we have an outbound proxy, don't bother with DNS resolution at all, but set the port */
+		portno = port ? atoi(port) : (dialog->socket.type & SIP_TRANSPORT_TLS) ? STANDARD_TLS_PORT : STANDARD_SIP_PORT;
+	} else if (sin) {
+		/* This address should be updated using dnsmgr */
 		memcpy(&dialog->sa.sin_addr, &sin->sin_addr, sizeof(dialog->sa.sin_addr));
 		if (!sin->sin_port) {
 			if (ast_strlen_zero(port) || sscanf(port, "%u", &portno) != 1) {
@@ -6875,7 +6874,7 @@
 	if (hostname)
 		*hostname++ = '\0';
 	if (ast_strlen_zero(username) || ast_strlen_zero(hostname)) {
-		ast_log(LOG_WARNING, "Format for registration is [transport://]user[:secret[:authuser]]@host[:port][/contact][~expiry] at line %d\n", lineno);
+		ast_log(LOG_WARNING, "Format for registration is [transport://]user[:secret[:authuser]]@domain[:port][/extension][~expiry] at line %d\n", lineno);
 		return -1;
 	}
 
@@ -8055,11 +8054,13 @@
 		return -1;
 	}
 
+	if (sip_cfg.compactheaders) {
+		var = find_alias(var, var);
+	}
+
 	ast_str_append(&req->data, 0, "%s: %s\r\n", var, value);
 	req->header[req->headers] = req->data->str + req->len;
 
-	if (sip_cfg.compactheaders)
-		var = find_alias(var, var);
 	req->len += strlen(req->header[req->headers]);
 	req->headers++;
 
@@ -8085,10 +8086,6 @@
 	if (!req->lines)
 		/* Add extra empty return */
 		req->len += ast_str_append(&req->data, 0, "\r\n");
-	if (req->len >= sizeof(req->data->str) - 4) {
-		ast_log(LOG_WARNING, "Out of space, can't add anymore\n");
-		return -1;
-	}
 	req->line[req->lines] = req->data->str + req->len;
 	ast_str_append(&req->data, 0, "%s", line);
 	req->len += strlen(req->line[req->lines]);
@@ -16886,7 +16883,11 @@
 		break;
 	case 408:	/* Request timeout */
 		/* Got a timeout response, so reset the counter of failed responses */
-		r->regattempts = 0;
+		if (r) {
+			r->regattempts = 0;
+		} else {
+			ast_log(LOG_WARNING, "Got a 408 response to our REGISTER on call %s after we had destroyed the registry object\n", p->callid);
+		}
 		break;
 	case 423:	/* Interval too brief */
 		r->expiry = atoi(get_header(req, "Min-Expires"));

Modified: team/group/asterisk-cpp/configs/extconfig.conf.sample
URL: http://svn.digium.com/svn-view/asterisk/team/group/asterisk-cpp/configs/extconfig.conf.sample?view=diff&rev=169150&r1=169149&r2=169150
==============================================================================
--- team/group/asterisk-cpp/configs/extconfig.conf.sample (original)
+++ team/group/asterisk-cpp/configs/extconfig.conf.sample Fri Jan 16 21:26:27 2009
@@ -56,6 +56,7 @@
 ;sipregs => odbc,asterisk
 ;voicemail => odbc,asterisk
 ;extensions => odbc,asterisk
+;meetme => mysql,conferences
 ;queues => odbc,asterisk
 ;queue_members => odbc,asterisk
 ;musiconhold => mysql,asterisk

Modified: team/group/asterisk-cpp/configs/sip.conf.sample
URL: http://svn.digium.com/svn-view/asterisk/team/group/asterisk-cpp/configs/sip.conf.sample?view=diff&rev=169150&r1=169149&r2=169150
==============================================================================
--- team/group/asterisk-cpp/configs/sip.conf.sample (original)
+++ team/group/asterisk-cpp/configs/sip.conf.sample Fri Jan 16 21:26:27 2009
@@ -413,16 +413,20 @@
 ;----------------------------------------- OUTBOUND SIP REGISTRATIONS  ------------------------
 ; Asterisk can register as a SIP user agent to a SIP proxy (provider)
 ; Format for the register statement is:
-;       register => [transport://]user[:secret[:authuser]]@host[:port][/extension][~expiry]
+;       register => [transport://]user[:secret[:authuser]]@domain[:port][/extension][~expiry]
 ;
 ; 
+;
+; domain is either 
+;	- domain in DNS
+; 	- host name in DNS
+;	- the name of a peer defined below or in realtime
+; The domain is where you register your username, so your SIP uri you are registering to 
+; is username at domain
 ;
 ; If no extension is given, the 's' extension is used. The extension needs to
 ; be defined in extensions.conf to be able to accept calls from this SIP proxy
 ; (provider).
-;
-; host is either a host name defined in DNS or the name of a section defined
-; below.
 ;
 ; A similar effect can be achieved by adding a "callbackextension" option in a peer section.
 ; this is equivalent to having the following line in the general section:

Modified: team/group/asterisk-cpp/configure.ac
URL: http://svn.digium.com/svn-view/asterisk/team/group/asterisk-cpp/configure.ac?view=diff&rev=169150&r1=169149&r2=169150
==============================================================================
--- team/group/asterisk-cpp/configure.ac (original)
+++ team/group/asterisk-cpp/configure.ac Fri Jan 16 21:26:27 2009
@@ -1319,12 +1319,6 @@
 
 AST_EXT_LIB_CHECK([UNIXODBC], [odbc], [SQLConnect], [sql.h], [])
 
-PBX_ODBC=0
-if test "$PBX_IODBC" = "1" -o "$PBX_UNIXODBC" = "1"; then
-   PBX_ODBC=1
-fi
-AC_SUBST(PBX_ODBC)
-
 AST_EXT_LIB_CHECK([OGG], [ogg], [ogg_sync_init], [])
 
 # Non-glibc platforms require libexecinfo for backtrace support
@@ -1684,6 +1678,25 @@
    fi
 fi
 
+# build a GENERIC_ODBC result based on the presence of either UnixODBC (preferred)
+# or iODBC
+
+PBX_GENERIC_ODBC=0
+
+if test "${PBX_UNIXODBC}" = 1; then
+   PBX_GENERIC_ODBC=1
+   GENERIC_ODBC_LIB="${UNIXODBC_LIB}"
+   GENERIC_ODBC_INCLUDE="${UNIXODBC_INCLUDE}"
+elif test "${PBX_IODBC}" = 1; then
+   PBX_GENERIC_ODBC=1
+   GENERIC_ODBC_LIB="${IODBC_LIB}"
+   GENERIC_ODBC_INCLUDE="${IODBC_INCLUDE}"
+fi
+
+AC_SUBST([GENERIC_ODBC_LIB])
+AC_SUBST([GENERIC_ODBC_INCLUDE])
+AC_SUBST([PBX_GENERIC_ODBC])
+
 AC_CONFIG_FILES([build_tools/menuselect-deps makeopts channels/h323/Makefile])
 AST_CHECK_MANDATORY
 

Modified: team/group/asterisk-cpp/funcs/func_odbc.c
URL: http://svn.digium.com/svn-view/asterisk/team/group/asterisk-cpp/funcs/func_odbc.c?view=diff&rev=169150&r1=169149&r2=169150
==============================================================================
--- team/group/asterisk-cpp/funcs/func_odbc.c (original)
+++ team/group/asterisk-cpp/funcs/func_odbc.c Fri Jan 16 21:26:27 2009
@@ -27,11 +27,7 @@
  */
 
 /*** MODULEINFO
-	<depend>odbc</depend>
-	<depend>ltdl</depend>
 	<depend>res_odbc</depend>
-	<use>unixodbc</use>
-	<use>iodbc</use>
  ***/
 
 #define USE_ODBC

Modified: team/group/asterisk-cpp/include/asterisk/say.h
URL: http://svn.digium.com/svn-view/asterisk/team/group/asterisk-cpp/include/asterisk/say.h?view=diff&rev=169150&r1=169149&r2=169150
==============================================================================
--- team/group/asterisk-cpp/include/asterisk/say.h (original)
+++ team/group/asterisk-cpp/include/asterisk/say.h Fri Jan 16 21:26:27 2009
@@ -159,4 +159,8 @@
 
 SAY_EXTERN int (* ast_say_date_with_format)(struct ast_channel *chan, time_t t, const char *ints, const char *lang, const char *format, const char *timezone) SAY_INIT(ast_say_date_with_format);
 
+int ast_say_counted_noun(struct ast_channel *chan, int num, const char *noun);
+
+int ast_say_counted_adjective(struct ast_channel *chan, int num, const char *adjective, const char *gender);
+
 #endif /* _ASTERISK_SAY_H */

Modified: team/group/asterisk-cpp/include/asterisk/strings.h
URL: http://svn.digium.com/svn-view/asterisk/team/group/asterisk-cpp/include/asterisk/strings.h?view=diff&rev=169150&r1=169149&r2=169150
==============================================================================
--- team/group/asterisk-cpp/include/asterisk/strings.h (original)
+++ team/group/asterisk-cpp/include/asterisk/strings.h Fri Jan 16 21:26:27 2009
@@ -765,17 +765,18 @@
 #include <sqlext.h>
 #include <sqltypes.h>
 
-AST_INLINE_API(SQLRETURN ast_str_SQLGetData(struct ast_str **buf, size_t maxlen, SQLHSTMT StatementHandle, SQLUSMALLINT ColumnNumber, SQLSMALLINT TargetType, SQLLEN *StrLen_or_Ind),
+AST_INLINE_API(SQLRETURN ast_str_SQLGetData(struct ast_str **buf, int pmaxlen, SQLHSTMT StatementHandle, SQLUSMALLINT ColumnNumber, SQLSMALLINT TargetType, SQLLEN *StrLen_or_Ind),
 {
 	SQLRETURN res;
-	if (maxlen == 0) {
+	size_t maxlen;
+	if (pmaxlen == 0) {
 		if (SQLGetData(StatementHandle, ColumnNumber, TargetType, (*buf)->__AST_STR_STR, 0, StrLen_or_Ind) == SQL_SUCCESS_WITH_INFO) {
 			ast_str_make_space(buf, *StrLen_or_Ind + 1);
 		}
-		maxlen = (*buf)->__AST_STR_LEN;
-	} else if (maxlen > 0) {
-		ast_str_make_space(buf, maxlen);
-	}
+	} else if (pmaxlen > 0) {
+		ast_str_make_space(buf, pmaxlen);
+	}
+	maxlen = (*buf)->__AST_STR_LEN;
 	res = SQLGetData(StatementHandle, ColumnNumber, TargetType, (*buf)->__AST_STR_STR, maxlen, StrLen_or_Ind);
 	(*buf)->__AST_STR_USED = *StrLen_or_Ind;
 	return res;

Modified: team/group/asterisk-cpp/include/asterisk/tcptls.h
URL: http://svn.digium.com/svn-view/asterisk/team/group/asterisk-cpp/include/asterisk/tcptls.h?view=diff&rev=169150&r1=169149&r2=169150
==============================================================================
--- team/group/asterisk-cpp/include/asterisk/tcptls.h (original)
+++ team/group/asterisk-cpp/include/asterisk/tcptls.h Fri Jan 16 21:26:27 2009
@@ -119,7 +119,7 @@
 		tls_cfg(tls_cfg_arg), accept_fd(accept_fd_arg), poll_timeout(poll_timeout_arg), master(master_arg),
 		accept_fn(accept_fn_arg), periodic_fn(periodic_fn_arg), worker_fn(worker_fn_arg), name(name_arg) {}
 	struct sockaddr_in local_address;
-	struct sockaddr_in old_local_address;
+	struct sockaddr_in old_address; /*!< copy of the local or remote address depending on if its a client or server session */
 	struct sockaddr_in remote_address;
 	char hostname[MAXHOSTNAMELEN]; /*!< only necessary for SSL clients so we can compare to common name */
 	struct ast_tls_config *tls_cfg; /*!< points to the SSL configuration if any */

Modified: team/group/asterisk-cpp/main/ast_expr2.c
URL: http://svn.digium.com/svn-view/asterisk/team/group/asterisk-cpp/main/ast_expr2.c?view=diff&rev=169150&r1=169149&r2=169150
==============================================================================
--- team/group/asterisk-cpp/main/ast_expr2.c (original)
+++ team/group/asterisk-cpp/main/ast_expr2.c Fri Jan 16 21:26:27 2009
@@ -728,7 +728,7 @@
 /* YYNNTS -- Number of nonterminals.  */
 #define YYNNTS  4
 /* YYNRULES -- Number of rules.  */
-#define YYNRULES  27
+#define YYNRULES  28
 /* YYNRULES -- Number of states.  */
 #define YYNSTATES  54
 
@@ -778,32 +778,33 @@
    YYRHS.  */
 static const yytype_uint8 yyprhs[] =
 {
-       0,     0,     3,     5,     6,     8,    12,    17,    19,    23,
-      27,    31,    35,    39,    43,    47,    51,    55,    59,    63,
-      66,    69,    73,    77,    81,    85,    89,    95
+       0,     0,     3,     5,     6,     8,    12,    15,    20,    22,
+      26,    30,    34,    38,    42,    46,    50,    54,    58,    62,
+      66,    69,    72,    76,    80,    84,    88,    92,    98
 };
 
 /* YYRHS -- A `-1'-separated list of the rules' RHS.  */
 static const yytype_int8 yyrhs[] =
 {
       27,     0,    -1,    29,    -1,    -1,    29,    -1,    28,     3,
-      29,    -1,    25,    23,    28,    24,    -1,    25,    -1,    23,
-      29,    24,    -1,    29,     6,    29,    -1,    29,     7,    29,
-      -1,    29,    13,    29,    -1,    29,    12,    29,    -1,    29,
-      11,    29,    -1,    29,    10,    29,    -1,    29,     9,    29,
-      -1,    29,     8,    29,    -1,    29,    15,    29,    -1,    29,
-      14,    29,    -1,    14,    29,    -1,    19,    29,    -1,    29,
-      18,    29,    -1,    29,    17,    29,    -1,    29,    16,    29,
-      -1,    29,    22,    29,    -1,    29,    21,    29,    -1,    29,
-       5,    29,     4,    29,    -1,    29,    20,    29,    -1
+      29,    -1,    28,     3,    -1,    25,    23,    28,    24,    -1,
+      25,    -1,    23,    29,    24,    -1,    29,     6,    29,    -1,
+      29,     7,    29,    -1,    29,    13,    29,    -1,    29,    12,
+      29,    -1,    29,    11,    29,    -1,    29,    10,    29,    -1,
+      29,     9,    29,    -1,    29,     8,    29,    -1,    29,    15,
+      29,    -1,    29,    14,    29,    -1,    14,    29,    -1,    19,
+      29,    -1,    29,    18,    29,    -1,    29,    17,    29,    -1,
+      29,    16,    29,    -1,    29,    22,    29,    -1,    29,    21,
+      29,    -1,    29,     5,    29,     4,    29,    -1,    29,    20,
+      29,    -1
 };
 
 /* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
 static const yytype_uint16 yyrline[] =
 {
-       0,   358,   358,   366,   373,   374,   383,   389,   390,   394,
-     398,   402,   406,   410,   414,   418,   422,   426,   430,   434,
-     438,   442,   446,   450,   454,   458,   462,   467
+       0,   358,   358,   366,   373,   374,   380,   389,   395,   396,
+     400,   404,   408,   412,   416,   420,   424,   428,   432,   436,
+     440,   444,   448,   452,   456,   460,   464,   468,   473
 };
 #endif
 
@@ -834,17 +835,17 @@
 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
 static const yytype_uint8 yyr1[] =
 {
-       0,    26,    27,    27,    28,    28,    29,    29,    29,    29,
+       0,    26,    27,    27,    28,    28,    28,    29,    29,    29,
       29,    29,    29,    29,    29,    29,    29,    29,    29,    29,
-      29,    29,    29,    29,    29,    29,    29,    29
+      29,    29,    29,    29,    29,    29,    29,    29,    29
 };
 
 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN.  */
 static const yytype_uint8 yyr2[] =
 {
-       0,     2,     1,     0,     1,     3,     4,     1,     3,     3,
-       3,     3,     3,     3,     3,     3,     3,     3,     3,     2,
-       2,     3,     3,     3,     3,     3,     5,     3
+       0,     2,     1,     0,     1,     3,     2,     4,     1,     3,
+       3,     3,     3,     3,     3,     3,     3,     3,     3,     3,
+       2,     2,     3,     3,     3,     3,     3,     5,     3
 };
 
 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
@@ -852,12 +853,12 @@
    means the default is an error.  */
 static const yytype_uint8 yydefact[] =
 {
-       3,     0,     0,     0,     7,     0,     2,    19,    20,     0,
+       3,     0,     0,     0,     8,     0,     2,    20,    21,     0,
        0,     1,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     8,
-       0,     4,     0,     9,    10,    16,    15,    14,    13,    12,
-      11,    18,    17,    23,    22,    21,    27,    25,    24,     0,
-       6,     0,     5,    26
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     9,
+       0,     4,     0,    10,    11,    17,    16,    15,    14,    13,
+      12,    19,    18,    24,    23,    22,    28,    26,    25,     6,
+       7,     0,     5,    27
 };
 
 /* YYDEFGOTO[NTERM-NUM].  */
@@ -1458,117 +1459,117 @@
       case 4: /* "TOK_COLONCOLON" */

[... 873 lines stripped ...]



More information about the asterisk-commits mailing list