Commit Graph

209 Commits

Author SHA1 Message Date
Terry Wilson
bec22e5c1f Merged revisions 310889 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2

................
  r310889 | twilson | 2011-03-16 12:03:27 -0500 (Wed, 16 Mar 2011) | 36 lines
  
  Merged revisions 310888 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r310888 | twilson | 2011-03-16 11:58:42 -0500 (Wed, 16 Mar 2011) | 29 lines
    
    Don't delay DTMF in core bridge while listening for DTMF features
    
    This patch is mostly the work of Olle Johansson. I did some cleanup and
    added the silence generating code if transmit_silence is set.
    
    When a channel listens for DTMF in the core bridge, the outbound DTMF is not
    sent until we have received DTMF_END. For a long DTMF, this is a disaster. We
    send 4 seconds of DTMF to Asterisk, which sends no audio for those 4 seconds.
    Some products see this delay and the time skew on RTP packets that results and
    start ignoring the audio that is sent afterward.
    
    With this change, the DTMF_BEGIN frame is inspected and checked. If it matches
    a feature code, we wait for DTMF_END and activate the feature as before. If
    transmit_silence=yes in asterisk.conf, silence is sent if we paritally match a
    multi-digit feature. If it doesn't match a feature, the frame is forwarded
    along with the DTMF_END without delay. By doing it this way, DTMF is not delayed.
    
    (closes issue #15642)
    Reported by: jasonshugart
    Patches: 
          issue_15652_dtmf_ast-1.4.patch.txt uploaded by twilson (license 396)
    Tested by: globalnetinc, jde
    
    (closes issue #16625)
    Reported by: sharvanek
    
    Review: https://reviewboard.asterisk.org/r/1092/
    Review: https://reviewboard.asterisk.org/r/1125/
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@310902 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-03-16 17:19:57 +00:00
Jeff Peeler
e07ccee87f Merged revisions 307227 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2

........
  r307227 | jpeeler | 2011-02-09 13:52:12 -0600 (Wed, 09 Feb 2011) | 11 lines
  
  Make sure to set parking dial context for non-default parking lots.
  
  Since parking_con_dial isn't settable, set all parking lots to "park-dial".
  
  (closes issue #17946)
  Reported by: bluecrow76
  Patches:
        asterisk-1.8.0-beta4-multipark-fixes-2010SEP02.diff uploaded by bluecrow76 (license 270)
        modified by me
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@307228 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-02-09 19:52:51 +00:00
Terry Wilson
36f5dd0013 Merged revisions 306673 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2

................
  r306673 | twilson | 2011-02-07 14:40:20 -0800 (Mon, 07 Feb 2011) | 17 lines
  
  Merged revisions 306672 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r306672 | twilson | 2011-02-07 14:35:20 -0800 (Mon, 07 Feb 2011) | 10 lines
    
    Don't try to pickup a call in the middle of a masquerade
    
    If A calls B which doesn't answer and C & D both try to do a call pickup, it is
    possible for ast_pickup_call to answer the call, then fail to masquerade one of
    the calls because the other one is already in the process of masquerading. This
    patch checks to see if the channel is in the process of masquerading before
    call before selecting it for a pickup.
    
    Review: https://reviewboard.asterisk.org/r/1094/
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@306674 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-02-07 22:43:22 +00:00
Jeff Peeler
3ff8273840 Merged revisions 306123 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2

........
  r306123 | jpeeler | 2011-02-03 14:49:48 -0600 (Thu, 03 Feb 2011) | 10 lines
  
  Set exception on channel in parking thread when POLLPRI event detected.
  
  This is done just to make the code be equivalent to the old select code. As
  noted in 303106 the same issue was already fixed in this branch, but the
  exception was not set on the channel in the case of POLLPRI. The reason that
  this did not cause a problem here is because in 122923 the check in __ast_read
  to check the exception flag was removed.
  
  (related to #18637)
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@306124 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-02-03 20:50:48 +00:00
Jeff Peeler
81c72dfedc Merged revisions 304338 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2

........
  r304338 | jpeeler | 2011-01-26 16:26:37 -0600 (Wed, 26 Jan 2011) | 2 lines
  
  Change delimiter used internally for GOTO_ON_BLINDXFR to commas to match 76703.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@304339 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-01-26 22:27:30 +00:00
Richard Mudgett
0c837cdf57 Merged revisions 304006 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2

................
  r304006 | rmudgett | 2011-01-25 17:25:32 -0600 (Tue, 25 Jan 2011) | 15 lines
  
  Merged revisions 304005 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r304005 | rmudgett | 2011-01-25 17:21:09 -0600 (Tue, 25 Jan 2011) | 8 lines
    
    DTMF attended transfers sometimes fail for no apparent reason.
    
    The loop in feature_request_and_dial() can exit when Party C has answered
    without processing an AST_CONTROL_ANSWER.  Also sometimes an
    AST_CONTROL_ANSWER never happens even though Party C has answered.
    
    Don't hangup Party C if he is up or we receive an AST_CONTROL_ANSWER.
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@304007 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-01-25 23:28:25 +00:00
Russell Bryant
cfc893a5bc Merged revisions 303548 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2

................
  r303548 | russell | 2011-01-24 14:49:53 -0600 (Mon, 24 Jan 2011) | 38 lines
  
  Merged revisions 303546 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r303546 | russell | 2011-01-24 14:32:21 -0600 (Mon, 24 Jan 2011) | 31 lines
    
    Fix channel redirect out of MeetMe() and other issues with channel softhangup.
    
    Mantis issue #18585 reports that a channel redirect out of MeetMe() stopped
    working properly.  This issue includes a patch that resolves the issue by
    removing a call to ast_check_hangup() from app_meetme.c.  I left that in my
    patch, as it doesn't need to be there.  However, the rest of the patch fixes
    this problem with or without the change to app_meetme.
    
    The key difference between what happens before and after this patch is the
    effect of the END_OF_Q control frame.  After END_OF_Q is hit in ast_read(),
    ast_read() will return NULL.  With the ast_check_hangup() removed, app_meetme
    sees this which causes it to exit as intended.  Checking ast_check_hangup()
    caused app_meetme to exit earlier in the process, and the target of the
    redirect saw the condition where ast_read() returned NULL.
    
    Removing ast_check_hangup() works around the issue in app_meetme, but doesn't
    solve the issue if another application did the same thing.  There are also
    other edge cases where if an application finishes at the same time that a
    redirect happens, the target of the redirect will think that the channel hung
    up.  So, I made some changes in pbx.c to resolve it at a deeper level.  There
    are already places that unset the SOFTHANGUP_ASYNCGOTO flag in an attempt to
    abort the hangup process.  My patch extends this to remove the END_OF_Q frame
    from the channel's read queue, making the "abort hangup" more complete.  This
    same technique was used in every place where a softhangup flag was cleared.
    
    (closes issue #18585)
    Reported by: oej
    Tested by: oej, wedhorn, russell
    
    Review: https://reviewboard.asterisk.org/r/1082/
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@303549 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-01-24 20:51:37 +00:00
Shaun Ruffell
98b01f964f Merged revisions 303106 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2

........
  r303106 | sruffell | 2011-01-20 13:56:34 -0600 (Thu, 20 Jan 2011) | 15 lines
  
  main/features: Use POLLPRI when waiting for events on parked channels.
  
  This change resolves a regression in the 1.6.2 when converting from
  select to poll.  The DAHDI timers use POLLPRI to indicate that the timer
  fired, but features was not waiting for that flag.  The result was no
  audio for MOH when a call was parked and res_timing_dahdi was in use.
  
  This patch is slightly modified from the one on the mantis issue.  It does
  not set an exception on the channel if the POLLPRI flag is set.
  
  (closes issue #18262)
  Reported by: francesco_r
  Patches:
        patch_park_moh-trunk-2.txt uploaded by cjacobsen (license 1029)
        Tested by: francesco_r, rfrantik, one47
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@303107 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-01-20 19:57:31 +00:00
Richard Mudgett
d1abc2fcb3 Merged revisions 302693 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2

................
  r302693 | rmudgett | 2011-01-19 15:25:41 -0600 (Wed, 19 Jan 2011) | 22 lines
  
  Merged revisions 302671 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r302671 | rmudgett | 2011-01-19 15:21:56 -0600 (Wed, 19 Jan 2011) | 15 lines
    
    DTMF transfer plays the wrong sounds for wrong number or other call failure.
    
    * Set the default for features.conf.sample xferfailsound option to "beeperr"
    as documented instead of "pbx-invalid" and corrected the use of it in DTMF
    blind transfer (#1).
    
    * Improved DTMF blind transfer handling of wrong numbers.
    
    Most of the concerns in this issue were taken care of by the patch for
    issue 17999: Issues with DTMF triggered attended transfers.
    
    (closes issue #18379)
    Reported by: gincantalupo
    Tested by: rmudgett
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@302713 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-01-19 21:29:22 +00:00
Sean Bright
4b5115b170 Merged revisions 302551 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2

........
  r302551 | seanbright | 2011-01-19 13:54:03 -0500 (Wed, 19 Jan 2011) | 7 lines
  
  Remove an extraneous \r\n at the end of a parking manager events.
  
  (closes issue #18363)
  Reported by: clegall_proformatique
  Patches:
        asterisk_1.8_295998_parking_manager_events_format.patch uploaded by clegall proformatique (license 1139)
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@302552 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-01-19 18:54:47 +00:00
Richard Mudgett
42a17e5de0 Use the expanded format type instead of plain int.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@302318 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-01-18 22:04:14 +00:00
Richard Mudgett
d900b5dbc5 Merged revisions 302173 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2

................
  r302173 | rmudgett | 2011-01-18 12:07:15 -0600 (Tue, 18 Jan 2011) | 95 lines
  
  Merged revisions 302172 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r302172 | rmudgett | 2011-01-18 12:04:36 -0600 (Tue, 18 Jan 2011) | 88 lines
    
    Issues with DTMF triggered attended transfers.
    
    Issue #17999
    1) A calls B. B answers.
    2) B using DTMF dial *2 (code in features.conf for attended transfer).
    3) A hears MOH. B dial number C
    4) C ringing. A hears MOH.
    5) B hangup. A still hears MOH. C ringing.
    6) A hangup. C still ringing until "atxfernoanswertimeout" expires.
    For v1.4 C will ring forever until C answers the dead line. (Issue #17096)
    
    Problem: When A and B hangup, C is still ringing.
    
    Issue #18395
    SIP call limit of B is 1
    1. A call B, B answered
    2. B *2(atxfer) call C
    3. B hangup, C ringing
    4. Timeout waiting for C to answer
    5. Recall to B fails because B has reached its call limit.
    
    Because B reached its call limit, it cannot do anything until the transfer
    it started completes.
    
    Issue #17273
    Same scenario as issue 18395 but party B is an FXS port.  Party B cannot
    do anything until the transfer it started completes.  If B goes back off
    hook before C answers, B hears ringback instead of the expected dialtone.
    
    **********
    Note for the issue #17273 and #18395 fix:
    
    DTMF attended transfer works within the channel bridge.  Unfortunately,
    when either party A or B in the channel bridge hangs up, that channel is
    not completely hung up until the transfer completes.  This is a real
    problem depending upon the channel technology involved.
    
    For chan_dahdi, the channel is crippled until the hangup is complete.
    Either the channel is not useable (analog) or the protocol disconnect
    messages are held up (PRI/BRI/SS7) and the media is not released.
    
    For chan_sip, a call limit of one is going to block that endpoint from any
    further calls until the hangup is complete.
    
    For party A this is a minor problem.  The party A channel will only be in
    this condition while party B is dialing and when party B and C are
    conferring.  The conversation between party B and C is expected to be a
    short one.  Party B is either asking a question of party C or announcing
    party A.  Also party A does not have much incentive to hangup at this
    point.
    
    For party B this can be a major problem during a blonde transfer.  (A
    blonde transfer is our term for an attended transfer that is converted
    into a blind transfer.  :)) Party B could be the operator.  When party B
    hangs up, he assumes that he is out of the original call entirely.  The
    party B channel will be in this condition while party C is ringing, while
    attempting to recall party B, and while waiting between call attempts.
    
    WARNING:
    The ATXFER_NULL_TECH conditional is a hack to fix the problem.  It will
    replace the party B channel technology with a NULL channel driver to
    complete hanging up the party B channel technology.  The consequences of
    this code is that the 'h' extension will not be able to access any channel
    technology specific information like SIP statistics for the call.
    
    ATXFER_NULL_TECH is not defined by default.
    **********
    
    (closes issue #17999)
    Reported by: iskatel
    Tested by: rmudgett
    JIRA SWP-2246
    
    (closes issue #17096)
    Reported by: gelo
    Tested by: rmudgett
    JIRA SWP-1192
    
    (closes issue #18395)
    Reported by: shihchuan
    Tested by: rmudgett
    
    (closes issue #17273)
    Reported by: grecco
    Tested by: rmudgett
    
    Review: https://reviewboard.asterisk.org/r/1047/
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@302174 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-01-18 18:11:43 +00:00
Richard Mudgett
6e32efa8c2 Merged revisions 300165 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2

........
  r300165 | rmudgett | 2011-01-03 17:02:13 -0600 (Mon, 03 Jan 2011) | 4 lines
  
  Use correct variable for atxfercallbackretries config option.
  
  * Misc formatting changes.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@300166 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-01-03 23:14:55 +00:00
Leif Madsen
88b1f72afe Merged revisions 299087 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2

........
  r299087 | lmadsen | 2010-12-20 10:18:03 -0600 (Mon, 20 Dec 2010) | 5 lines
  
  Note that Park() timeout is milliseconds.
  
  (closes issue #15758)
  Reported by: mmurdock
  Tested by: mmurdock, seanbright
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@299088 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-12-20 16:18:26 +00:00
Terry Wilson
b42d70951b Don't crash after Set(CDR(userfield)=...) in ast_bridge_call
Instead of setting peer->cdr = NULL, set it to not post.

(closes issue #18415)
Reported by: macbrody
Patches: 
      patch-18415 uploaded by jsolares (license 1167)
Tested by: jsolares, twilson


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@297952 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-12-09 20:48:44 +00:00
Jason Parker
86460af890 Merged revisions 289339 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2

................
  r289339 | qwell | 2010-09-29 16:03:47 -0500 (Wed, 29 Sep 2010) | 15 lines
  
  Merged revisions 289338 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r289338 | qwell | 2010-09-29 15:56:26 -0500 (Wed, 29 Sep 2010) | 8 lines
    
    Allow a manager originate to succeed on forwarded devices.
    
    The timeout to wait for an answer was being set to 0 when a device forwarded to another
    extension.  We don't always need the timeout set like this, so make it an optional
    parameter, and don't use it in this case.
    
    ABE-2544
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@289340 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-09-29 21:12:43 +00:00
Richard Mudgett
23c141e095 Cut-n-paste error in builtin_blindtransfer().
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@287897 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-09-21 15:53:19 +00:00
Jeff Peeler
08ed487a61 fix uninintialized variable
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@287020 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-09-15 20:58:39 +00:00
Jeff Peeler
c9bfde6afd Add parking extension for non-default parking lots.
This is a new feature that allows for parking to custom parking lots to be
accessed directly, rather than with channel variables or by changing the
default parking lot. The extension is set with the parkext option just as the
default parking lot is done. Also, the manager action has been updated to
optionally allow a specified parking lot.

(closes issue #14882)
Reported by: vmikhnevych
Patches: 
      patch_14882.txt uploaded by mnick (license 874)
      modified by me

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@286931 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-09-15 19:22:15 +00:00
Tilghman Lesher
371e0c6d70 Merged revisions 286557 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2

........
  r286557 | tilghman | 2010-09-13 18:48:51 -0500 (Mon, 13 Sep 2010) | 2 lines
  
  C precedence got me
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@286558 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-09-13 23:50:34 +00:00
Tilghman Lesher
9cbcaec026 Merged revisions 286527 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2

........
  r286527 | tilghman | 2010-09-13 18:03:26 -0500 (Mon, 13 Sep 2010) | 2 lines
  
  Refactor conversion to ast_poll() to fix callparking regression.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@286528 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-09-13 23:12:21 +00:00
Richard Mudgett
e18b30c95c Fix cut-n-paste error.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@285371 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-09-07 21:08:35 +00:00
Tilghman Lesher
6c61e312c6 Merged revisions 284593,284595 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2

................
  r284593 | tilghman | 2010-09-01 17:59:50 -0500 (Wed, 01 Sep 2010) | 18 lines
  
  Merged revisions 284478 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r284478 | tilghman | 2010-09-01 13:49:11 -0500 (Wed, 01 Sep 2010) | 11 lines
    
    Ensure that all areas that previously used select(2) now use poll(2), with implementations that need poll(2) implemented with select(2) safe against 1024-bit overflows.
    
    This is a followup to the fix for the pthread timer in 1.6.2 and beyond, fixing
    a potential crash bug in all supported releases.
    
    (closes issue #17678)
     Reported by: russell
    Branch: https://origsvn.digium.com/svn/asterisk/team/tilghman/ast_select 
    
    Review: https://reviewboard.asterisk.org/r/824/
  ........
................
  r284595 | tilghman | 2010-09-01 22:57:43 -0500 (Wed, 01 Sep 2010) | 2 lines
  
  Failed to rerun bootstrap.sh after last commit
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@284597 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-09-02 05:00:34 +00:00
Russell Bryant
a9e49f4e45 Update documentation for 'comebacktoorigin' in featuers.conf.
The documentation for this option did not match the code.  Fix that along with
some minor cleanups to the code along the way.  Document a slight change in
behavior (to something that was previously undocumented) in UPGRADE.txt.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@278425 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-21 13:02:46 +00:00
Tilghman Lesher
ef95349d1c Merged revisions 278167 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r278167 | tilghman | 2010-07-20 15:59:06 -0500 (Tue, 20 Jul 2010) | 4 lines
  
  Do not queue up DTMF frames while a call is on hold.
  
  (Fixes ABE-2110)
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@278272 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-20 22:26:23 +00:00
Jean Galarneau
e533a48c16 Merged revisions 277906 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r277906 | jeang | 2010-07-19 15:16:36 -0500 (Mon, 19 Jul 2010) | 7 lines
  
  Avoid trying to pickup a parked extension before the park operation is completed.
  
  A crash could occur if the extension is picked up while the parking extension is
  being announced. Testing pu->notquiteyet while searching for a parked extension
  resolves this crash.
  
  (ABE-2418)
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@277945 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-19 21:07:08 +00:00
Tim Ringenbach
3442f13da4 Merged revisions 277625 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r277625 | tringenbach | 2010-07-16 17:43:39 -0500 (Fri, 16 Jul 2010) | 9 lines
  
  Save and restore AST_FLAG_BRIDGE_HANGUP_DONT on attended transfer.
  
  ast_bridge_call() clears AST_FLAG_BRIDGE_HANGUP_DONT. But during an attended
  transfer, ast_bridge_call() is called for a second bridge on the same channel,
  and it clears that flag, which still needs to get set for when the original
  ast_bridge_call() gets control back and checks it.
  
  Review: https://reviewboard.asterisk.org/r/741
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@277657 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-16 23:23:15 +00:00
Richard Mudgett
ec37ffbdaf ast_callerid restructuring
The purpose of this patch is to eliminate struct ast_callerid since it has
turned into a miscellaneous collection of various party information.

Eliminate struct ast_callerid and replace it with the following struct
organization:

struct ast_party_name {
	char *str;
	int char_set;
	int presentation;
	unsigned char valid;
};
struct ast_party_number {
	char *str;
	int plan;
	int presentation;
	unsigned char valid;
};
struct ast_party_subaddress {
	char *str;
	int type;
	unsigned char odd_even_indicator;
	unsigned char valid;
};
struct ast_party_id {
	struct ast_party_name name;
	struct ast_party_number number;
	struct ast_party_subaddress subaddress;
	char *tag;
};
struct ast_party_dialed {
	struct {
		char *str;
		int plan;
	} number;
	struct ast_party_subaddress subaddress;
	int transit_network_select;
};
struct ast_party_caller {
	struct ast_party_id id;
	char *ani;
	int ani2;
};

The new organization adds some new information as well.

* The party name and number now have their own presentation value that can
be manipulated independently.  ISDN supplies the presentation value for
the name and number at different times with the possibility that they
could be different.

* The party name and number now have a valid flag.  Before this change the
name or number string could be empty if the presentation were restricted.
Most channel drivers assume that the name or number is then simply not
available instead of indicating that the name or number was restricted.

* The party name now has a character set value.  SIP and Q.SIG have the
ability to indicate what character set a name string is using so it could
be presented properly.

* The dialed party now has a numbering plan value that could be useful to
have available.

The various channel drivers will need to be updated to support the new
core features as needed.  They have simply been converted to supply
current functionality at this time.


The following items of note were either corrected or enhanced:

* The CONNECTEDLINE() and REDIRECTING() dialplan functions were
consolidated into func_callerid.c to share party id handling code.

* CALLERPRES() is now deprecated because the name and number have their
own presentation values.

* Fixed app_alarmreceiver.c write_metadata().  The workstring[] could
contain garbage.  It also can only contain the caller id number so using
ast_callerid_parse() on it is silly.  There was also a typo in the
CALLERNAME if test.

* Fixed app_rpt.c using ast_callerid_parse() on the channel's caller id
number string.  ast_callerid_parse() alters the given buffer which in this
case is the channel's caller id number string.  Then using
ast_shrink_phone_number() could alter it even more.

* Fixed caller ID name and number memory leak in chan_usbradio.c.

* Fixed uninitialized char arrays cid_num[] and cid_name[] in
sig_analog.c.

* Protected access to a caller channel with lock in chan_sip.c.

* Clarified intent of code in app_meetme.c sla_ring_station() and
dial_trunk().  Also made save all caller ID data instead of just the name
and number strings.

* Simplified cdr.c set_one_cid().  It hand coded the ast_callerid_merge()
function.

* Corrected some weirdness with app_privacy.c's use of caller
presentation.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@276347 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-14 15:48:36 +00:00
Russell Bryant
8ae46b53a8 Merged revisions 276123 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r276123 | russell | 2010-07-13 14:06:53 -0500 (Tue, 13 Jul 2010) | 2 lines
  
  Use chan->cdr instead of chan_cdr (just like peer->cdr instead of peer_cdr in the last commit).
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@276124 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-13 19:09:42 +00:00
Russell Bryant
ea1307d9ad Merged revisions 275994 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r275994 | russell | 2010-07-13 11:51:18 -0500 (Tue, 13 Jul 2010) | 14 lines
  
  Access peer->cdr directly instead of through a saved off reference.
  
  At this point in the code, it is possible that peer_cdr may be invalid.
  Specifically, in the blind transfer code, CDRs are swapped between channels.
  So, peer_cdr is no longer == peer->cdr.
  
  The scenario that exposed a crash in this code was a blind transfer that hit
  the system call limit, causing the transferee channel to get destroyed after
  the transfer attempt failed.  Even if it succeeds and this code doesn't crash,
  this code was still trying to reset a CDR on a channel that was now owned by
  a different thread, which is a BadThing(tm).
  
  (ABE-2417)
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@275995 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-13 16:53:44 +00:00
Russell Bryant
b4ba8548e1 Fix some issues related to dynamic feature groups in features.conf.
The bridge handling code did not properly consider feature groups when setting
parameters that would affect whether or not a native bridge would be attempted.
If DYNAMIC_FEATURES only include a feature group, a native bridge would occur
that may prevent features from working.

Fix a bug in verbose output that would show the key mapping as empty if it was
using the default mapping and not a custom mapping in the feature group.

Add feature groups to the output of "features show".

Adjust the feature execution logic to match that of the logic when executing
a feature that was not configured through a feature group.

Update features.conf.sample to show that an '=' is still required if using
the default key mapping from [applicationmap].

Finally, clean up a little bit of formatting to better coform to coding
guidelines while in the area.

(closes issue #17589)
Reported by: lmadsen
Patches:
      issue_17589.rev4.txt uploaded by russell (license 2)
Tested by: russell, lmadsen


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@275424 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-09 21:57:21 +00:00
Russell Bryant
eaaeb7a1bc Add missing ao2_iterator_destroy().
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@275310 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-09 19:58:06 +00:00
Tilghman Lesher
da8450323f Kill some startup warnings and errors and make some messages more helpful in tracking down the source.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@275105 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-09 17:00:22 +00:00
David Vossel
6d82dbb905 fixes attended transfer behavior when both transferee and transferer hung up
If both the transferer and transferee of a attended transfer hangup before
the new channel picks up, the new channel should be hung up as well as it
has no endpoint to talk to.  This mirrors the expected behavior used in 1.4. 

(closes issue #17444)
Reported by: corruptor



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@271831 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-06-22 15:46:22 +00:00
Leif Madsen
c672763af8 Fix some doxygen warnings.
(closes issue #17336)
Reported by: snuffy
Patches:
      doxygen-fixes1.diff uploaded by snuffy (license 35)
Tested by: russell

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@268969 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-06-08 14:38:18 +00:00
Richard Mudgett
afd4454c44 Generic Advice of Charge.
Asterisk Generic AOC Representation
- Generic AOC encode/decode routines.
  (Generic AOC must be encoded to be passed on the wire in the AST_CONTROL_AOC frame)
- AST_CONTROL_AOC frame type to represent generic encoded AOC data
- Manager events for AOC-S, AOC-D, and AOC-E messages

Asterisk App Support
- app_dial AOC-S pass-through support on call setup
- app_queue AOC-S pass-through support on call setup

AOC Unit Tests
- AOC Unit Tests for encode/decode routines
- AOC Unit Test for manager event representation.

SIP AOC Support
- Pass-through of generic AOC-D and AOC-E messages to snom phones via the
  snom AOC specification.
- Creation of chan_sip page3 flags for the addition of the new
  'snom_aoc_enabled' sip.conf option.

IAX AOC Support
- Natively supports AOC pass-through through the use of the new
  AST_CONTROL_AOC frame type

DAHDI AOC Support
- ETSI PRI full AOC Pass-through support
- 'aoc_enable' chan_dahdi.conf option for independently enabling
  pass-through of AOC-S, AOC-D, AOC-E.
- 'aoce_delayhangup' option for retrieving AOC-E on disconnect.
- DAHDI A() dial string option for requesting AOC services.
  example usage:
  ;requests AOC-S, AOC-D, and AOC-E on call setup
  exten=>1111,1,Dial(DAHDI/g1/1112/A(s,d,e))

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@267096 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-06-02 18:10:15 +00:00
Mark Michelson
b5d5cc565f Enhancements to connected line and redirecting work.
From reviewboard:

Digium has a commercial customer who has made extensive use of the connected party and
redirecting information present in later versions of Asterisk Business Edition and which
is to be in the upcoming 1.8 release. Through their use of the feature, new problems and solutions
have come about. This patch adds several enhancements to maximize usage of the connected party
and redirecting information functionality.

First, Asterisk trunk already had connected line interception macros. These macros allow you to
manipulate connected line information before it was sent out to its target. This patch adds the
same feature except for redirecting information instead.

Second, the ast_callerid and ast_party_id structures have been enhanced to provide a "tag." This
tag can be set with func_callerid, func_connectedline, func_redirecting, and in the case of DAHDI,
mISDN, and SIP channels, can be set in a configuration file. The idea behind the callerid tag is
that it can be set to whatever value the administrator likes. Later, when running connected line
and redirecting macros, the admin can read the tag off the appropriate structure to determine what
action to take. You can think of this sort of like a channel variable, except that instead of having
the variable associated with a channel, the variable is associated with a specific identity within
Asterisk.

Third, app_dial has two new options, s and u. The s option lets a dialplan writer force a specific
caller ID tag to be placed on the outgoing channel. The u option allows the dialplan writer to force
a specific calling presentation value on the outgoing channel.

Fourth, there is a new control frame subclass called AST_CONTROL_READ_ACTION added. This was added
to correct a very specific situation. In the case of SIP semi-attended (blond) transfers, the party
being transferred would not have the opportunity to run a connected line interception macro to
possibly alter the transfer target's connected line information. The issue here was that during a
blond transfer, the SIP transfer code has no bridged channel on which to queue the connected line
update. The way this was corrected was to add this new control frame subclass. Now, we queue an
AST_CONTROL_READ_ACTION frame on the channel on which the connected line interception macro should
be run. When ast_read is called to read the frame, ast_read responds by calling a callback function
associated with the specific read action the control frame describes. In this case, the action taken
is to run the connected line interception macro on the transferee's channel.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@263541 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-05-17 15:36:31 +00:00
Matthew Nicholson
8c41f2db82 Merged revisions 193391,258670 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r193391 | mnicholson | 2009-05-08 16:01:25 -0500 (Fri, 08 May 2009) | 8 lines
  
  Set the proper disposition on originated calls.
  
  (closes issue #14167)
  Reported by: jpt
  Patches:
        call-file-missing-cdr2.diff uploaded by mnicholson (license 96)
  Tested by: dlotina, rmartinez, mnicholson
........
  r258670 | mnicholson | 2010-04-22 16:49:07 -0500 (Thu, 22 Apr 2010) | 11 lines
  
  Fix broken CDR behavior.
  
  This change allows a CDR record previously marked with disposition ANSWERED to be set as BUSY or NO ANSWER.
  
  Additionally this change partially reverts r235635 and does not set the AST_CDR_FLAG_ORIGINATED flag on CDRs generated from ast_call().  To preserve proper CDR behavior, the AST_CDR_FLAG_DIALED flag is now cleared from all brige CDRs in ast_bridge_call().
  
  (closes issue #16797)
  Reported by: VarnishedOtter
  Tested by: mnicholson
........

(closes issue #16222)
Reported by: telles
Tested by: mnicholson



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@258671 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-04-22 21:57:59 +00:00
Terry Wilson
9674766487 Fix incomplete CDR merge from r195881
Because res/res_features.c was removed and main/cdr.c added, these changes
didn't make it to trunk and the 1.6.x branches


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@257810 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-04-19 17:57:41 +00:00
Tilghman Lesher
8b7a90a026 Yet another issue where the conversion of the application delimiter to comma caused an issue.
Application arguments within the feature map could possibly contain a comma,
which conflicts with the syntax of the features.conf configuration file.  This
patch allows the argument to be wrapped in parentheses or quoted, to allow the
application arguments to be interpreted as a single configuration parameter.

(closes issue #16646)
 Reported by: pinga-fogo
 Patches: 
       20100414__issue16646.diff.txt uploaded by tilghman (license 14)
 Tested by: tilghman
 
Review: https://reviewboard.asterisk.org/r/547/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@257262 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-04-14 22:57:35 +00:00
Matthew Nicholson
8acef966ef Merged revisions 253799 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r253799 | mnicholson | 2010-03-22 14:50:00 -0500 (Mon, 22 Mar 2010) | 4 lines
  
  Unconditionally copy the caller's account code to the called party.
  
  (related to issue #16331)
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@253800 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-03-22 19:52:52 +00:00
Russell Bryant
3da9f8ed19 Resolve more compiler warnings on FreeBSD.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@253540 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-03-20 12:03:07 +00:00
Jeff Peeler
9620ccf057 Fix ParkAndAnnounce not respecting parking options.
The patch ensures that if a peer does not exist, parking settings are read from
the channel. A unit test has been written to ensure proper operation for both
standard parking and parking using masquerades.

(closes issue #16592)
Reported by: mwyres
Patches: 
      bug_16592.diff uploaded by snuffy (license 35)

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@251679 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-03-10 20:51:23 +00:00
Leif Madsen
78fdaa6865 Add missing description of the PARKINGLOT variable in XML documentation.
(closes issue #16743)
Reported by: snuffy
Patches: 
      parkingdoc.diff uploaded by snuffy (license 35)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@249925 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-03-02 19:24:43 +00:00
Mark Michelson
da96c84c67 Send a manager event when the manager BridgeAction command is used.
(closes issue #16769)
Reported by: syspert
Patches:
      bridgeaction.patch uploaded by syspert (license 938)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@249105 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-02-26 17:13:36 +00:00
Matthew Nicholson
469fed1cd3 Merged revisions 247651 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r247651 | mnicholson | 2010-02-18 13:38:09 -0600 (Thu, 18 Feb 2010) | 6 lines
  
  Copy the calling party's account code to the called party if they don't already have one.
  
  (closes issue #16331)
  Reported by: bluefox
  Tested by: mnicholson
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@247652 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-02-18 19:39:37 +00:00
David Vossel
57c819fd5e addition of dynamic parkinglots feature
This feature allows for parkinglots to be created dynamically within
the dialplan.  Thanks to all who were involved with getting this patch
written and tested!

(closes issue #15135)
Reported by: IgorG
Patches:
      features.dynamic_park.v3.diff uploaded by IgorG (license 20)
      2009090400_dynamicpark.diff.txt uploaded by mvanbaak (license 7)
      dynamic_parkinglot.diff uploaded by dvossel (license 671)
Tested by: eliel, IgorG, acunningham, mvanbaak, zktech

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@247248 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-02-17 18:29:48 +00:00
Jeff Peeler
b527525ffc Add some additional option support for non-default parking lots.
The options are: parkedcallparking, parkedcallhangup, parkedcallrecording, and
parkedcalltransfers. Previously these options were only available for the 
default parking lot.

(closes issue #16641)
Reported by: bluecrow76
Patches: 
      asterisk-1.6.2.1-features.c.diff uploaded by bluecrow76 (license 270)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@244598 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-02-03 20:48:36 +00:00
David Vossel
7662c7fed2 Merged revisions 243390 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r243390 | dvossel | 2010-01-26 17:55:49 -0600 (Tue, 26 Jan 2010) | 9 lines
  
  fixes bug with channel receiving wrong privileges after call parking 
  
  (closes issue #16429)
  Reported by: Yasuhiro Konishi
  Patches:
        features.c.diff uploaded by Yasuhiro Konishi (license 947)
  Tested by: dvossel
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@243391 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-01-26 23:56:57 +00:00
Jeff Peeler
568c057c4c Extend max call limit duration from 24.8 days to 292+ million years.
If the limit was set past MAX_INT upon answering, the call was immediately
hung up due to overflow from the return of ast_tvdiff_ms (in ast_check_hangup).
The time calculation functions ast_tvdiff_sec and ast_tvdiff_ms have been
changed to return an int64_t to prevent overflow. Also the reporter suggested
adding a message indicating the reason for the call hanging up. Given that the
new limit is so much higher, the message (which would only really be useful in
the overflow scenario) has been made a debug message only.

(closes issue #16006)
Reported by: viraptor


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@241143 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-01-18 22:31:25 +00:00