[svn-commits] murf: branch murf/bug11210 r121750 - in /team/murf/bug11210: ./ apps/ build_t...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Tue Jun 10 23:45:14 CDT 2008


Author: murf
Date: Tue Jun 10 23:45:13 2008
New Revision: 121750

URL: http://svn.digium.com/view/asterisk?view=rev&rev=121750
Log:
Merged revisions 121197,121230,121279,121282,121284-121286,121334,121365,121367,121401-121403,121407,121439,121441,121444,121496,121501,121503,121555,121559,121597,121599,121649,121683,121716 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

................
r121197 | mvanbaak | 2008-06-08 05:40:44 -0600 (Sun, 08 Jun 2008) | 12 lines

add a new argument to PrivacyManager to specify a context
where the entered phone number is checked.

You can now define a set of extensions/exten patterns that describe
valid phone numbers. PrivacyManager will check that context for a match
with the given phone number.
This way you get better control. For example people blindly hitting
10 digits just to get past privacymanager

Example line in extensions.conf:
exten => incoming,n,PrivacyManager(3,10,,route-outgoing)

................
r121230 | mmichelson | 2008-06-09 09:08:58 -0600 (Mon, 09 Jun 2008) | 27 lines

Merged revisions 121229 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

(Note that this is being merged to trunk/1.6.0 because
it may affect non-callback agents with ackcall set)

........
r121229 | mmichelson | 2008-06-09 10:02:37 -0500 (Mon, 09 Jun 2008) | 16 lines

A unique situation of timeouts brought forth a failure situation for
autologoff in chan_agent. If using AgentCallbackLogin-style agents, 
then if the timeout specified by the Dial() to reach the agent's phone
was shorter than the timeout specified in queues.conf, then autologoff
would only work if the caller hung up while the agent's phone was ringing.
This patch allows autologoff to work in this situation when the call in
queue transfers to the next available agent (as it would have if the timeout
in queues.conf were less than the timeout in the Dial()).

