asterisk/asterisk.git
10 years agoMerged revisions 198370 via svnmerge from
Sean Bright [Sat, 30 May 2009 19:38:58 +0000 (19:38 +0000)]
Merged revisions 198370 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r198370 | seanbright | 2009-05-30 15:36:20 -0400 (Sat, 30 May 2009) | 12 lines

  Properly terminate AMI JabberSend response messages.

  The response message (either Error or Success) needs an extra trailing \r\n
  after the fields to inform the client that the message is complete.

  (closes issue #14876)
  Reported by: srt
  Patches:
        05302009_1.4_res_jabber.c.diff uploaded by seanbright (license 71)
        asterisk_14876.patch uploaded by srt (license 378)
        trunk-14876-2.diff uploaded by phsultan (license 73)
........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@198371 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoMerged revisions 198311 via svnmerge from
Russell Bryant [Sat, 30 May 2009 03:43:23 +0000 (03:43 +0000)]
Merged revisions 198311 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r198311 | russell | 2009-05-29 22:42:46 -0500 (Fri, 29 May 2009) | 5 lines

  Fix a crash that occurred when MWI SMDI messages expired.

  (closes issue #14561)
  Reported by: cmoss28
........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@198312 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoMerged revisions 198251 via svnmerge from
Sean Bright [Sat, 30 May 2009 03:26:06 +0000 (03:26 +0000)]
Merged revisions 198251 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r198251 | seanbright | 2009-05-29 22:46:41 -0400 (Fri, 29 May 2009) | 8 lines

  Treat an empty FORWARD_CONTEXT the same way we treat a missing one.

  (closes issue #15056)
  Reported by: p_lindheimer
  Patches:
        05292009_bug15056.diff uploaded by seanbright (license 71)
  Tested by: p_lindheimer
........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@198285 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoWhen removing all packets from a dialog we also need to free the data if present.
Joshua Colp [Sat, 30 May 2009 02:31:48 +0000 (02:31 +0000)]
When removing all packets from a dialog we also need to free the data if present.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@198248 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoRemove not used code in the Agent channel.
Eliel C. Sardanons [Sat, 30 May 2009 01:04:57 +0000 (01:04 +0000)]
Remove not used code in the Agent channel.

This code was there because of the AgentCallbackLogin() application.
->loginchan[] member was only used by AgentCallbackLogin().
Agent where dumped to astdb if they where logged in using AgentCallbacklogin()
so they are not being dumper anymore.

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@198217 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoSuggesting that only a single timing module be loaded is no longer necessary.
Russell Bryant [Fri, 29 May 2009 23:04:31 +0000 (23:04 +0000)]
Suggesting that only a single timing module be loaded is no longer necessary.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@198186 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoImprove handling of trying to ACK too many timer expirations.
Russell Bryant [Fri, 29 May 2009 22:33:31 +0000 (22:33 +0000)]
Improve handling of trying to ACK too many timer expirations.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@198183 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoAdd a couple of TODO items so I don't forget
Terry Wilson [Fri, 29 May 2009 22:21:42 +0000 (22:21 +0000)]
Add a couple of TODO items so I don't forget

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@198182 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoResolve issues with choppy sound when using res_timing_pthread.
Russell Bryant [Fri, 29 May 2009 20:06:59 +0000 (20:06 +0000)]
Resolve issues with choppy sound when using res_timing_pthread.

The situation that caused this problem was when continuous mode was being
turned on and off while a rate was set for a timing interface.  A very easy
way to replicate this bug was to do a Playback() from behind a Local channel.
In this scenario, a rate gets set on the channel for doing file playback.
At the same time, continuous mode gets turned on and off about every 20 ms
as frames get queued on to the PBX side channel from the other side of the
Local channel.

Essentially, this module treated continuous mode and a set rate as mutually
exclusive states for the timer to be in.  When I dug deep enough, I observed
the following pattern:

   1) Set timer to tick every 20 ms.
   2) Wait almost 20 ms ...
   3) Continuous mode gets turned on for a queued up frame
   4) Continuous mode gets turned off
   5) The timer goes back to its tick per 20 ms. state but starts counting
      at 0 ms.
   6) Goto step 2.

Sometimes, res_timing_pthread would make it 20 ms and produce a timer tick,
but not most of the time.  This is what produced the choppy sound (or sometimes
no sound at all).

Now, the module treats continuous mode and a set rate as completely independent
timer modes.  They can be enabled and disabled independently of each other and
things work as expected.

