asterisk/asterisk.git
11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 years agoAvoid autocompleting passed the action name argument in the CLI command.
Eliel C. Sardanons [Mon, 18 May 2009 20:31:29 +0000 (20:31 +0000)]
Avoid autocompleting passed the action name argument in the CLI command.

When running the autocomplete of the CLI command 'manager show command <action>'
it was autocompleting everything else after the <action> argument, giving an error,
because this command doesn't support multiple AMI action names at a time.

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

11 years agoMove AGI documentation from static to the XML form.
Eliel C. Sardanons [Mon, 18 May 2009 20:18:43 +0000 (20:18 +0000)]
Move AGI documentation from static to the XML form.

Move the AGI commands 'receive text', 'receive char' and 'record'
static documentation to XML docs.

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

11 years agoMove the spawn of astcanary down, until after the call to daemon(3).
Tilghman Lesher [Mon, 18 May 2009 19:17:15 +0000 (19:17 +0000)]
Move the spawn of astcanary down, until after the call to daemon(3).
This avoids possible conflicts with the internal implementation of
daemon(3).
(closes issue #15093)
 Reported by: tzafrir
 Patches:
       20090513__issue15093__2.diff.txt uploaded by tilghman (license 14)
 Tested by: tzafrir

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

11 years agoFix externalivr's setvariable command so that it properly sets multiple variables.
Mark Michelson [Mon, 18 May 2009 18:58:26 +0000 (18:58 +0000)]
Fix externalivr's setvariable command so that it properly sets multiple variables.

The command had a for loop that was guaranteed to only execute once since
the continuation operation of the loop would set the input buffer NULL. I rewrote
the loop so that its operation was more obvious, and it would set multiple variables
correctly.

I also reduced stack space required for the function, constified the input string,
and modified the function so that it would not modify the input string while I was
at it.

(closes issue #15114)
Reported by: chris-mac
Patches:
      15114.patch uploaded by mmichelson (license 60)
Tested by: chris-mac

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

11 years agoRemove some unused code.
Sean Bright [Mon, 18 May 2009 17:08:25 +0000 (17:08 +0000)]
Remove some unused code.

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

11 years agoThe facilityenable parameter does not have anything to do with pritimer parameters.
Richard Mudgett [Mon, 18 May 2009 16:29:06 +0000 (16:29 +0000)]
The facilityenable parameter does not have anything to do with pritimer parameters.

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

11 years agoConst-ify a string, fix a log message, and use the correct signature for the
Sean Bright [Mon, 18 May 2009 15:55:53 +0000 (15:55 +0000)]
Const-ify a string, fix a log message, and use the correct signature for the
load_module function.

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

11 years agoMerged revisions 195206 via svnmerge from
Joshua Colp [Mon, 18 May 2009 15:53:26 +0000 (15:53 +0000)]
Merged revisions 195206 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r195206 | file | 2009-05-18 12:51:22 -0300 (Mon, 18 May 2009) | 7 lines

  Fix a typo which caused loss of audio when using G729 in some scenarios with a smoother present.

  (closes issue #15105)
  Reported by: bamby
  Patches:
        process-vad-correctly.diff uploaded by bamby (license 430)
........

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

11 years agoAllow cdr_custom to write to multiple files instead of just one.
Sean Bright [Mon, 18 May 2009 14:54:43 +0000 (14:54 +0000)]
Allow cdr_custom to write to multiple files instead of just one.

Up to now, cdr_custom would only accept a single filename/format from
cdr_custom.conf.  This change allows you to specify multiple filename
& format directives.

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

11 years agoWarn about the use of the application WaitExten() within a Macro().
Eliel C. Sardanons [Mon, 18 May 2009 14:45:23 +0000 (14:45 +0000)]
Warn about the use of the application WaitExten() within a Macro().

Update applications documentation to warn the user about the use of the
WaitExten() application within a Macro(). Recommend the use of Read()
instead.

(closes issue #14444)
Reported by: ewieling

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

11 years agoMerged revisions 195095 via svnmerge from
Joshua Colp [Mon, 18 May 2009 13:56:16 +0000 (13:56 +0000)]
Merged revisions 195095 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r195095 | file | 2009-05-18 10:53:39 -0300 (Mon, 18 May 2009) | 5 lines

  Fix a bug where the codecs of the called party leg were not properly sent back to the caller call leg when reinvited.

  (closes issue #13569)
  Reported by: bkw918
........

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

11 years agoFix a bug where specifying an empty outboundproxy would cause packets to get sent...
Joshua Colp [Mon, 18 May 2009 13:36:17 +0000 (13:36 +0000)]
Fix a bug where specifying an empty outboundproxy would cause packets to get sent to ourself.

(closes issue #15106)
Reported by: timeshell

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

11 years agoDo not avoid loading the XML documentation if not XInclude substitution is done.
Eliel C. Sardanons [Mon, 18 May 2009 13:30:34 +0000 (13:30 +0000)]
Do not avoid loading the XML documentation if not XInclude substitution is done.

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

11 years agoRecorded merge of revisions 195020 via svnmerge from
Russell Bryant [Mon, 18 May 2009 12:59:11 +0000 (12:59 +0000)]
Recorded merge of revisions 195020 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r195020 | russell | 2009-05-18 07:57:46 -0500 (Mon, 18 May 2009) | 5 lines

  Don't try to unlock a bogus channel.

  (closes issue #15144)
  Reported by: cristiandimache
........

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

11 years agoAllow to include sections of other parts of the xml documentation.
Eliel C. Sardanons [Sat, 16 May 2009 20:01:22 +0000 (20:01 +0000)]
Allow to include sections of other parts of the xml documentation.

Avoid duplicating xml documentation by allowing to include other parts of
the xml documentation using XInclude.
Example:
   <xi:include xpointer="xpointer(/docs/function[@name='CHANNEL']/synopsis)" />
(Insert this line to include the synopsis of the CHANNEL function xml
documentation).

It is also possible to include documentation from other files in the
'documentation/' directory using the href="" attribute inside a xinclude
element.

(closes issue #15107)
Reported by: lmadsen

(issue #14444)
Reported by: ewieling

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

11 years agoFix a missing unlock in case of error, and a missing free().
Eliel C. Sardanons [Sat, 16 May 2009 18:32:11 +0000 (18:32 +0000)]
Fix a missing unlock in case of error, and a missing free().

Always free the allocated memory for a string field, because
we are always using it (not only when xmldocs are enabled).
Also if there is an error allocating memory for the string field
remember to unlock the list of registered applications, before returning.

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

11 years agoMerged revisions 194873 via svnmerge from
David Vossel [Fri, 15 May 2009 22:44:44 +0000 (22:44 +0000)]
Merged revisions 194873 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r194873 | dvossel | 2009-05-15 17:43:13 -0500 (Fri, 15 May 2009) | 17 lines

  IAX2 REGAUTH loop

  IAX was not sending REGREJ to terminate invalid registrations.  Instead it sent another REGAUTH if the authentication challenge failed.  This caused a loop of REGREQ and REGAUTH frames.

  (Related to Security fix AST-2009-001)

  (closes issue #14867)
  Reported by: aragon
  Tested by: dvossel

  (closes issue #14717)
  Reported by: mobeck
  Patches:
        regauth_loop_update_patch.diff uploaded by dvossel (license 671)
  Tested by: dvossel
........

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

11 years agoMerged revisions 194557,194685 via svnmerge from
David Vossel [Fri, 15 May 2009 20:52:12 +0000 (20:52 +0000)]
Merged revisions 194557,194685 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r194557 | dvossel | 2009-05-14 17:59:43 -0500 (Thu, 14 May 2009) | 10 lines

  IAX2 "Ghost" Channels

  There is a bug tracker issue where people are reporting "Ghost" channels in their 'iax2 show channels' output.  The confusion is caused by channels being listed as "(NONE)" with format "unknown".  These are not channels of coarse.  They are usually just pending registration or poke requests, but it is confusing output.  To help make sense of this I have added two columns to 'iax2 show channels'.  One shows the first message which started the transaction, and the second shows the last message sent by either side of the call.  This helps diagnose why the entry exists and why it may not go away.

  (closes issue #14207)
  Reported by: clive18

  Review: https://reviewboard.asterisk.org/r/246/
........
  r194685 | dvossel | 2009-05-15 10:40:37 -0500 (Fri, 15 May 2009) | 6 lines

  Update to previous IAX2 "Ghost" Channels patch.

  Fixed some comments made on reviewboard for the previous patch.

  (issue #14207)
........

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

11 years agoMerged revisions 194764 via svnmerge from
Russell Bryant [Fri, 15 May 2009 18:43:42 +0000 (18:43 +0000)]
Merged revisions 194764 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r194764 | russell | 2009-05-15 13:43:18 -0500 (Fri, 15 May 2009) | 2 lines

Fix some spelling fail.

........

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

11 years agoShuttle some bits around to address some gain issues with G.722.
Russell Bryant [Fri, 15 May 2009 17:59:08 +0000 (17:59 +0000)]
Shuttle some bits around to address some gain issues with G.722.

(closes AST-209)

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

11 years agoFurther simplify codec_g722 build.
Russell Bryant [Fri, 15 May 2009 17:37:12 +0000 (17:37 +0000)]
Further simplify codec_g722 build.

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

11 years agoActually force running make for g722.
Russell Bryant [Fri, 15 May 2009 17:24:39 +0000 (17:24 +0000)]
Actually force running make for g722.

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

11 years agoadd eliel
Michiel van Baak [Fri, 15 May 2009 13:43:24 +0000 (13:43 +0000)]
add eliel

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

11 years agoAllow to specify an enumlist inside an enum.
Eliel C. Sardanons [Fri, 15 May 2009 13:23:37 +0000 (13:23 +0000)]
Allow to specify an enumlist inside an enum.

It was not possible to use an enumlist inside an enum:
<enumlist>
   <enum name="aa">
      <enumlist>
         ...
      </enumlist>
   </enum>
</enumlist>
Now we will be able to insert as many levels as we want.

(closes issue #15112)
Reported by: lmadsen

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

11 years agoAdd ability for modules to dynamically register logger levels
Kevin P. Fleming [Fri, 15 May 2009 13:13:47 +0000 (13:13 +0000)]
Add ability for modules to dynamically register logger levels

This patch adds the ability for modules to dynamically create logger levels for their own use; these are named levels just like the built-in levels, and can be directed to any destination that the logger can send any level to, by including their names in logger.conf.

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

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

11 years agoMerged revisions 194509 via svnmerge from
Kevin P. Fleming [Thu, 14 May 2009 22:26:02 +0000 (22:26 +0000)]
Merged revisions 194509 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r194509 | kpfleming | 2009-05-14 17:23:49 -0500 (Thu, 14 May 2009) | 1 line

  Update URL to Reviewboard
........

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

11 years agoMerged revisions 194484 via svnmerge from
Mark Michelson [Thu, 14 May 2009 22:20:51 +0000 (22:20 +0000)]
Merged revisions 194484 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r194484 | mmichelson | 2009-05-14 17:17:55 -0500 (Thu, 14 May 2009) | 24 lines

  Fix a race condition where a reinvite could trigger a 482 response.

  The loop detection/spiral detection code in chan_sip used the owner
  channel's state as a criterion for determining if the incoming INVITE
  is a looped request. The problem with this is that the INVITE-handling
  code happens in a different thread than the thread that marks the owner
  channel as being up. As a result, if a reinvite were to come in very quickly,
  say from another Asterisk on the same LAN, it was possible for the reinvite
  to arrive before the owner channel had been set to the up state.

  This patch corrects the problem by using the invitestate of the sip_pvt
  instead, since that can be guaranteed to be set correctly by the time
  the reinvite arrives. Since there is a switch statement further in the
  INVITE-handling code, the AST_STATE_RINGING state also checks the invitestate
  of the sip_pvt in case we should actually be treating the channel as if it were
  up already.

  (closes issue #12215)
  Reported by: jpyle
  Patches:
        12215_confirmed.patch uploaded by mmichelson (license 60)
  Tested by: lmadsen
........

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

11 years agoAdd outgoing_colp misdn.conf port parameter.
Richard Mudgett [Thu, 14 May 2009 22:03:49 +0000 (22:03 +0000)]
Add outgoing_colp misdn.conf port parameter.

Select what to do with outgoing COLP information on this port.
0 - Send out COLP information unaltered. (default)
1 - Force COLP to restricted on all outgoing COLP information.
2 - Do not send COLP information.
outgoing_colp=0

Also fixed sending the EctInform message so it always has the
required redirectionNumber parameter when the status is active.

JIRA ABE-1853

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

11 years agoFix a typo where an equality check should be an assignment.
Russell Bryant [Thu, 14 May 2009 21:24:17 +0000 (21:24 +0000)]
Fix a typo where an equality check should be an assignment.

(closes issue #15103)
Reported by: lmsteffan
Patches:
      transfer_crash.patch uploaded by lmsteffan (license 779)

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

11 years agoFix a bug where the 'T' option to Meetme did not work.
Joshua Colp [Thu, 14 May 2009 17:05:33 +0000 (17:05 +0000)]
Fix a bug where the 'T' option to Meetme did not work.

(closes issue #15031)
Reported by: Stochastic
(closes issue #13801)
Reported by: justdave

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

11 years agoIf the timing ended on a zero, then we would loop forever.
Tilghman Lesher [Thu, 14 May 2009 16:22:14 +0000 (16:22 +0000)]
If the timing ended on a zero, then we would loop forever.
(closes issue #14983)
 Reported by: teox
 Patches:
       20090513__issue14983.diff.txt uploaded by tilghman (license 14)
 Tested by: teox

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

11 years agoBlocked revisions 194356 via svnmerge
Mark Michelson [Wed, 13 May 2009 19:42:51 +0000 (19:42 +0000)]
Blocked revisions 194356 via svnmerge

........
  r194356 | mmichelson | 2009-05-13 14:41:44 -0500 (Wed, 13 May 2009) | 13 lines

  Remove an extraneous unlocking operation from ast_channel_free.

  In the case that we could not remove the desired channel from the
  list of channels, there was an extra call to unlock the channel list.
  Since we unlock the list later on in the function anyway, this results
  in the list being unlocked twice yet only being locked once.

  (closes issue #15098)
  Reported by: tim_ringenbach
  Patches:
        remove_extra_unlock.diff uploaded by tim (license 540)
........

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

11 years agoDo not lock the 'sessions' container, lock the allocated 'session'.
Eliel C. Sardanons [Wed, 13 May 2009 15:02:10 +0000 (15:02 +0000)]
Do not lock the 'sessions' container, lock the allocated 'session'.

There was a typo in the structure being locked, and we were locking the
'sessions' container instead of the 'session' structure thar we are modifying.
Reported by seanbright on #asterisk-dev, thanks!

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

11 years agoMerged revisions 194208 via svnmerge from
Joshua Colp [Wed, 13 May 2009 13:39:10 +0000 (13:39 +0000)]
Merged revisions 194208 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r194208 | file | 2009-05-13 10:38:01 -0300 (Wed, 13 May 2009) | 11 lines

  Fix RFC2833 issues with DTMF getting duplicated and with duration wrapping over.

  (closes issue #14815)
  Reported by: geoff2010
  Patches:
        v1-14815.patch uploaded by dimas (license 88)
  Tested by: geoff2010, file, dimas, ZX81, moliveras
  (closes issue #14460)
  Reported by: moliveras
  Tested by: moliveras
........

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

11 years agoMerged revisions 194137 via svnmerge from
Tilghman Lesher [Wed, 13 May 2009 00:52:49 +0000 (00:52 +0000)]
Merged revisions 194137 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r194137 | tilghman | 2009-05-12 19:52:03 -0500 (Tue, 12 May 2009) | 7 lines

  Fix logic for how to proceed with a single digit extension.
  (closes issue #15091)
   Reported by: andrew
   Patches:
         20090512__issue15091.diff.txt uploaded by tilghman (license 14)
   Tested by: andrew
........

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

11 years agoTwo fixes found while debugging with ast_backtrace():
Tilghman Lesher [Wed, 13 May 2009 00:13:43 +0000 (00:13 +0000)]
Two fixes found while debugging with ast_backtrace():

1) If MALLOC_DEBUG is used when concurrently using ast_backtrace, the free()
used in that routine will trigger an error, because the memory was allocated
internally to libc, where we could not intercept that call to wrap it.
Therefore, it's not memory we knew about, and the free is reported as an
error.

2) Now that channels are objects, the old hack of initializing a channel
to all zeroes no longer works, since we may try to call something like
ast_channel_lock() within a function on that reference.  In that case, it's
reported as an error, because the pointer isn't an object reference.

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

11 years agoFix a crash when logging out from the AMI and avoid astobj2 warning messages.
Eliel C. Sardanons [Tue, 12 May 2009 22:49:13 +0000 (22:49 +0000)]
Fix a crash when logging out from the AMI and avoid astobj2 warning messages.

When the user logout the session was being destroyed twice and the file
descriptor was being closed twice. The sessions reference counter wasn't
used in a proper way.
The 'mansession' structure was being treated as an astobj2 and we were
calling ao2_lock/ao2_unlock causing astobj2 report a warning message and
not locking the structure.
Also we were using an ugly naming convention 'destroy_session',
'session_destroy', 'free_session', ... all this "duplicated" code was merged.

(closes issue #14974)
Reported by: pj
Patches:
      manager.diff2 uploaded by eliel (license 64)
      Tested by: dhubbard, eliel, mnicholson

(closes issue #15088)
Reported by: eliel

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

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

11 years agoMerged revisions 194028 via svnmerge from
Matthew Nicholson [Tue, 12 May 2009 22:32:13 +0000 (22:32 +0000)]
Merged revisions 194028 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r194028 | mnicholson | 2009-05-12 17:15:45 -0500 (Tue, 12 May 2009) | 16 lines

  This change modifies app_queue to properly generate CDR records in failure
  situations.

  This involves setting a proper cdr disposition coresponding to the given
  failure condition and ensuring the proper information is stored in the cdr
  record.

  (closes issue #13691)
  Reported by: dferrer
  Tested by: mnicholson

  (closes issue #13637)
  Reported by: atis
  Tested by: atis
........

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

11 years agoMerged revisions 193955 via svnmerge from
Tilghman Lesher [Tue, 12 May 2009 20:40:22 +0000 (20:40 +0000)]
Merged revisions 193955 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r193955 | tilghman | 2009-05-12 15:39:21 -0500 (Tue, 12 May 2009) | 6 lines

  Avoid initializing routines if the authentication fails.  Fixes a crash (RR) issue.
  (closes issue #14508)
   Reported by: tiziano
   Patches:
         20090221_2_wrongmailbox.diff.txt uploaded by tiziano (license 377)
........

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

11 years agoUpdate spiral support in trunk and 1.6.X to match what is in 1.4.
Mark Michelson [Tue, 12 May 2009 20:28:13 +0000 (20:28 +0000)]
Update spiral support in trunk and 1.6.X to match what is in 1.4.

In 1.4, a SIP spiral is treated the same way as a call forward. This
works much better than what is currently in trunk and 1.6.X. The code
in trunk and 1.6.X did not create a new call to the recipient of the spiral,
instead trying to continue the same call. In addition to just being plain
wrong, this also had the side effect of only being able to spiral calls
to other SIP channels.

With this in place, as long as call forwards are honored, SIP spirals
will work properly. This means that it will work for outbound calls
made  by the Queue, Dial, and Page applications. For originated calls and
spool calls, however, the spiral will not work properly until a generic
call forward mechanism is introduced into Asterisk.

(relates to issue #13630)

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

11 years agoBlocked revisions 193880 via svnmerge
Mark Michelson [Tue, 12 May 2009 18:20:14 +0000 (18:20 +0000)]
Blocked revisions 193880 via svnmerge

........
  r193880 | mmichelson | 2009-05-12 13:18:44 -0500 (Tue, 12 May 2009) | 12 lines

  Set the invitestate to INV_CANCELLED only if we are actually sending a SIP CANCEL.

  The problem was that the hangup code was setting the invitestate too early. The result of
  this was that we would always send a CANCEL request, even if it was not an appropriate
  time to do so (e.g. we have not yet received a provisional response for our INVITE).

  Note that this same fix had been applied to trunk and the 1.6.X branches starting with
  revision 155467. This is why you will see this revision being blocked from those places.

  AST-216
........

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

11 years agoConvert a THREADSTORAGE object into a simple malloc'd object (as suggested by Russell...
Tilghman Lesher [Tue, 12 May 2009 17:29:33 +0000 (17:29 +0000)]
Convert a THREADSTORAGE object into a simple malloc'd object (as suggested by Russell on -dev)

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

11 years agoadd 'const' qualifiers in various places where they should have been
Kevin P. Fleming [Tue, 12 May 2009 13:59:35 +0000 (13:59 +0000)]
add 'const' qualifiers in various places where they should have been

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

11 years agoFound and fixed a memory leak
Tilghman Lesher [Mon, 11 May 2009 23:04:14 +0000 (23:04 +0000)]
Found and fixed a memory leak

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

11 years agoRecorded merge of revisions 193755 via svnmerge from
Tilghman Lesher [Mon, 11 May 2009 22:50:47 +0000 (22:50 +0000)]
Recorded merge of revisions 193755 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r193755 | tilghman | 2009-05-11 17:48:20 -0500 (Mon, 11 May 2009) | 18 lines

  Move 300 bytes around on the stack, to make more room for an extension buffer.
  This allows more concurrent extensions to be copied for a single voicemail,
  without creating a possibility of upsetting existing users, where a dialplan
  could run out of stack space where it had run fine before.  Alternatively,
  we could have allocated off the heap, but that is a larger change and would
  have increased the chance for instability introduced by this change.

  This is really solved starting in 1.6.0.11, as the use of an ast_str buffer
  allows an unlimited number of extensions (up to available memory).  We
  additionally create a new warning message when the buffer length is exceeded,
  permitting administrators to see an issue after the fact, whereas previously
  the list was silently truncated.
  (closes issue #14739)
   Reported by: p_lindheimer
   Patches:
         20090417__bug14739.diff.txt uploaded by tilghman (license 14)
   Tested by: p_lindheimer
........

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

11 years agoFix some timer state corruption.
Russell Bryant [Mon, 11 May 2009 22:04:40 +0000 (22:04 +0000)]
Fix some timer state corruption.

In res_timer_timerfd, handle the case that set_rate gets called while a timer
is still in continuous mode.  In this case, we want to remember the configured
rate, but not actually set it until continuous mode has been disabled.

Thanks to dvossel for finding and helping to debug the problem.

(closes issue #15080)
Reported by: dvossel
Tested by: dvossel

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

11 years agoDon't nullify an ast_str pointer.
Tilghman Lesher [Mon, 11 May 2009 19:32:13 +0000 (19:32 +0000)]
Don't nullify an ast_str pointer.
(closes issue #15061)
 Reported by: alecdavis

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

11 years agoMerged revisions 193613 via svnmerge from
Richard Mudgett [Mon, 11 May 2009 19:11:29 +0000 (19:11 +0000)]
Merged revisions 193613 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r193613 | rmudgett | 2009-05-11 14:09:00 -0500 (Mon, 11 May 2009) | 12 lines

  Sent wrong message to clear a call we started if the other end has not responed yet.

  In the state MISDN_CALLING (i.e. SETUP was sent but no answer has arrived yet),
  it is not allowed to clear the call with RELEASE_COMPLETE.  It must be
  cleared with DISCONNECT.  A RELEASE_COMPLETE is only allowed as an answer
  to a SETUP.  (See Q.931 ch. 5.3.2, 5.3.2.a, 5.3.2.b)

  Patches:
      chan-misdn-ccstate7.patch uploaded by customer.

  JIRA ABE-1862
........

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

11 years agoRecorded merge of revisions 193544 via svnmerge from
Leif Madsen [Mon, 11 May 2009 18:01:44 +0000 (18:01 +0000)]
Recorded merge of revisions 193544 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r193544 | lmadsen | 2009-05-11 13:35:17 -0400 (Mon, 11 May 2009) | 7 lines

  Document CHANNEL(transfercapability) in CLI documentation.

  (issue #15073)
  Reported by: pkempgen
  Patches:
        20090511__issue15073.diff.txt uploaded by tilghman (license 14)
........

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

11 years agoFix a bug where receiving a control frame of subclass -1 would cause certain channels...
Joshua Colp [Sun, 10 May 2009 17:07:46 +0000 (17:07 +0000)]
Fix a bug where receiving a control frame of subclass -1 would cause certain channels to get hung up.

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

11 years agoMinor documentation update for ast_event_queue().
Russell Bryant [Sat, 9 May 2009 11:33:09 +0000 (11:33 +0000)]
Minor documentation update for ast_event_queue().

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

11 years agoDeclare private data as static.
Russell Bryant [Sat, 9 May 2009 11:30:15 +0000 (11:30 +0000)]
Declare private data as static.

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

11 years agoTCP not matching valid peer.
David Vossel [Fri, 8 May 2009 20:32:51 +0000 (20:32 +0000)]
TCP not matching valid peer.

find_peer() does not find a valid peer when using pvt->recv as the sockaddr_in argument.  Because of the way TCP works, the port number in pvt->recv is not what we're looking for at all.  There is currently only one place that find_peer searches for a peer using the sockaddr_in argument.  If the peer is not found after using pvt->recv (works for UDP since the port number will be correct), a temp sockaddr_in struct is made using the Contact header in the sip_request.  This has the correct port number in it.

Review: http://reviewboard.digium.com/r/236/

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

11 years agoReset the members' call counts when resetting queue statistics.
Mark Michelson [Fri, 8 May 2009 19:50:44 +0000 (19:50 +0000)]
Reset the members' call counts when resetting queue statistics.

This helps to prevent odd scenarios where a queue will claim to have
taken 0 calls, but the members appear to have taken a non-zero amount.

(closes issue #15068)
Reported by: sum
Patches:
      patchreset.patch uploaded by sum (license 766)
Tested by: sum

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

11 years agoFix the spelling of UNAVAILABLE in func_devstate CLI completion.
Sean Bright [Fri, 8 May 2009 15:18:40 +0000 (15:18 +0000)]
Fix the spelling of UNAVAILABLE in func_devstate CLI completion.

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

11 years agoMerged revisions 193262 via svnmerge from
David Vossel [Fri, 8 May 2009 14:52:19 +0000 (14:52 +0000)]
Merged revisions 193262 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r193262 | dvossel | 2009-05-08 09:51:09 -0500 (Fri, 08 May 2009) | 9 lines

  "misdn show config" segfaults asterisk, if no MSN lists

  (closes issue #14976)
  Reported by: alecdavis
  Patches:
        misdn_config.diff.txt uploaded by alecdavis (license 585)
  Tested by: alecdavis, FabienToune
........

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

11 years agoMerged revisions 193193 via svnmerge from
Kevin P. Fleming [Fri, 8 May 2009 14:06:15 +0000 (14:06 +0000)]
Merged revisions 193193 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r193193 | kpfleming | 2009-05-08 09:03:28 -0500 (Fri, 08 May 2009) | 7 lines

  Make absolute paths for logger channels work properly

  (Note: This is not a new feature, it was previously undocumented and broken.)

  The Asterisk logger has a feature to support absolute pathnames for logger channels, but the code implementing the feature was broken. This has been fixed, and the absolute path feature is now documented in the sample logger.conf.
........

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

11 years agoMerged revisions 193119 via svnmerge from
Tilghman Lesher [Thu, 7 May 2009 23:42:28 +0000 (23:42 +0000)]
Merged revisions 193119 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r193119 | tilghman | 2009-05-07 18:41:11 -0500 (Thu, 07 May 2009) | 19 lines

  Fix Background within a Macro for FreePBX.
  If the single digit DTMF is an extension in the specified context, then
  go there and signal no DTMF.  Otherwise, we should exit with that DTMF.
  If we're in Macro, we'll exit and seek that DTMF as the beginning of an
  extension in the Macro's calling context.  If we're not in Macro, then
  we'll simply seek that extension in the calling context.  Previously,
  someone complained about the behavior as it related to the interior of a
  Gosub routine, and the fix (#14011) inadvertently broke FreePBX
  (#14940).  This change should fix both of these situations, but with the
  possible incompatibility that if a single digit extension does not exist
  (but a longer extension COULD have matched), it would have previously
  gone immediately to the "i" extension, but will now need to wait for a
  timeout.
  (closes issue #14940)
   Reported by: p_lindheimer
   Patches:
         20090420__bug14940.diff.txt uploaded by tilghman (license 14)
   Tested by: p_lindheimer
........

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

11 years agoMerged revisions 193050 via svnmerge from
Richard Mudgett [Thu, 7 May 2009 22:24:04 +0000 (22:24 +0000)]
Merged revisions 193050 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r193050 | rmudgett | 2009-05-07 17:17:06 -0500 (Thu, 07 May 2009) | 5 lines

  Give a more helpful message when an incoming call's dialed extension does not match.

  Added the dialed extension and context to the chan_misdn messages warning
  that the dialed number cannot be matched in the dialplan.
........

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

11 years agoSecond result should not contain data from the first result.
Tilghman Lesher [Thu, 7 May 2009 17:51:13 +0000 (17:51 +0000)]
Second result should not contain data from the first result.
(closes issue #15039)
 Reported by: jims
 Patches:
       20090506__issue15039.diff.txt uploaded by tilghman (license 14)
 Tested by: jims

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

11 years agoSend DTMF frame before playing back audio.
Tilghman Lesher [Thu, 7 May 2009 17:13:36 +0000 (17:13 +0000)]
Send DTMF frame before playing back audio.
(closes issue #14858)
 Reported by: barryf
 Patches:
       20090507__bug14858.diff.txt uploaded by tilghman (license 14)

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

11 years agoMerged revisions 192932 via svnmerge from
Tilghman Lesher [Thu, 7 May 2009 16:43:56 +0000 (16:43 +0000)]
Merged revisions 192932 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r192932 | tilghman | 2009-05-07 11:29:08 -0500 (Thu, 07 May 2009) | 10 lines

  Eliminate repetition of fullcontact during reconstruction.
  If the fullcontact field appears in both the sippeers and the
  sipregs table, then during reconstruction of the field, it will
  otherwise be doubled.
  (closes issue #14754)
   Reported by: Alexei Gradinari
   Patches:
         20090506__bug14754.diff.txt uploaded by tilghman (license 14)
   Tested by: lmadsen
........

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

11 years agoMerged revisions 192858 via svnmerge from
Jeff Peeler [Wed, 6 May 2009 22:17:27 +0000 (22:17 +0000)]
Merged revisions 192858 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r192858 | jpeeler | 2009-05-06 17:15:19 -0500 (Wed, 06 May 2009) | 10 lines

  Make ParkedCall application stop execution of the dialplan after hang up

  Just changed park_exec to always return non-zero. I really wasn't entirely sure
  at first if this was a bug. Decided it was since it would be surprising when
  not using ParkedCall in the dialplan to hang up and have dialplan execution
  continue.

  (closes issue #14555)
  Reported by: francesco_r
........

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