(closes issue #12754)
Reported by: Rodrigo
Patches:
      12754.patch uploaded by putnopvut (license 60)
Tested by: Rodrigo


........

................
r121279 | tilghman | 2008-06-09 10:35:06 -0600 (Mon, 09 Jun 2008) | 6 lines

Implement FINDLABEL matching for the new extension matching engine.
(closes issue #12800)
 Reported by: chris-mac
 Patches: 
       20080608__bug12800.diff.txt uploaded by Corydon76 (license 14)

................
r121282 | russell | 2008-06-09 10:37:08 -0600 (Mon, 09 Jun 2008) | 18 lines

Merged revisions 121280 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r121280 | russell | 2008-06-09 11:35:40 -0500 (Mon, 09 Jun 2008) | 10 lines

Do not attempt to do emulation if an END digit is received and the length is
less than the defined minimum digit length, and the other end only wants END
digits (SIP INFO, for example).

(closes issue #12778)
Reported by: tsearle
Patches:
      12778.rev1.txt uploaded by russell (license 2)
Tested by: tsearle

........

................
r121284 | russell | 2008-06-09 10:48:26 -0600 (Mon, 09 Jun 2008) | 3 lines

Minor formatting change to test a mantis change ...
(closes issue #12824)

................
r121285 | russell | 2008-06-09 10:53:26 -0600 (Mon, 09 Jun 2008) | 4 lines

arbitrary formatting change to test a mantis change

(closes issue #12824)

................
r121286 | russell | 2008-06-09 10:55:15 -0600 (Mon, 09 Jun 2008) | 3 lines

arbitrary formatting change to test mantis change
(closes issue #12824)

................
r121334 | tilghman | 2008-06-09 13:33:23 -0600 (Mon, 09 Jun 2008) | 3 lines

Add storage of the useragent in the realtime database.
(Closes AST-38)

................
r121365 | twilson | 2008-06-09 16:42:08 -0600 (Mon, 09 Jun 2008) | 2 lines

Initialize the lock and destroy lock and cond in the destructor (thanks, mmichelson)

................
r121367 | tilghman | 2008-06-09 16:51:59 -0600 (Mon, 09 Jun 2008) | 2 lines

Expand RQ_INTEGER type out to multiple types, one for each precision

................
r121401 | russell | 2008-06-09 18:29:01 -0600 (Mon, 09 Jun 2008) | 2 lines

Change system header includes to be like how it is done in other files

................
r121402 | russell | 2008-06-09 18:31:30 -0600 (Mon, 09 Jun 2008) | 2 lines

Properly initialize the cli_ping condition and lock

................
r121403 | russell | 2008-06-09 18:43:06 -0600 (Mon, 09 Jun 2008) | 4 lines

Merge a couple of configure script checks in from team/russell/events.  This adds
the checks for the CLM and EVT services from the SAForum AIS.  I'm going to work
on merging in changes from this branch in pieces.

................
r121407 | russell | 2008-06-09 18:52:46 -0600 (Mon, 09 Jun 2008) | 2 lines

Bump up the debug level of a couple of messages

................
r121439 | russell | 2008-06-10 06:48:50 -0600 (Tue, 10 Jun 2008) | 13 lines

Merge another change from team/russell/events ...

DUNDi uses a concept called the Entity ID for unique server identifiers.  I have
pulled out the handling of EIDs and made it something available to all of Asterisk.
There is now a global Entity ID that can be used for other purposes as well, such
as code providing distributed device state, which is why I did this.  The global
Entity ID is set automatically, just like it was done in DUNDi, but it can also be
set in asterisk.conf.  DUNDi will now use this global EID unless one is specified
in dundi.conf.

The current EID for the system can be seen in the "core show settings" CLI command.
It is also available in the dialplan via the ENTITYID variable.

................
r121441 | russell | 2008-06-10 06:50:07 -0600 (Tue, 10 Jun 2008) | 3 lines

Update dundi.conf to indicate that the asterisk.conf entityid option can be used
to set the entityid used in DUNDi, as well.

................
r121444 | file | 2008-06-10 06:54:39 -0600 (Tue, 10 Jun 2008) | 12 lines

Merged revisions 121442 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r121442 | file | 2008-06-10 09:52:06 -0300 (Tue, 10 Jun 2008) | 4 lines

Update BRIDGEPEER variable before we do a generic bridge in case we just broke out of a native bridge and fell through to generic.
(closes issue #12815)
Reported by: ramonpeek

........

................
r121496 | file | 2008-06-10 07:36:13 -0600 (Tue, 10 Jun 2008) | 12 lines

Merged revisions 121495 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r121495 | file | 2008-06-10 10:34:27 -0300 (Tue, 10 Jun 2008) | 4 lines

If we are destroying a dialog only set the MWI dialog pointer on the related peer to NULL if it is the dialog currently being destroyed.
(closes issue #12828)
Reported by: ramonpeek

........

................
r121501 | russell | 2008-06-10 08:06:29 -0600 (Tue, 10 Jun 2008) | 9 lines

Merge another change from team/russell/events

This commit breaks out some logic from pbx.c into a simple API.  The hint
processing code had logic for taking the state from multiple devices and
turning that into the state for a single extension.  So, I broke this out
and made an API that lets you take multiple device states and determine
the aggregate device state.  I needed this for some core device state changes
to support distributed device state.

................
r121503 | file | 2008-06-10 08:11:16 -0600 (Tue, 10 Jun 2008) | 7 lines

Fix issue where session timer headers were present when they should not have been.
(closes issue #12706)
Reported by: falves11
Patches:
      chan_sip.c.diff uploaded by rjain (license 226)
Tested by: falves11

................
r121555 | russell | 2008-06-10 08:53:40 -0600 (Tue, 10 Jun 2008) | 22 lines

Merge some more changes from team/russell/events

This commit pulls in a batch of improvements and additions to the event API.
Changes include:
 - the ability to dynamically build a subscription.  This is useful if you're
    building a subscription based on something you receive from the network,
    or from options in a configuration file.
 - Add tables of event types and IE types and the corresponding string
    representation for implementing text based protocols that use these
	events, for showing events on the CLI, reading configuration that
	references event information, among other things.
 - Add a table that maps IE types and the corresponding payload type.
 - an API call to get the total size of an event
 - an API call to get all events from the cache that match a subscription
 - a new IE payload type, raw, which I used for transporting the Entity ID in
    my code for handling distributed device state.
 - Code improvements to reduce code duplication
 - Include the Entity ID of the server that originated the event in every event
 - an additional event type, DEVICE_STATE_CHANGE, to help facilitate distributed
    device state.  DEVICE_STATE is a state change on one server, DEVICE_STATE_CHANGE
	is the aggregate device state change across all servers.

................
r121559 | russell | 2008-06-10 09:12:17 -0600 (Tue, 10 Jun 2008) | 24 lines

Merge another big set of changes from team/russell/events

This commit merges in the rest of the code needed to support distributed device
state.  There are two main parts to this commit.

Core changes:
 - The device state handling in the core has been updated to understand device
   state across a cluster of Asterisk servers.  Every time the state of a device
   changes, it looks at all of the device states on each node, and determines the
   aggregate device state.  That resulting device state is what is provided to
   modules in Asterisk that take actions based on the state of a device.

New module, res_ais:
 - A module has been written to facilitate the communication of events between
   nodes in a cluster of Asterisk servers.  This module uses the SAForum AIS
   (Service Availability Forum Application Interface Specification) CLM and EVT
   services (Cluster Management and Event) to handle this task.  This module
   currently supports sharing Voicemail MWI (Message Waiting Indication) and
   device state events between servers.  It has been tested with openais, though
   other implementations of the spec do exist.

For more information on testing distributed device state, see the following doc:
  - doc/distributed_devstate.txt

................
r121597 | seanbright | 2008-06-10 12:35:37 -0600 (Tue, 10 Jun 2008) | 14 lines

Merged revisions 121596 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r121596 | seanbright | 2008-06-10 14:34:45 -0400 (Tue, 10 Jun 2008) | 6 lines

Fixes a problem with some buggy versions of GNU awk (3.1.3) not liking carriage returns in scripts.

(closes issue #12749)
Reported by: alinux
Tested by: Laureano (on #asterisk-dev), juggie

........

................
r121599 | juggie | 2008-06-10 13:03:11 -0600 (Tue, 10 Jun 2008) | 2 lines

Revision 117802 changed frame.data to frame.data.ptr however codec_ilbc.c was not updated.  This resolves that oversight.

................
r121649 | mmichelson | 2008-06-10 13:52:21 -0600 (Tue, 10 Jun 2008) | 4 lines

Add an additional sanity check in case an event is passed between 
Asterisk boxes with mismatched ie_maps.


................
r121683 | tilghman | 2008-06-10 15:14:58 -0600 (Tue, 10 Jun 2008) | 4 lines

Move the table cache routines to res_odbc, so they can be used from other
places (app_voicemail, for example).
(Related to bug #11678)

................
r121716 | russell | 2008-06-10 15:51:06 -0600 (Tue, 10 Jun 2008) | 2 lines

don't refer to asterisk-events, as that implies that the code was checked out from a branch

................

Added:
    team/murf/bug11210/configs/ais.conf.sample
      - copied unchanged from r121716, trunk/configs/ais.conf.sample
    team/murf/bug11210/doc/distributed_devstate.txt
      - copied unchanged from r121716, trunk/doc/distributed_devstate.txt
    team/murf/bug11210/res/ais/
      - copied from r121716, trunk/res/ais/
    team/murf/bug11210/res/ais/ais.h
      - copied unchanged from r121716, trunk/res/ais/ais.h
    team/murf/bug11210/res/ais/amf.c
      - copied unchanged from r121716, trunk/res/ais/amf.c
    team/murf/bug11210/res/ais/ckpt.c
      - copied unchanged from r121716, trunk/res/ais/ckpt.c
    team/murf/bug11210/res/ais/clm.c
      - copied unchanged from r121716, trunk/res/ais/clm.c
    team/murf/bug11210/res/ais/evt.c
      - copied unchanged from r121716, trunk/res/ais/evt.c
    team/murf/bug11210/res/ais/lck.c
      - copied unchanged from r121716, trunk/res/ais/lck.c
    team/murf/bug11210/res/res_ais.c
      - copied unchanged from r121716, trunk/res/res_ais.c
Modified:
    team/murf/bug11210/   (props changed)
    team/murf/bug11210/CHANGES
    team/murf/bug11210/apps/app_meetme.c
    team/murf/bug11210/apps/app_privacy.c
    team/murf/bug11210/apps/app_queue.c
    team/murf/bug11210/apps/app_voicemail.c
    team/murf/bug11210/build_tools/menuselect-deps.in
    team/murf/bug11210/channels/chan_agent.c
    team/murf/bug11210/channels/chan_iax2.c
    team/murf/bug11210/channels/chan_sip.c
    team/murf/bug11210/codecs/codec_ilbc.c
    team/murf/bug11210/configs/dundi.conf.sample
    team/murf/bug11210/configure
    team/murf/bug11210/configure.ac
    team/murf/bug11210/contrib/scripts/get_ilbc_source.sh
    team/murf/bug11210/doc/tex/asterisk-conf.tex
    team/murf/bug11210/doc/tex/channelvariables.tex
    team/murf/bug11210/include/asterisk/autoconfig.h.in
    team/murf/bug11210/include/asterisk/config.h
    team/murf/bug11210/include/asterisk/devicestate.h
    team/murf/bug11210/include/asterisk/dundi.h
    team/murf/bug11210/include/asterisk/event.h
    team/murf/bug11210/include/asterisk/event_defs.h
    team/murf/bug11210/include/asterisk/res_odbc.h
    team/murf/bug11210/include/asterisk/utils.h
    team/murf/bug11210/main/asterisk.c
    team/murf/bug11210/main/channel.c
    team/murf/bug11210/main/devicestate.c
    team/murf/bug11210/main/dsp.c
    team/murf/bug11210/main/event.c
    team/murf/bug11210/main/netsock.c
    team/murf/bug11210/main/pbx.c
    team/murf/bug11210/main/taskprocessor.c
    team/murf/bug11210/main/utils.c
    team/murf/bug11210/makeopts.in
    team/murf/bug11210/pbx/dundi-parser.c
    team/murf/bug11210/pbx/dundi-parser.h
    team/murf/bug11210/pbx/pbx_dundi.c
    team/murf/bug11210/res/Makefile
    team/murf/bug11210/res/res_config_curl.c
    team/murf/bug11210/res/res_config_odbc.c
    team/murf/bug11210/res/res_config_pgsql.c
    team/murf/bug11210/res/res_odbc.c

Propchange: team/murf/bug11210/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.

Propchange: team/murf/bug11210/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Tue Jun 10 23:45:13 2008
@@ -1,1 +1,1 @@
-/trunk:1-121194
+/trunk:1-121749

Modified: team/murf/bug11210/CHANGES
URL: http://svn.digium.com/view/asterisk/team/murf/bug11210/CHANGES?view=diff&rev=121750&r1=121749&r2=121750
==============================================================================
--- team/murf/bug11210/CHANGES (original)
+++ team/murf/bug11210/CHANGES Tue Jun 10 23:45:13 2008
@@ -1,6 +1,17 @@
 ------------------------------------------------------------------------------
 --- Functionality changes from Asterisk 1.6.0 to Asterisk 1.6.1  -------------
 ------------------------------------------------------------------------------
+
+Device State Handling
+---------------------
+ * The event infrastructure in Asterisk got another big update to help support
+    distributed events.  It currently supports distributed device state and
+    distributed Voicemail MWI (Message Waiting Indication).  A new module has
+    been merged, res_ais, which facilitates communicating events between servers.
+    It uses the SAForum AIS (Service Availability Forum Application Interface
+    Specification) CLM (Cluster Management) and EVT (Event) services to maintain
+    a cluster of Asterisk servers, and to share events between them.  For more
+    information on setting this up, see doc/distributed_devstate.txt.
 
 Dialplan Functions
 ------------------
@@ -17,9 +28,9 @@
  * TIMEOUT() has been modified to be accurate down to the millisecond.
  * ENUM*() functions now include the following new options:
      - 'u' returns the full URI and does not strip off the URI-scheme.
-	 - 's' triggers ISN specific rewriting
-	 - 'i' looks for branches into an Infrastructure ENUM tree
-	 - 'd' for a direct DNS lookup without any flipping of digits.
+     - 's' triggers ISN specific rewriting
+     - 'i' looks for branches into an Infrastructure ENUM tree
+     - 'd' for a direct DNS lookup without any flipping of digits.
  * TXCIDNAME() has a new zone-suffix parameter (which defaults to 'e164.arpa')
  * CHANNEL() now has options for the maximum, minimum, and standard or normal
    deviation of jitter, rtt, and loss for a call using chan_sip.
@@ -79,6 +90,9 @@
    complete documentation.
  * ChanIsAvail has a new option, 'a', which will return all available channels instead
    of just the first one if you give the function more then one channel to check.
+ * PrivacyManager now takes an option where you can specify a context where the 
+   given number will be matched. This way you have more control over who is allowed
+   and it stops the people who blindly enter 10 digits.
 
 SIP Changes
 -----------
@@ -113,9 +127,9 @@
      which shows which configuration files are in use.
   * New CLI commands, "pri show version" and "ss7 show version" that will
      display which version of libpri and libss7 are being used, respectively.
-	 A new API call was added so trunk will now have to be compiled against
-	 a versions of libpri and libss7 that have them or it will not know that
-	 these libraries exist.
+     A new API call was added so trunk will now have to be compiled against
+     a versions of libpri and libss7 that have them or it will not know that
+     these libraries exist.
 
 DNS manager changes
 -------------------
@@ -443,10 +457,10 @@
      a web interface of some kind).
   * Added the support for marking messages as "urgent." There are two methods to accomplish
      this. One is to pass the 'U' option to VoiceMail(). Another way to mark a message as urgent
-	 is to specify "review=yes" in voicemail.conf. Doing this will cause allow the user to mark
-	 the message as urgent after he has recorded a voicemail by following the voice instructions.
-	When listening to voicemails using VoiceMailMain urgent messages will be presented before other
-	 messages
+     is to specify "review=yes" in voicemail.conf. Doing this will cause allow the user to mark
+     the message as urgent after he has recorded a voicemail by following the voice instructions.
+    When listening to voicemails using VoiceMailMain urgent messages will be presented before other
+     messages
 
 Queue changes
 -------------
@@ -480,18 +494,18 @@
     device state reported.
   * New configuration option: randomperiodicannounce. If a list of periodic announcements is
     specified by the periodic-announce option, then one will be chosen randomly when it is time
-	to play a periodic announcment
+    to play a periodic announcment
   * New configuration options: announce-position now takes two more values in addition to "yes" and
     "no." Two new options, "limit" and "more," are allowed. These are tied to another option,
-	announce-position-limit. By setting announce-position to "limit" callers will only have their
-	position announced if their position is less than what is specified by announce-position-limit.
-	If announce-position is set to "more" then callers beyond the position specified by announce-position-limit
-	will be told that their are more than announce-position-limit callers waiting.
+    announce-position-limit. By setting announce-position to "limit" callers will only have their
+    position announced if their position is less than what is specified by announce-position-limit.
+    If announce-position is set to "more" then callers beyond the position specified by announce-position-limit
+    will be told that their are more than announce-position-limit callers waiting.
   * Two new queue log events have been added. An ADDMEMBER event will be logged
     when a realtime queue member is added and a REMOVEMEMBER event will be logged
-	when a realtime queue member is removed. Since there is no calling channel associated
-	with these events, the string "REALTIME" is placed where the channel's unique id
-	is typically placed.
+    when a realtime queue member is removed. Since there is no calling channel associated
+    with these events, the string "REALTIME" is placed where the channel's unique id
+    is typically placed.
 
 MeetMe Changes
 --------------
@@ -761,7 +775,7 @@
   * iLBC source code no longer included (see UPGRADE.txt for details)
   * If compiled with DETECT_DEADLOCKS enabled and if you have glibc, then if 
      deadlock is detected, a backtrace of the stack which led to the lock calls
-	 will be output to the CLI.
+     will be output to the CLI.
   * If compiled with DEBUG_THREADS enabled and if you have glibc, then issuing
      the "core show locks" CLI command will give lock information output as well
-	 as a backtrace of the stack which led to the lock calls.
+     as a backtrace of the stack which led to the lock calls.

Modified: team/murf/bug11210/apps/app_meetme.c
URL: http://svn.digium.com/view/asterisk/team/murf/bug11210/apps/app_meetme.c?view=diff&rev=121750&r1=121749&r2=121750
==============================================================================
--- team/murf/bug11210/apps/app_meetme.c (original)
+++ team/murf/bug11210/apps/app_meetme.c Tue Jun 10 23:45:13 2008
@@ -1743,7 +1743,10 @@
 	if (rt_log_members) {
 		/* Update table */
 		snprintf(members, sizeof(members), "%d", conf->users);
-		ast_realtime_require_field("meetme", "confno", RQ_INTEGER, strlen(conf->confno), "members", RQ_INTEGER, strlen(members), NULL);
+		ast_realtime_require_field("meetme",
+			"confno", strlen(conf->confno) > 7 ? RQ_UINTEGER4 : strlen(conf->confno) > 4 ? RQ_UINTEGER3 : RQ_UINTEGER2, strlen(conf->confno),
+			"members", RQ_UINTEGER1, strlen(members),
+			NULL);
 		ast_update_realtime("meetme", "confno", conf->confno, "members", members, NULL);
 	}
 	setusercount = 1;
@@ -2683,7 +2686,10 @@
 			if (rt_log_members) {
 				/* Update table */
 				snprintf(members, sizeof(members), "%d", conf->users);
-				ast_realtime_require_field("meetme", "confno", RQ_INTEGER, strlen(conf->confno), "members", RQ_INTEGER, strlen(members), NULL);
+				ast_realtime_require_field("meetme",
+					"confno", strlen(conf->confno) > 7 ? RQ_UINTEGER4 : strlen(conf->confno) > 4 ? RQ_UINTEGER3 : RQ_UINTEGER2, strlen(conf->confno),
+					"members", RQ_UINTEGER1, strlen(members),
+					NULL);
 				ast_update_realtime("meetme", "confno", conf->confno, "members", members, NULL);
 			}
 			if (confflags & CONFFLAG_MARKEDUSER) 
@@ -5710,7 +5716,7 @@
 	res |= ast_devstate_prov_add("SLA", sla_state);
 
 	res |= ast_custom_function_register(&meetme_info_acf);
-	ast_realtime_require_field("meetme", "confno", RQ_INTEGER, 3, "members", RQ_INTEGER, 3, NULL);
+	ast_realtime_require_field("meetme", "confno", RQ_UINTEGER2, 3, "members", RQ_UINTEGER1, 3, NULL);
 
 	return res;
 }

Modified: team/murf/bug11210/apps/app_privacy.c
URL: http://svn.digium.com/view/asterisk/team/murf/bug11210/apps/app_privacy.c?view=diff&rev=121750&r1=121749&r2=121750
==============================================================================
--- team/murf/bug11210/apps/app_privacy.c (original)
+++ team/murf/bug11210/apps/app_privacy.c Tue Jun 10 23:45:13 2008
@@ -46,13 +46,14 @@
 static char *synopsis = "Require phone number to be entered, if no CallerID sent";
 
 static char *descrip =
-  "  PrivacyManager([maxretries][,minlength]): If no Caller*ID \n"
+  "  PrivacyManager([maxretries][,minlength][,context]): If no Caller*ID \n"
   "is sent, PrivacyManager answers the channel and asks the caller to\n"
   "enter their phone number. The caller is given 'maxretries' attempts to do so.\n"
   "The application does nothing if Caller*ID was received on the channel.\n"
   "   maxretries  default 3  -maximum number of attempts the caller is allowed \n"
   "               to input a callerid.\n"
   "   minlength   default 10 -minimum allowable digits in the input callerid number.\n"
+  "   context     context to check the given Caller*ID against patterns.\n"
   "The application sets the following channel variable upon completion: \n"
   "PRIVACYMGRSTATUS  The status of the privacy manager's attempt to collect \n"
   "                  a phone number from the user. A text string that is either:\n" 
@@ -73,6 +74,7 @@
 		AST_APP_ARG(maxretries);
 		AST_APP_ARG(minlength);
 		AST_APP_ARG(options);
+		AST_APP_ARG(checkcontext);
 	);
 
 	if (!ast_strlen_zero(chan->cid.cid_num)) {
@@ -101,7 +103,6 @@
 				else
 					ast_log(LOG_WARNING, "Invalid min length argument\n");
 			}
-
 		}		
 
 		/* Play unidentified call */
@@ -125,9 +126,21 @@
 				break;
 
 			/* Make sure we get at least digits */
-			if (strlen(phone) >= minlength ) 
-				break;
-			else {
+			if (strlen(phone) >= minlength ) {
+				/* if we have a checkcontext argument, do pattern matching */
+				if (!ast_strlen_zero(args.checkcontext)) {
+					if (!ast_exists_extension(NULL, args.checkcontext, phone, 1, NULL)) {
+						res = ast_streamfile(chan, "privacy-incorrect", chan->language);
+						if (!res) {
+							res = ast_waitstream(chan, "");
+						}
+					} else {
+						break;
+					}
+				} else {
+					break;
+				}
+			} else {
 				res = ast_streamfile(chan, "privacy-incorrect", chan->language);
 				if (!res)
 					res = ast_waitstream(chan, "");

Modified: team/murf/bug11210/apps/app_queue.c
URL: http://svn.digium.com/view/asterisk/team/murf/bug11210/apps/app_queue.c?view=diff&rev=121750&r1=121749&r2=121750
==============================================================================
--- team/murf/bug11210/apps/app_queue.c (original)
+++ team/murf/bug11210/apps/app_queue.c Tue Jun 10 23:45:13 2008
@@ -6334,9 +6334,11 @@
 		ast_log(LOG_WARNING, "devicestate taskprocessor reference failed - devicestate notifications will not occur\n");
 	}
 
-	if (!(device_state_sub = ast_event_subscribe(AST_EVENT_DEVICE_STATE, device_state_cb, NULL, AST_EVENT_IE_END)))
+	if (!(device_state_sub = ast_event_subscribe(AST_EVENT_DEVICE_STATE_CHANGE, device_state_cb, NULL, AST_EVENT_IE_END))) {
 		res = -1;
-	ast_realtime_require_field("queue_members", "paused", RQ_INTEGER, 1, "uniqueid", RQ_INTEGER, 5, NULL);
+	}
+
+	ast_realtime_require_field("queue_members", "paused", RQ_INTEGER1, 1, "uniqueid", RQ_UINTEGER2, 5, NULL);
 
 	return res ? AST_MODULE_LOAD_DECLINE : 0;
 }

Modified: team/murf/bug11210/apps/app_voicemail.c
URL: http://svn.digium.com/view/asterisk/team/murf/bug11210/apps/app_voicemail.c?view=diff&rev=121750&r1=121749&r2=121750
==============================================================================
--- team/murf/bug11210/apps/app_voicemail.c (original)
+++ team/murf/bug11210/apps/app_voicemail.c Tue Jun 10 23:45:13 2008
@@ -10089,8 +10089,8 @@
 	ast_cli_register_multiple(cli_voicemail, sizeof(cli_voicemail) / sizeof(struct ast_cli_entry));
 
 	ast_install_vm_functions(has_voicemail, inboxcount, messagecount, sayname);
-	ast_realtime_require_field("voicemail", "uniqueid", RQ_INTEGER, 11, "password", RQ_CHAR, 10, NULL);
-	ast_realtime_require_field("voicemail_data", "filename", RQ_CHAR, 30, "duration", RQ_INTEGER, 5, NULL);
+	ast_realtime_require_field("voicemail", "uniqueid", RQ_UINTEGER3, 11, "password", RQ_CHAR, 10, NULL);
+	ast_realtime_require_field("voicemail_data", "filename", RQ_CHAR, 30, "duration", RQ_UINTEGER3, 5, NULL);
 
 	return res;
 }

Modified: team/murf/bug11210/build_tools/menuselect-deps.in
URL: http://svn.digium.com/view/asterisk/team/murf/bug11210/build_tools/menuselect-deps.in?view=diff&rev=121750&r1=121749&r2=121750
==============================================================================
--- team/murf/bug11210/build_tools/menuselect-deps.in (original)
+++ team/murf/bug11210/build_tools/menuselect-deps.in Tue Jun 10 23:45:13 2008
@@ -29,6 +29,8 @@
 POPT=@PBX_POPT@
 PORTAUDIO=@PBX_PORTAUDIO@
 PRI=@PBX_PRI@
+SACLM=@PBX_SACLM@
+SAEVT=@PBX_SAEVT@
 RADIUS=@PBX_RADIUS@
 SPANDSP=@PBX_SPANDSP@
 SPEEX=@PBX_SPEEX@

Modified: team/murf/bug11210/channels/chan_agent.c
URL: http://svn.digium.com/view/asterisk/team/murf/bug11210/channels/chan_agent.c?view=diff&rev=121750&r1=121749&r2=121750
==============================================================================
--- team/murf/bug11210/channels/chan_agent.c (original)
+++ team/murf/bug11210/channels/chan_agent.c Tue Jun 10 23:45:13 2008
@@ -434,7 +434,17 @@
 			if (!ast_strlen_zero(p->loginchan)) {
 				if (p->chan)
 					ast_debug(1, "Bridge on '%s' being cleared (2)\n", p->chan->name);
-
+				if (p->owner->_state != AST_STATE_UP) {
+					int howlong = time(NULL) - p->start;
+					if (p->autologoff && howlong > p->autologoff) {
+						long logintime = time(NULL) - p->loginstart;
+						p->loginstart = 0;
+							ast_log(LOG_NOTICE, "Agent '%s' didn't answer/confirm within %d seconds (waited %d)\n", p->name, p->autologoff, howlong);
+						agent_logoff_maintenance(p, p->loginchan, logintime, ast->uniqueid, "Autologoff");
+						if (persistent_agents)
+							dump_agents();
+					}
+				}
 				status = pbx_builtin_getvar_helper(p->chan, "CHANLOCALSTATUS");
 				if (autologoffunavail && status && !strcasecmp(status, "CHANUNAVAIL")) {
 					long logintime = time(NULL) - p->loginstart;

Modified: team/murf/bug11210/channels/chan_iax2.c
URL: http://svn.digium.com/view/asterisk/team/murf/bug11210/channels/chan_iax2.c?view=diff&rev=121750&r1=121749&r2=121750
==============================================================================
--- team/murf/bug11210/channels/chan_iax2.c (original)
+++ team/murf/bug11210/channels/chan_iax2.c Tue Jun 10 23:45:13 2008
@@ -9683,13 +9683,13 @@
 	}
 
 	if (!reg->callno) {
-		ast_debug(1, "Allocate call number\n");
+		ast_debug(3, "Allocate call number\n");
 		reg->callno = find_callno_locked(0, 0, &reg->addr, NEW_FORCE, defaultsockfd, 0);
 		if (reg->callno < 1) {
 			ast_log(LOG_WARNING, "Unable to create call for registration\n");
 			return -1;
 		} else
-			ast_debug(1, "Registration created on call %d\n", reg->callno);
+			ast_debug(3, "Registration created on call %d\n", reg->callno);
 		iaxs[reg->callno]->reg = reg;
 		ast_mutex_unlock(&iaxsl[reg->callno]);
 	}
@@ -12188,7 +12188,7 @@
 	reload_firmware(0);
 	iax_provision_reload(0);
 
-	ast_realtime_require_field("iaxpeers", "name", RQ_CHAR, 10, "ipaddr", RQ_CHAR, 15, "port", RQ_INTEGER, 5, "regseconds", RQ_INTEGER, 6, NULL);
+	ast_realtime_require_field("iaxpeers", "name", RQ_CHAR, 10, "ipaddr", RQ_CHAR, 15, "port", RQ_UINTEGER2, 5, "regseconds", RQ_UINTEGER2, 6, NULL);
 
 	return AST_MODULE_LOAD_SUCCESS;
 }

Modified: team/murf/bug11210/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/team/murf/bug11210/channels/chan_sip.c?view=diff&rev=121750&r1=121749&r2=121750
==============================================================================
--- team/murf/bug11210/channels/chan_sip.c (original)
+++ team/murf/bug11210/channels/chan_sip.c Tue Jun 10 23:45:13 2008
@@ -2056,7 +2056,7 @@
 static int handle_common_options(struct ast_flags *flags, struct ast_flags *mask, struct ast_variable *v);
 
 /* Realtime device support */
-static void realtime_update_peer(const char *peername, struct sockaddr_in *sin, const char *username, const char *fullcontact, int expirey, int deprecated_username);
+static void realtime_update_peer(const char *peername, struct sockaddr_in *sin, const char *username, const char *fullcontact, const char *useragent, int expirey, int deprecated_username);
 static struct sip_user *realtime_user(const char *username);
 static void update_peer(struct sip_peer *p, int expiry);
 static struct ast_variable *get_insecure_variable_from_config(struct ast_config *config);
@@ -2485,7 +2485,7 @@
 		dialog->stateid = -1; /* shouldn't we 'zero' this out? */
 	}
 	/* Remove link from peer to subscription of MWI */
-	if (dialog->relatedpeer && dialog->relatedpeer->mwipvt)
+	if (dialog->relatedpeer && dialog->relatedpeer->mwipvt == dialog)
 		dialog->relatedpeer->mwipvt = dialog_unref(dialog->relatedpeer->mwipvt, "delete ->relatedpeer->mwipvt");
 	if (dialog->relatedpeer && dialog->relatedpeer->call == dialog)
 		dialog->relatedpeer->call = dialog_unref(dialog->relatedpeer->call, "unset the relatedpeer->call field in tandem with relatedpeer field itself");
@@ -3630,7 +3630,7 @@
 	that name and store that in the "regserver" field in the sippeers
 	table to facilitate multi-server setups.
 */
-static void realtime_update_peer(const char *peername, struct sockaddr_in *sin, const char *defaultuser, const char *fullcontact, int expirey, int deprecated_username)
+static void realtime_update_peer(const char *peername, struct sockaddr_in *sin, const char *defaultuser, const char *fullcontact, const char *useragent, int expirey, int deprecated_username)
 {
 	char port[10];
 	char ipaddr[INET_ADDRSTRLEN];
@@ -3656,14 +3656,19 @@
 	else if (sip_cfg.rtsave_sysname)
 		syslabel = "regserver";
 
-	if (fc)
+	if (fc) {
 		ast_update_realtime(tablename, "name", peername, "ipaddr", ipaddr,
 			"port", port, "regseconds", regseconds,
-			deprecated_username ? "username" : "defaultuser", defaultuser, fc, fullcontact, syslabel, sysname, NULL); /* note fc and syslabel _can_ be NULL */
-	else
+			deprecated_username ? "username" : "defaultuser", defaultuser,
+			"useragent", useragent,
+			fc, fullcontact, syslabel, sysname, NULL); /* note fc and syslabel _can_ be NULL */
+	} else {
 		ast_update_realtime(tablename, "name", peername, "ipaddr", ipaddr,
 			"port", port, "regseconds", regseconds,
-			deprecated_username ? "username" : "defaultuser", defaultuser, syslabel, sysname, NULL); /* note syslabel _can_ be NULL */
+			"useragent", useragent,
+			deprecated_username ? "username" : "defaultuser", defaultuser,
+			syslabel, sysname, NULL); /* note syslabel _can_ be NULL */
+	}
 }
 
 /*! \brief Automatically add peer extension to dial plan */
@@ -3783,7 +3788,7 @@
 	int rtcachefriends = ast_test_flag(&p->flags[1], SIP_PAGE2_RTCACHEFRIENDS);
 	if (sip_cfg.peer_rtupdate &&
 	    (p->is_realtime || rtcachefriends)) {
-		realtime_update_peer(p->name, &p->addr, p->username, rtcachefriends ? p->fullcontact : NULL, expiry, p->deprecated_username);
+		realtime_update_peer(p->name, &p->addr, p->username, rtcachefriends ? p->fullcontact : NULL, p->useragent, expiry, p->deprecated_username);
 	}
 }
 
@@ -7840,8 +7845,13 @@
 		ast_string_field_set(p, url, NULL);
 	}
 
-	/* Add Session-Timers related headers if the feature is active for this session */
-	if (p->stimer && p->stimer->st_active == TRUE && p->stimer->st_active_peer_ua == TRUE) {
+	/* Add Session-Timers related headers if the feature is active for this session.
+	   An exception to this behavior is the ACK request. Since Asterisk never requires 
+	   session-timers support from a remote end-point (UAS) in an INVITE, it must 
+	   not send 'Require: timer' header in the ACK request. Also, Require: header 
+	   is not applicable for CANCEL method. */
+	if (p->stimer && p->stimer->st_active == TRUE && p->stimer->st_active_peer_ua == TRUE 
+	    && sipmethod != SIP_ACK && sipmethod != SIP_CANCEL) {
 		char se_hdr[256];
 		snprintf(se_hdr, sizeof(se_hdr), "%d;refresher=%s", p->stimer->st_interval, 
 			strefresher2str(p->stimer->st_ref));
@@ -9163,6 +9173,7 @@
 		
 		snprintf(i2astr, sizeof(i2astr), "%d", p->stimer->st_interval);
 		add_header(&req, "Session-Expires", i2astr);
+		snprintf(i2astr, sizeof(i2astr), "%d", st_get_se(p, FALSE));
 		add_header(&req, "Min-SE", i2astr);
 	}
 
@@ -10093,7 +10104,7 @@
 
 	if (!sip_cfg.ignore_regexpire) {
 		if (peer->rt_fromcontact)
-			ast_update_realtime(tablename, "name", peer->name, "fullcontact", "", "ipaddr", "", "port", "", "regseconds", "0", peer->deprecated_username ? "username" : "defaultuser", "", "regserver", "", NULL);
+			ast_update_realtime(tablename, "name", peer->name, "fullcontact", "", "ipaddr", "", "port", "", "regseconds", "0", peer->deprecated_username ? "username" : "defaultuser", "", "regserver", "", "useragent", "", NULL);
 		else 
 			ast_db_del("SIP/Registry", peer->name);
 	}
@@ -22858,11 +22869,12 @@
 	ast_realtime_require_field(ast_check_realtime("sipregs") ? "sipregs" : "sippeers",
 		"name", RQ_CHAR, 10,
 		"ipaddr", RQ_CHAR, 15,
-		"port", RQ_INTEGER, 5,
-		"regseconds", RQ_INTEGER, 5,
+		"port", RQ_UINTEGER2, 5,
+		"regseconds", RQ_UINTEGER2, 5,   /* Max of 18 hours */
 		"defaultuser", RQ_CHAR, 10,
 		"fullcontact", RQ_CHAR, 20,
 		"regserver", RQ_CHAR, 20,
+		"useragent", RQ_CHAR, 20,
 		NULL);
 
 	return AST_MODULE_LOAD_SUCCESS;

Modified: team/murf/bug11210/codecs/codec_ilbc.c
URL: http://svn.digium.com/view/asterisk/team/murf/bug11210/codecs/codec_ilbc.c?view=diff&rev=121750&r1=121749&r2=121750
==============================================================================
--- team/murf/bug11210/codecs/codec_ilbc.c (original)
+++ team/murf/bug11210/codecs/codec_ilbc.c Tue Jun 10 23:45:13 2008
@@ -87,7 +87,7 @@
 	f.mallocd = 0;
 	f.offset = 0;
 	f.src = __PRETTY_FUNCTION__;
-	f.data = slin_ilbc_ex;
+	f.data.ptr = slin_ilbc_ex;
 	return &f;
 }
 
@@ -102,7 +102,7 @@
 	f.mallocd = 0;
 	f.offset = 0;
 	f.src = __PRETTY_FUNCTION__;
-	f.data = ilbc_slin_ex;
+	f.data.ptr = ilbc_slin_ex;
 	return &f;
 }
 
@@ -134,7 +134,7 @@
 			ast_log(LOG_WARNING, "Out of buffer space\n");
 			return -1;
 		}		