(closes issue #14412)
Reported by: dome
Patches:
      issue14412.diff.txt uploaded by russell (license 2)
      issue14412-1.6.1.0.diff.txt uploaded by russell (license 2)
Tested by: DennisD, russell

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@198146 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoSimplify the Makefile and avoid needing to specify each object file.
Eliel C. Sardanons [Fri, 29 May 2009 19:46:07 +0000 (19:46 +0000)]
Simplify the Makefile and avoid needing to specify each object file.

Instead of specifying every object file, use make's magic to generate
it.
This will generate less conflicts in team branches when a new file is
added in trunk.

(closes issue #15226)
Reported by: eliel
Patches:
      makefile uploaded by eliel (license 64)

      Review: http://reviewboard.asterisk.org/r/269/

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@198139 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoNew signaling module to handle analog operations in chan_dahdi
Jeff Peeler [Fri, 29 May 2009 19:19:51 +0000 (19:19 +0000)]
New signaling module to handle analog operations in chan_dahdi

This branch splits all the analog signaling logic out of chan_dahdi.c into
sig_analog.c. Functionality in theory should not change at all. As noted
in the code, there is still some unused code remaining that will be cleaned
up in a later commit.

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@198088 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoApply anti-spam obfuscation to an email address.
Eliel C. Sardanons [Fri, 29 May 2009 19:18:35 +0000 (19:18 +0000)]
Apply anti-spam obfuscation to an email address.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@198083 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoMerged revisions 198068 via svnmerge from
Matthew Nicholson [Fri, 29 May 2009 19:04:24 +0000 (19:04 +0000)]
Merged revisions 198068 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r198068 | mnicholson | 2009-05-29 13:53:01 -0500 (Fri, 29 May 2009) | 15 lines

  Use AST_CDR_NOANSWER instead of AST_CDR_NULL as the default CDR disposition.

  This change also involves the addition of an AST_CDR_FLAG_ORIGINATED flag that is used on originated channels to distinguish: them from dialed channels.

  (closes issue #12946)
  Reported by: meral
  Patches:
        null-cdr2.diff uploaded by mnicholson (license 96)
  Tested by: mnicholson, dbrooks

  (closes issue #15122)
  Reported by: sum
  Tested by: sum
........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@198072 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoFix a memory leak of the write buffer when writing a file.
Joshua Colp [Fri, 29 May 2009 18:39:04 +0000 (18:39 +0000)]
Fix a memory leak of the write buffer when writing a file.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@198064 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoMerged revisions 197998 via svnmerge from
Sean Bright [Fri, 29 May 2009 18:15:15 +0000 (18:15 +0000)]
Merged revisions 197998 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r197998 | seanbright | 2009-05-29 14:14:12 -0400 (Fri, 29 May 2009) | 8 lines

  Fix 'make config' target for Slackware.

  There was a missing semi-colon after the echo statement in the Makefile that was
  causing problems for some users.  Fix suggested by reporter.

  (closes issue #15225)
  Reported by: pdavis
........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@198000 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoFix a bug where the default setting did not perform a remote bridge when it should...
Joshua Colp [Fri, 29 May 2009 17:51:06 +0000 (17:51 +0000)]
Fix a bug where the default setting did not perform a remote bridge when it should have.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@197996 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoTrim trailing whitespace so that I can work on this bug without it bothering me....
Russell Bryant [Fri, 29 May 2009 16:15:30 +0000 (16:15 +0000)]
Trim trailing whitespace so that I can work on this bug without it bothering me.  :-)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@197960 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoA few fixes to SIP with regards to connected line updates during transfers.
Mark Michelson [Fri, 29 May 2009 15:48:04 +0000 (15:48 +0000)]
A few fixes to SIP with regards to connected line updates during transfers.

* Set the invitestate to INV_CALLING when we send a connected line reinvite.
This prevents us from potentially rapid-firing reinvites to a single peer.

* Use the astdb to store a peer's allowed methods. This prevents us from sending
an UPDATE during the interval between startup and the peer's first registration
if the peer does not support the UPDATE method.

* Handle Polycom's method of indicating allowed methods in REGISTER. Instead of
using an Allow header, they place the allowed methods in a methods= parameter
in the Contact header.

ABE-1873

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@197959 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoAdd some TeX docs for calendaring.
Terry Wilson [Fri, 29 May 2009 05:15:40 +0000 (05:15 +0000)]
Add some TeX docs for calendaring.

I still need to set up tests to make sure my examples are completely correct,
but I ran out of time tonight and felt that they at least would give an idea as
to how to use calendaring. I will try to test the examples and do some cleanup
on the docs tomorrow night.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@197926 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoUpdate references to downloads.digium.com to its new URL.
Sean Bright [Thu, 28 May 2009 22:42:27 +0000 (22:42 +0000)]
Update references to downloads.digium.com to its new URL.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@197861 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoUpdate documentation in MixMonitor.
Leif Madsen [Thu, 28 May 2009 22:04:00 +0000 (22:04 +0000)]
Update documentation in MixMonitor.
Updated the MixMonitor documentation for the 'b' option so that
it is more obvious that you must not optimize away the Local
channel when using this option.

(closes issue #14829)
Reported by: licedey
Tested by: mmichelson, licedey, lmadsen

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@197828 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoUpdate references to bugs.digium.com and reviewboard.digium.com to the new URLs.
Sean Bright [Thu, 28 May 2009 21:50:27 +0000 (21:50 +0000)]
Update references to bugs.digium.com and reviewboard.digium.com to the new URLs.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@197824 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoMake note of Exchange calendar support limitations
Terry Wilson [Thu, 28 May 2009 20:43:00 +0000 (20:43 +0000)]
Make note of Exchange calendar support limitations

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@197777 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoEnsure that accidental calls to ast_string_field_free_memory() on embedded stringfiel...
Kevin P. Fleming [Thu, 28 May 2009 20:36:49 +0000 (20:36 +0000)]
Ensure that accidental calls to ast_string_field_free_memory() on embedded stringfield pools are safe.

It is possible for a stringfield manager structure (and pool) structure to be allocated
as part of a larger structure allocation (using ast_calloc_with_strinfields()); when
this is done, the stringfield pool cannot be separately freed, but users of the tructure
may not be aware (and shouldn't have to be aware) of whether the pool was embedded.
This patch modifies the behavior so that they can always call ast_string_field_free_memory()
and the function will do the right thing for both embedded and non-embedded situations.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@197775 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoTreat 405 responses the same way we would a 501.
Mark Michelson [Thu, 28 May 2009 20:17:24 +0000 (20:17 +0000)]
Treat 405 responses the same way we would a 501.

This makes sure that we mark a method as being unallowed if we
receive a 405 response so that we don't continue to try to
send that same type of message.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@197740 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoAdd Calendaring support for Asterisk
Terry Wilson [Thu, 28 May 2009 19:57:18 +0000 (19:57 +0000)]
Add Calendaring support for Asterisk

This commit add Calendaring support to Asterisk for iCalendar, CalDAV, and MS
Exchange calendars. Exchange support has only been tested on Exchange Server 2k3
and does not support forms-based authentication at this time (patches *very*
welcome). Exchange support is also currently missing the ability to return a
list of a meting's attendees (again, patches are very, very welcome).

Features include:
  Querying a calendar for events over a specific time range
  Checking a calendar's busy status via the dialplan
  Writing calendar events via the dialplan (CalDAV and Exchange only)
  Handling calendar event notifications through the dialplan

(closes issue #14771)
Tested by: lmadsen, twilson, Shivaprakash

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@197738 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoAdd missing lock to local_indicate function for connected line frames.
Mark Michelson [Thu, 28 May 2009 18:48:56 +0000 (18:48 +0000)]
Add missing lock to local_indicate function for connected line frames.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@197701 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoFix a bug where the trunkmtu setting was not set to the default value of 1240 on...
Joshua Colp [Thu, 28 May 2009 18:45:11 +0000 (18:45 +0000)]
Fix a bug where the trunkmtu setting was not set to the default value of 1240 on load but was on reload.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@197697 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoMerged revisions 197562 via svnmerge from
Eliel C. Sardanons [Thu, 28 May 2009 16:01:48 +0000 (16:01 +0000)]
Merged revisions 197562 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r197562 | eliel | 2009-05-28 11:21:32 -0400 (Thu, 28 May 2009) | 13 lines

  Use the address we already know when reloading a peer with nat=yes.

  If we already have an address for a peer, and we are reloading the sip
  configuration, try to use that address to contact the peer, instead of
  getting it from the Contact.

  (closes issue #15194)
  Reported by: ibc
  Patches:
        sip.patch uploaded by eliel (license 64)
        Tested by: manwe
........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@197621 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoEliminate several needless checks and fix a few memory leaks
Tilghman Lesher [Thu, 28 May 2009 15:35:23 +0000 (15:35 +0000)]
Eliminate several needless checks and fix a few memory leaks
(closes issue #14833)
 Reported by: contactmayankjain
 Patches:
       all_changes.patch uploaded by contactmayankjain (license 740)
       slightly modified by me

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@197616 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoRecorded merge of revisions 197588 via svnmerge from
Mark Michelson [Thu, 28 May 2009 15:32:19 +0000 (15:32 +0000)]
Recorded merge of revisions 197588 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r197588 | mmichelson | 2009-05-28 10:27:49 -0500 (Thu, 28 May 2009) | 16 lines

  Allow for media to arrive from an alternate source when responding to a reinvite with 491.

  When we receive a SIP reinvite, it is possible that we may not be able to process the
  reinvite immediately since we have also sent a reinvite out ourselves. The problem is
  that whoever sent us the reinvite may have also sent a reinvite out to another party,
  and that reinvite may have succeeded.

  As a result, even though we are not going to accept the reinvite we just received, it
  is important for us to not have problems if we suddenly start receiving RTP from a new
  source. The fix for this is to grab the media source information from the SDP of the
  reinvite that we receive. This information is passed to the RTP layer so that it will
  know about the alternate source for media.

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@197606 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoFix an incorrect call to ast_string_field_free_memory which caused a crash in the...
Joshua Colp [Thu, 28 May 2009 15:23:29 +0000 (15:23 +0000)]
Fix an incorrect call to ast_string_field_free_memory which caused a crash in the logger.

Since the message structure is allocated using ast_calloc_with_stringfields we do not need to
free the memory used for the stringfields as it will get freed when the message structure is.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@197570 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoMerged revisions 197537 via svnmerge from
Mark Michelson [Thu, 28 May 2009 14:58:06 +0000 (14:58 +0000)]
Merged revisions 197537 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r197537 | mmichelson | 2009-05-28 09:49:13 -0500 (Thu, 28 May 2009) | 21 lines

  Add flags to chanspy audiohook so that audio stays in sync.

  There are two flags being added to the chanspy audiohook here. One
  is the pre-existing AST_AUDIOHOOK_TRIGGER_SYNC flag. With this set,
  we ensure that the read and write slinfactories on the audiohook do
  not skew beyond a certain tolerance.

  In addition, there is a new audiohook flag added here,
  AST_AUDIOHOOK_SMALL_QUEUE. With this flag set, we do not allow for
  a slinfactory to build up a substantial amount of audio before
  flushing it. For this particular issue, this means that the person
  spying on the call will hear the conversations in real time with very
  little delay in the audio.

  (closes issue #13745)
  Reported by: geoffs
  Patches:
        13745.patch uploaded by mmichelson (license 60)
  Tested by: snblitz
........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@197543 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoFix a bug in stringfields where it did not actually free the pools of memory.
Joshua Colp [Thu, 28 May 2009 14:51:43 +0000 (14:51 +0000)]
Fix a bug in stringfields where it did not actually free the pools of memory.

(closes issue #15074)
Reported by: pj

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@197538 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoRemove a bunch of trailing whitespace in preparation for reformatting/cleanup.
Sean Bright [Thu, 28 May 2009 14:39:21 +0000 (14:39 +0000)]
Remove a bunch of trailing whitespace in preparation for reformatting/cleanup.

Let's try that again, this time removing trailing whitespace and not leading
whitespace.  I can't believe no one noticed.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@197535 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoRemove a bunch of trailing whitespace in preparation for reformatting/cleanup.
Sean Bright [Thu, 28 May 2009 14:32:03 +0000 (14:32 +0000)]
Remove a bunch of trailing whitespace in preparation for reformatting/cleanup.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@197528 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoMerged revisions 197466 via svnmerge from
Joshua Colp [Thu, 28 May 2009 13:47:45 +0000 (13:47 +0000)]
Merged revisions 197466 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r197466 | file | 2009-05-28 10:44:58 -0300 (Thu, 28 May 2009) | 8 lines

  Fix a bug where the flag indicating the presence of rport would get overwritten by the nat setting.

  The presence of rport is now stored as a separate flag. Once the dialog is setup and authenticated
  (or it passes through unauthenticated) the proper nat flag is set.

  (closes issue #13823)
  Reported by: dimas
........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@197467 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoAdded AstVoicemailContext
Gavin Henry [Thu, 28 May 2009 11:25:03 +0000 (11:25 +0000)]
Added AstVoicemailContext

Added AstVoicemailContext

(closes issue #15155)
Reported by: scramatte
Tested by: suretec

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@197431 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoNew objectclass AsteriskVoiceMail and AstAccountCallLimit attribute
Gavin Henry [Thu, 28 May 2009 11:18:09 +0000 (11:18 +0000)]
New objectclass AsteriskVoiceMail and AstAccountCallLimit attribute

Added new ObjectClass AsteriskVoiceMail, and AstAccountCallLimit attribute
and cleaned up formatting and tested with OpenLDAP

(closes issue #15155)
Reported by: scramatte
Patches:
      asterisk.schema uploaded by scramatte (license 796)
Tested by: suretec

Review: [full review board URL with trailing slash]

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@197409 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agocloses issue #15156
Gavin Henry [Thu, 28 May 2009 10:43:51 +0000 (10:43 +0000)]
closes issue #15156

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@197406 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoRevert commit 192032. This define is needed on Mac OS X.
Tilghman Lesher [Wed, 27 May 2009 23:48:15 +0000 (23:48 +0000)]
Revert commit 192032.  This define is needed on Mac OS X.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@197374 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoDon't do a pointer comparison before setting the remote address.
Russell Bryant [Wed, 27 May 2009 22:42:15 +0000 (22:42 +0000)]
Don't do a pointer comparison before setting the remote address.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@197338 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoEnsure that this header includes xmldoc.h, since it depends on it.
Kevin P. Fleming [Wed, 27 May 2009 22:21:53 +0000 (22:21 +0000)]
Ensure that this header includes xmldoc.h, since it depends on it.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@197335 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoAdding some generic handling of error codes sent to us in replys to requests.
Olle Johansson [Wed, 27 May 2009 20:14:00 +0000 (20:14 +0000)]
Adding some generic handling of error codes sent to us in replys to requests.

Previously they always set hangupcause 0, which is generally wrong. With this
change, we're setting some generic hangup causes. For 5xx errors, which indicate
some sort of problem with the remote server, we're now setting CONGESTION.

EDVX002

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@197266 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoBlocked revisions 197264 via svnmerge
Sean Bright [Wed, 27 May 2009 20:13:12 +0000 (20:13 +0000)]
Blocked revisions 197264 via svnmerge

........
  r197264 | seanbright | 2009-05-27 16:12:06 -0400 (Wed, 27 May 2009) | 6 lines

  Since we use bashisms in build_tools/mkpkgconfig, we should call on bash
  explicitly when running from the Makefile.

  (closes issue #15209)
  Reported by: seandarcy
........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@197265 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoUse bash explicitly when calling build_tools/mkpkgconfig from the Makefile.
Sean Bright [Wed, 27 May 2009 20:08:16 +0000 (20:08 +0000)]
Use bash explicitly when calling build_tools/mkpkgconfig from the Makefile.

Since we use bashisms in build_tools/mkpkgconfig, we should call on bash
explicitly when running from the Makefile, otherwise we get errors during a
'make install.'

(closes issue #15209)
Reported by: seandarcy

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@197260 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoRecorded merge of revisions 197194 via svnmerge from
Tilghman Lesher [Wed, 27 May 2009 19:20:56 +0000 (19:20 +0000)]
Recorded merge of revisions 197194 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r197194 | tilghman | 2009-05-27 14:09:42 -0500 (Wed, 27 May 2009) | 5 lines

  Use a different determinator on whether to print the delimiter, since leading fields may be blank.
  (closes issue #15208)
   Reported by: ramonpeek
   Patch by me, though inspired in part by a patch from ramonpeek
........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@197209 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoRemove a file sample configuration file that is no longer used.
Sean Bright [Wed, 27 May 2009 18:25:33 +0000 (18:25 +0000)]
Remove a file sample configuration file that is no longer used.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@197189 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoBlocked revisions 197124 via svnmerge
Jeff Peeler [Wed, 27 May 2009 16:52:26 +0000 (16:52 +0000)]
Blocked revisions 197124 via svnmerge

........
  r197124 | jpeeler | 2009-05-27 11:49:38 -0500 (Wed, 27 May 2009) | 12 lines

  Fix broken attended transfers

  The bridge was terminating immediately after the attended transfer was
  completed. The problem was because upon reentering ast_channel_bridge
  nexteventts was checked to see if it was set and if so could possibly
  return AST_BRIDGE_COMPLETE.

  (closes issue #15183)
  Reported by: andrebarbosa
  Tested by: andrebarbosa, tootai, loloski
........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@197125 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoFix references to /etc/dahdi/system.conf and /etc/asterisk/chan_dahdi.conf in
Sean Bright [Wed, 27 May 2009 16:07:57 +0000 (16:07 +0000)]
Fix references to /etc/dahdi/system.conf and /etc/asterisk/chan_dahdi.conf in
the sample configuration files.

(closes issue #15207)
Reported by: seandarcy

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@197089 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoBlocked revisions 197024 via svnmerge
Sean Bright [Wed, 27 May 2009 14:03:01 +0000 (14:03 +0000)]
Blocked revisions 197024 via svnmerge

........
  r197024 | seanbright | 2009-05-27 09:54:35 -0400 (Wed, 27 May 2009) | 17 lines

  Fix handling of the 'state_interface' option of the 'queue add member' CLI
  command.

  This change relates to r184980, which was a backport of the state interface
  changes to app_queue from trunk.  trunk and all of the 1.6.x branches are not
  affected.

  'queue add member' allows for specifying an interface to use for device state
  when adding a queue member via CLI, but the validation code was not properly
  updated to reflect this optional argument.

  (closes issue #15198)
  Reported by: loloski
  Patches:
        05272009_app_queue.diff uploaded by seanbright (license 71)
  Tested by: loloski
........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@197025 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoDisplay an error message when chan_alsa fails to load due to a missing
Sean Bright [Wed, 27 May 2009 13:02:54 +0000 (13:02 +0000)]
Display an error message when chan_alsa fails to load due to a missing
or inaccessible configuration file.

Before this change, when chan_alsa failed to load due to a missing or
inaccessible configuration file, no message would be displayed.  With this
change, when chan_alsa fails to load due to a missing or inaccessible
configuration file, a message will be displayed.

(closes issue #14760)
Reported by: Nick_Lewis
Patches:
      chan_alsa.c-confload.patch uploaded by Nick (license 657)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@196988 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoReset the terminal to the correct fg/bg after XML documenation is rendered.
Sean Bright [Tue, 26 May 2009 22:43:21 +0000 (22:43 +0000)]
Reset the terminal to the correct fg/bg after XML documenation is rendered.

(closes issue #15200)
Reported by: ajohnson
Patches:
      05262009_xmldoc.patch uploaded by seanbright (license 71)
Tested by: ajohnson

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@196948 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoUpdate configure script to check for OSP toolkit 3.5.0.
Russell Bryant [Tue, 26 May 2009 22:40:34 +0000 (22:40 +0000)]
Update configure script to check for OSP toolkit 3.5.0.

(closes issue #14988)
Reported by: tzafrir
Patches:
      configure.ac.diff uploaded by homesick (license 91)
      new_ast_check_osptk.m4 uploaded by homesick (license 91)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@196946 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoAdd ActionID to CoreShowChannel event.
Sean Bright [Tue, 26 May 2009 22:38:05 +0000 (22:38 +0000)]
Add ActionID to CoreShowChannel event.

There is inconsistency in how we handle manager responses that are lists of
items and, unfortunately, third parties have come to rely on ActionID being on
every event within those lists instead of just keeping track of the ActionID for
the current response.  This change makes CoreShowChannels include the ActionID
with each CoreShowChannel event generated as a result of it being called.

(closes issue #15001)
Reported by: sum
Patches:
      patchactionid2.patch uploaded by sum (license 766)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@196945 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoInclude startup and reload date in the CoreStatus manager message.
Sean Bright [Tue, 26 May 2009 20:20:08 +0000 (20:20 +0000)]
Include startup and reload date in the CoreStatus manager message.

The CoreStartupTime and CoreReloadTime name/value pairs in the CoreStatus
response message only included the time and not the date.  This patch,
inspired by the reporter's patch, adds 2 new fields - CoreStartupDate and
CoreReloadDate - which contain the date portion of these values.

(closes issue #15000)
Reported by: sum

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@196907 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoRemove some redundant or unnecessary connected line-related function calls.
Mark Michelson [Tue, 26 May 2009 19:50:07 +0000 (19:50 +0000)]
Remove some redundant or unnecessary connected line-related function calls.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@196893 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoMerged revisions 196826 via svnmerge from
Russell Bryant [Tue, 26 May 2009 18:20:57 +0000 (18:20 +0000)]
Merged revisions 196826 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r196826 | russell | 2009-05-26 13:14:36 -0500 (Tue, 26 May 2009) | 9 lines

  Resolve a file handle leak.

  The frames here should have always been freed.  However, out of luck, there was
  never any memory leaked.  However, after file streams became reference counted,
  this code would leak the file stream for the file being read.

  (closes issue #15181)
  Reported by: jkroon
........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@196843 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoAdd a missing unref for queues in handle_statechange.
Sean Bright [Tue, 26 May 2009 16:38:54 +0000 (16:38 +0000)]
Add a missing unref for queues in handle_statechange.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@196792 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoAdd new ast_complete_applications function so that we can use it with the
Sean Bright [Tue, 26 May 2009 14:36:11 +0000 (14:36 +0000)]
Add new ast_complete_applications function so that we can use it with the
'channel originate ... application <app>' CLI command.

(And yeah, I cleaned up some whitespace in res_clioriginate.c... big whoop,
wanna fight about it!?)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@196758 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoUse a properly allocated channel for substitution in cdr_sqlite3_custom.
Sean Bright [Tue, 26 May 2009 13:56:30 +0000 (13:56 +0000)]
Use a properly allocated channel for substitution in cdr_sqlite3_custom.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@196725 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoFix a bug where the sip unregister CLI command did not completely unregister the...
Joshua Colp [Tue, 26 May 2009 13:43:13 +0000 (13:43 +0000)]
Fix a bug where the sip unregister CLI command did not completely unregister the peer.

(closes issue #15118)
Reported by: alecdavis
Patches:
      chan_sip_unregister.diff2.txt uploaded by alecdavis (license 585)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@196721 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoMerged revisions 196657 via svnmerge from
Joshua Colp [Tue, 26 May 2009 13:06:50 +0000 (13:06 +0000)]
Merged revisions 196657 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r196657 | file | 2009-05-26 10:06:09 -0300 (Tue, 26 May 2009) | 7 lines

  Remove some bash specific stuff from safe_asterisk.

  (closes issue #10812)
  Reported by: paravoid
  Patches:
        safe_asterisk_bashism.diff uploaded by tzafrir (license 46)
........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@196658 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoUse a properly allocated channel for substitution in cdr_manager.
Sean Bright [Tue, 26 May 2009 12:14:14 +0000 (12:14 +0000)]
Use a properly allocated channel for substitution in cdr_manager.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@196622 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoMove AGI static documentation to the new AstXML form.
Eliel C. Sardanons [Sun, 24 May 2009 16:17:31 +0000 (16:17 +0000)]
Move AGI static documentation to the new AstXML form.

Move AGI commands documentation to XML docs:
'set priority'
'set variable'
'stream file'
'control stream file'
'tdd mode'
'verbose'
'wait for digit'
'speech create'
'speech set'
'speech destroy'
'speech load grammar'
'speech unload grammar'
'speech activate grammar'
'speech deactivate grammar'
'speech recognize'

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@196585 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoMove static AGI commands documentation to XML.
Eliel C. Sardanons [Sat, 23 May 2009 21:11:31 +0000 (21:11 +0000)]
Move static AGI commands documentation to XML.

Move AGI commands ('say datetime', 'send image', 'send text', 'set autohangup',
'set callerid', 'set context', 'set extension') documentation to the AstXML
form.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@196554 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoFix errors in cdr_custom that cause reference errors when non-CDR variable
Sean Bright [Sat, 23 May 2009 15:16:59 +0000 (15:16 +0000)]
Fix errors in cdr_custom that cause reference errors when non-CDR variable
substitution is done.

cdr_custom was creating a ast_channel struct directly and passing it into the
core for variable substition.  This was fine as long as the format string
contained only calls to the CDR() function.  Doing something like ${EPOCH} on
the other hand tried to lock the channel, which would fail and throw an error
because the passed channel hadn't been allocated as an ao2 object.  So now we
create the dummy channel with ast_channel_alloc, and everything works as
expected.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@196520 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoCorrect example for CLI autocompletion (generation)
Kevin P. Fleming [Sat, 23 May 2009 13:31:56 +0000 (13:31 +0000)]
Correct example for CLI autocompletion (generation)

Reported by Atis on #asterisk-dev

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@196488 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoset MFCR2_CATEGORY just when starting the pbx
Moises Silva [Sat, 23 May 2009 04:27:47 +0000 (04:27 +0000)]
set MFCR2_CATEGORY just when starting the pbx

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@196456 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoCall ast_stun_init() when we're initializing to get the 'stun debug set'
Sean Bright [Fri, 22 May 2009 21:11:03 +0000 (21:11 +0000)]
Call ast_stun_init() when we're initializing to get the 'stun debug set'
commands.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@196417 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoSIP set outbound transport type from Registration
David Vossel [Fri, 22 May 2009 21:09:45 +0000 (21:09 +0000)]
SIP set outbound transport type from Registration

In sip.conf the transport option allows for the configuration of what transport types (udp, tcp, and tls) a peer will accept, but only the first type listed was used for outbound connections.  This patch changes this.  Now the default transport type is only used until the peer registers.  When registration takes place the transport type is parsed out of the Contact header.  If the Contact header's transport type is equal to one that the peer supports, the peer's default transport type for outbound connections is set to match the Contact header's type.  If the Contact header's transport type is not present, then the peer's default transport type is set to match the one the peer registered with.  When a peer unregisters or the registration expires, the default transport type for that peer is reset.

(closes issue #12282)
Reported by: rjain
Patches:
      reg_patch_1.diff uploaded by dvossel (license 671)
Tested by: dvossel

(closes issue #14727)
Reported by: pj
Patches:
      reg_patch_3.diff uploaded by dvossel (license 671)
Tested by: pj, dvossel

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@196416 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoDon't crash if an RTP instance can't be created. This could occur when an
Sean Bright [Fri, 22 May 2009 20:01:11 +0000 (20:01 +0000)]
Don't crash if an RTP instance can't be created.  This could occur when an
invalid bindaddr was specified in gtalk.conf.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@196381 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoUnregister every registered application by MiniVM.
Eliel C. Sardanons [Fri, 22 May 2009 19:38:33 +0000 (19:38 +0000)]
Unregister every registered application by MiniVM.

The MinivmMWI application was not being unregistered on unload and we were not
able to load again the module or reload it.

(closes issue #15174)
Reported by: junky
Patches:
      unregister_minivm_mwi.diff uploaded by junky (license 177)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@196377 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoMoved static documentation to the AstXML form.
Eliel C. Sardanons [Fri, 22 May 2009 19:11:44 +0000 (19:11 +0000)]
Moved static documentation to the AstXML form.

Moved AGI commands static documentation to XML docs ('say alpha', 'say digits',
'say number', 'say phonetic', 'say date' and 'say time').

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@196344 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoImplement a new element in AstXML for AMI actions documentation.
Eliel C. Sardanons [Fri, 22 May 2009 17:52:35 +0000 (17:52 +0000)]
Implement a new element in AstXML for AMI actions documentation.

A new xml element was created to manage the AMI actions documentation,
using AstXML.
To register a manager action using XML documentation it is now possible
using ast_manager_register_xml().
The CLI command 'manager show command' can be used to show the parsed
documentation.

Example manager xml documentation:
<manager name="ami action name" language="en_US">
    <synopsis>
        AMI action synopsis.
    </synopsis>
    <syntax>
        <xi:include xpointer="xpointer(...)" /> <-- for ActionID
        <parameter name="header1" required="true">
    <para>Description</para>
</parameter>
...
    </syntax>
    <description>
        <para>AMI action description</para>
    </description>
    <see-also>
     ...
    </see-also>
</manager>

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@196308 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoTwo more minor fixes due to constification
Tilghman Lesher [Fri, 22 May 2009 16:53:41 +0000 (16:53 +0000)]
Two more minor fixes due to constification

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@196272 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoFix res_agi compilation after the const-ify the world merge.
Sean Bright [Fri, 22 May 2009 16:51:22 +0000 (16:51 +0000)]
Fix res_agi compilation after the const-ify the world merge.

Since we are dealing with a 'const char * const' now, we have to create a
temporary copy of the string to work on rather than the original.  Fix inspired
by reporter.  Reviewed by everyone-and-their-mother in #asterisk-dev.

(closes issue #15184)
Reported by: andrew

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@196270 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agos/it's/its/
Mark Michelson [Fri, 22 May 2009 16:50:31 +0000 (16:50 +0000)]
s/it's/its/

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@196268 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoresolve compiler warning
Russell Bryant [Fri, 22 May 2009 16:20:16 +0000 (16:20 +0000)]
resolve compiler warning

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@196246 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoFix build under dev mode and remove some casts that are no longer necessary as
Sean Bright [Fri, 22 May 2009 16:10:33 +0000 (16:10 +0000)]
Fix build under dev mode and remove some casts that are no longer necessary as
a result of the const-ify the world patch.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@196227 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoFix constify the world compile problem.
Richard Mudgett [Fri, 22 May 2009 15:07:48 +0000 (15:07 +0000)]
Fix constify the world compile problem.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@196188 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoMake chan_misdn compile.
Richard Mudgett [Fri, 22 May 2009 15:07:21 +0000 (15:07 +0000)]
Make chan_misdn compile.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@196187 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoMerged revisions 196116 via svnmerge from
Joshua Colp [Fri, 22 May 2009 13:56:47 +0000 (13:56 +0000)]
Merged revisions 196116 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r196116 | file | 2009-05-22 10:54:17 -0300 (Fri, 22 May 2009) | 5 lines

  Fix a bug where using immediate with mISDN caused a cause code of 16 to get sent back instead of 1 if the 's' extension did not exist.

  (closes issue #12286)
  Reported by: lmamane
........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@196117 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoAvoid using prototypes when not necessary (it is already defined in the header
Eliel C. Sardanons [Fri, 22 May 2009 13:34:01 +0000 (13:34 +0000)]
Avoid using prototypes when not necessary (it is already defined in the header
file).
Make log_match_char_tree() static to main/pbx.c (only used there).

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@196114 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoConst-ify the world (or at least a good part of it)
Kevin P. Fleming [Thu, 21 May 2009 21:13:09 +0000 (21:13 +0000)]
Const-ify the world (or at least a good part of it)

This patch adds 'const' tags to a number of Asterisk APIs where they are appropriate (where the API already demanded that the function argument not be modified, but the compiler was not informed of that fact). The list includes:

- CLI command handlers
- CLI command handler arguments
- AGI command handlers
- AGI command handler arguments
- Dialplan application handler arguments
- Speech engine API function arguments

In addition, various file-scope and function-scope constant arrays got 'const' and/or 'static' qualifiers where they were missing.

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@196072 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoMerged revisions 195991 via svnmerge from
David Vossel [Thu, 21 May 2009 19:11:49 +0000 (19:11 +0000)]
Merged revisions 195991 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r195991 | dvossel | 2009-05-21 14:04:56 -0500 (Thu, 21 May 2009) | 14 lines

  Sign problem calculating timestamp for iax frame leads to no audio on the receiving peer.

  There are rare cases in which a frame's delivery timestamp is slightly less than the iax2_pvt's offset.  This causes the pvt's timestamp to be a small negative number, but since the timestamp value is unsigned it looks like a huge positive number.  This patch checks for this negative case and sets the ms to zero.  A similar check is already done right below this one in the 'else' statement.

  (closes issue #15032)
  Reported by: guillecabeza
  Patches:
        chan_iax2.c.patch_timestamp uploaded by guillecabeza (license 380)
  Tested by: guillecabeza

  (closes issue #14216)
  Reported by: Andrey Sofronov
........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@195995 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoPass connected line updates along during a bridge.
Mark Michelson [Thu, 21 May 2009 19:06:08 +0000 (19:06 +0000)]
Pass connected line updates along during a bridge.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@195992 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoRework the cdr_custom.conf.sample header a bit to reflect the changes in
Sean Bright [Thu, 21 May 2009 17:15:23 +0000 (17:15 +0000)]
Rework the cdr_custom.conf.sample header a bit to reflect the changes in
functionality (allowing multiple mappings).

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@195949 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoMerged revisions 195881 via svnmerge from
Matthew Nicholson [Thu, 21 May 2009 15:33:55 +0000 (15:33 +0000)]
Merged revisions 195881 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r195881 | mnicholson | 2009-05-21 10:25:50 -0500 (Thu, 21 May 2009) | 13 lines

  This commit prevents cdr records with AST_CDR_FLAG_ANSLOCKED and AST_CDR_FLAG_LOCKED from being updated in certain cases.

  This is accomplished by adding two functions to update the answer time and disposition of calls that checks for the proper lock flags.  These functions are used in the ast_bridge_call() function so that ForkCDR(A) calls are respected.

  This patch also modifies the way ast_bridge_call() chooses the cdr record to base the bridged_cdr on.  Previously the first unlocked cdr record would be chosen, now instead the first cdr record is chosen and forked cdr records are moved to the bridge_cdr.  This allows the original cdr record and any forked cdr records to be properly updated with answer and end times.

  (closes issue #13797)
  Reported by: sh0t
  Tested by: sh0t

  (closes issue #14744)
  Reported by: deepesh
........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@195882 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoIf a variable had a blank value upon the initial setting, then it would do nothing.
Tilghman Lesher [Wed, 20 May 2009 23:30:05 +0000 (23:30 +0000)]
If a variable had a blank value upon the initial setting, then it would do nothing.
Identified by Dmitry Andrianov via private email, fixed by me.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@195839 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoGet rid of some duplicated code and correct a connected line error.
Mark Michelson [Wed, 20 May 2009 20:45:05 +0000 (20:45 +0000)]
Get rid of some duplicated code and correct a connected line error.

When receiving a 200 OK response to an INVITE, it was possible to transmit two
connected line updates instead of a single one. Furthermore, the second did not
have the proper information present.

Now the two have been combined into a single update and the correct information
is presented.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@195798 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoPlug a memory leak in app_dial.
Mark Michelson [Wed, 20 May 2009 20:14:28 +0000 (20:14 +0000)]
Plug a memory leak in app_dial.

Since we may have copied connected line info into the chanlist struct prior
to placing an outbound call, we need to be sure to free the allocated data
when we hang the call up.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@195763 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoMerged revisions 195688 via svnmerge from
Joshua Colp [Wed, 20 May 2009 17:33:02 +0000 (17:33 +0000)]
Merged revisions 195688 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r195688 | file | 2009-05-20 14:30:25 -0300 (Wed, 20 May 2009) | 5 lines

  Fix some code that wrongly assumed a pointer would always be non-NULL when dealing with CDRs after a bridge.

  (closes issue #15079)
  Reported by: barryf
........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@195698 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoMerged revisions 195635 via svnmerge from
Joshua Colp [Wed, 20 May 2009 17:14:42 +0000 (17:14 +0000)]
Merged revisions 195635 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r195635 | file | 2009-05-20 14:14:00 -0300 (Wed, 20 May 2009) | 5 lines

  Fix a bug where the MeetMe option 'D' did not actually prompt for the pin.

  (closes issue #15050)
  Reported by: pmhaddad
........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@195636 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoAdd basic support for handling connected line-related UPDATE requests.
Mark Michelson [Tue, 19 May 2009 20:59:38 +0000 (20:59 +0000)]
Add basic support for handling connected line-related UPDATE requests.

SIP purists may want to look the other way...

When COLP/CONP support for SIP was committed, there was a condition under
which Asterisk may transmit a SIP UPDATE in order to communicate the change
in connected line information. The issue here is that while we could send a
SIP UPDATE message, we were not prepared to receive such an UPDATE and would
always responde with a 501 when we received an UPDATE.

The situation was a bit rough. We really want to be able to receive UPDATEs
having to do with connected line changes, but the amount of effort involved
in properly supporting RFC 3311 was staggering. This commit represents a
compromise.

First, it was decided that it is important to only send a SIP UPDATE to
an endpoint that is able to handle one. So, now we have added parsing of
the Allow header into SIP. We store the allowed methods on SIP peers so
that when we communicate with them, we already will know what we can and
cannot send to them. We will parse the peer's allowed methods when he registers
with us. If the peer is not the type to register with us, but the qualify option
is enabled, then we will use the response to the OPTIONS request we send
the peer to determine the peer's allowed methods. When the peer's registration
expires, or when qualify deems the peer to be unreachable, we clear the allowed
methods from the peer.

For an actual call, we will copy the peer's allowed methods to the sip_pvt
representing the call leg. If we are communicating with an endpoint which is
not a peer, then we will just parse the Allow header from the first message
we receive during the call and store the information in the sip_pvt.

If, during communication with a peer, we receive a 501 response, then we will
make sure to save the fact that we cannot use that method when communicating
with that peer.

Now, with all that infrastructure in place, the only actual place we use this
information currently is when attempting to send a connected line change using
an UPDATE request. If we cannot send the change immediately using an UPDATE,
we will set the SIP_NEEDREINVITE flag so that we can send a REINVITE as soon
as it is allowed.

The second part of the changes here is for Asterisk to accept UPDATE requests
that have connected line changes. Since we are not fully supporting RFC 3311,
Asterisk will NOT place the UPDATE method in Allow headers it sends. Instead,
if you are communicating with what you know to be another Asterisk box, you may
set the rpid_update parameter in sip.conf so that we will send UPDATEs to that
Asterisk box. When we send a connected line update, we set a custom header
called "X-Asterisk-rpid-update."

On the receiving end, if Asterisk receives an UPDATE that does not have the
"X-Asterisk-rpid-update" header present, then Asterisk will respond with a 501
since media-changing UPDATEs are not supported. We should never get such
UPDATEs, since as was stated earlier, Asterisk does not put UPDATE in its Allow
header. If the custom header is present in the received UPDATE, though, then we
will check the incoming request for connected line updates and queue the update
on the channel where the change occurred.

ABE-1840
ABE-1822

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@195589 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoMerged revisions 195520 via svnmerge from
Tilghman Lesher [Tue, 19 May 2009 20:16:01 +0000 (20:16 +0000)]
Merged revisions 195520 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r195520 | tilghman | 2009-05-19 15:12:20 -0500 (Tue, 19 May 2009) | 7 lines

  Ensure thread keys are initialized before attempting to access them.
  (closes issue #14889)
   Reported by: jaroth
   Patches:
         app_voicemail.c.patch uploaded by msirota (license 758)
   Tested by: msirota, BlargMaN
........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@195521 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoMerged revisions 195448 via svnmerge from
Joshua Colp [Tue, 19 May 2009 14:43:54 +0000 (14:43 +0000)]
Merged revisions 195448 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r195448 | file | 2009-05-19 11:41:45 -0300 (Tue, 19 May 2009) | 7 lines

  Fix a bug where direct RTP setup would partially occur even when disabled if the calling channel was answered.

  (issue #13545)
  Reported by: davidw
  (issue #14244)
  Reported by: mbnwa
........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@195449 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoRecorded merge of revisions 195366 via svnmerge from
Tilghman Lesher [Mon, 18 May 2009 20:52:33 +0000 (20:52 +0000)]
Recorded merge of revisions 195366 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r195366 | tilghman | 2009-05-18 15:24:13 -0500 (Mon, 18 May 2009) | 8 lines

  Add a similar dependency on SMDI for voicemail as already exists for ADSI.
  (closes issue #14846)
   Reported by: pj
   Patches:
         20090413__bug14846__1.4.diff.txt uploaded by tilghman (license 14)
         20090507__issue14846__1.6.0.diff.txt uploaded by tilghman (license 14)
         20090507__issue14846__1.6.1.diff.txt uploaded by tilghman (license 14)
........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@195370 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoFix the CLI command 'manager show command' documentation and functionality.
Eliel C. Sardanons [Mon, 18 May 2009 20:49:20 +0000 (20:49 +0000)]
Fix the CLI command 'manager show command' documentation and functionality.

The CLI command 'manager show command' supports passing multiple action names in
the same line, but it was not allowing that because of a incorrect check in the
argumentes counter. Also the documentation was updated to show that this usage
of the command is possible.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@195369 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoRollback commit 195367.
Eliel C. Sardanons [Mon, 18 May 2009 20:44:54 +0000 (20:44 +0000)]
Rollback commit 195367.

The CLI command 'manager show command' supports passing multiple AMI actions
at a time. The issue with this command was in another place.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@195368 65c4cc65-6c06-0410-ace0-fbb531ad65f3