-		iLBC_decode(tmpf, plc_mode ? f->data + x : NULL, &tmp->dec, plc_mode);
+		iLBC_decode(tmpf, plc_mode ? f->data.ptr + x : NULL, &tmp->dec, plc_mode);
 		for ( i=0; i < ILBC_SAMPLES; i++)
 			dst[pvt->samples + i] = tmpf[i];
 		pvt->samples += ILBC_SAMPLES;
@@ -152,7 +152,7 @@
 	/* XXX We should look at how old the rest of our stream is, and if it
 	   is too old, then we should overwrite it entirely, otherwise we can
 	   get artifacts of earlier talk that do not belong */
-	memcpy(tmp->buf + pvt->samples, f->data, f->datalen);
+	memcpy(tmp->buf + pvt->samples, f->data.ptr, f->datalen);
 	pvt->samples += f->samples;
 	return 0;
 }

Modified: team/murf/bug11210/configs/dundi.conf.sample
URL: http://svn.digium.com/view/asterisk/team/murf/bug11210/configs/dundi.conf.sample?view=diff&rev=121750&r1=121749&r2=121750
==============================================================================
--- team/murf/bug11210/configs/dundi.conf.sample (original)
+++ team/murf/bug11210/configs/dundi.conf.sample Tue Jun 10 23:45:13 2008
@@ -33,7 +33,8 @@
 ; Our entity identifier (Should generally be the MAC address of the
 ; machine it's running on.  Defaults to the first eth address, but you
 ; can override it here, as long as you set it to the MAC of *something*
-; you own!)
+; you own!)  The EID can be overridden by a setting in asterisk.conf,
+; or by setting this option.
 ;
 ;entityid=00:07:E9:3B:76:60
 ;

Modified: team/murf/bug11210/configure.ac
URL: http://svn.digium.com/view/asterisk/team/murf/bug11210/configure.ac?view=diff&rev=121750&r1=121749&r2=121750
==============================================================================
--- team/murf/bug11210/configure.ac (original)
+++ team/murf/bug11210/configure.ac Tue Jun 10 23:45:13 2008
@@ -240,6 +240,8 @@
 AST_EXT_LIB_SETUP([RADIUS], [Radius Client], [radius])
 AST_EXT_LIB_SETUP([SDL], [Sdl], [sdl])
 AST_EXT_LIB_SETUP([SDL_IMAGE], [Sdl Image library], [SDL_image])
+AST_EXT_LIB_SETUP([SACLM], [SAForum AIS CLM], [SaClm])
+AST_EXT_LIB_SETUP([SAEVT], [SAForum AIS EVT], [SaEvt])
 AST_EXT_LIB_SETUP([SPEEX], [Speex], [speex])
 AST_EXT_LIB_SETUP([SPEEXDSP], [Speexdsp], [speexdsp])
 AST_EXT_LIB_SETUP([SQLITE], [SQLite], [sqlite])
@@ -1348,6 +1350,9 @@
 

[... 4002 lines stripped ...]



More information about the svn-commits mailing list