[asterisk-commits] may: branch may/ooh323_ipv6_direct_rtp r321505 - in /team/may/ooh323_ipv6_dir...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sat May 28 04:04:04 CDT 2011


Author: may
Date: Sat May 28 04:03:51 2011
New Revision: 321505

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=321505
Log:
Merged revisions 317919-317920,317968,317970,317996,318018-318019,318056,318058,318106,318141,318143,318162,318193-318194,318232,318234,318283,318352,318400,318437,318500,318551-318552,318600,318635,318672,318784-318785,318833,318869,318918,318920,318922 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

................
  r317919 | russell | 2011-05-07 01:07:49 +0400 (Sat, 07 May 2011) | 14 lines
  
  Merged revisions 317917 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ........
    r317917 | russell | 2011-05-06 16:06:33 -0500 (Fri, 06 May 2011) | 7 lines
    
    Fix calculation of free RAM to make minmemfree option work.
    
    (closes issue #17124)
    Reported by: loic
    Patches:
          pbx_c.diff uploaded by loic (license 1020)
  ........
................
  r317920 | dvossel | 2011-05-07 01:10:30 +0400 (Sat, 07 May 2011) | 14 lines
  
  Merged revisions 317918 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ........
    r317918 | dvossel | 2011-05-06 16:06:55 -0500 (Fri, 06 May 2011) | 7 lines
    
    Fixes missing colon from To/From headers in RTCP manager events.
    
    (closes issue #18221)
    Reported by: clegall_proformatique
    Patches:
          18221_1.patch uploaded by ebroad (license 878)
  ........
................
  r317968 | russell | 2011-05-07 01:47:05 +0400 (Sat, 07 May 2011) | 9 lines
  
  Merged revisions 317967 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ........
    r317967 | russell | 2011-05-06 16:38:54 -0500 (Fri, 06 May 2011) | 2 lines
    
    Fix some more "set but unused" compiler warnings.
  ........
................
  r317970 | russell | 2011-05-07 01:49:47 +0400 (Sat, 07 May 2011) | 17 lines
  
  Merged revisions 317969 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ........
    r317969 | russell | 2011-05-06 16:49:01 -0500 (Fri, 06 May 2011) | 10 lines
    
    Use the right variable to print the time in a debug message.
    
    The original patch also increased some buffer sizes, but that was already
    done in this version.
    
    (closes issue #17034)
    Reported by: sysreq
    Patches:
          asterisk-issue-17034.patch uploaded by sysreq (license 1009)
  ........
................
  r317996 | wedhorn | 2011-05-07 02:24:08 +0400 (Sat, 07 May 2011) | 7 lines
  
  Move the hookstate from line to device.
  
  Long time coming, finally moving the hookstate from line to device.
  This may fix some issues where a device has multiple lines. Previously
  we had to run through all lines on a device to see if it was actually
  onhook or not.
................
  r318018 | wedhorn | 2011-05-07 02:32:45 +0400 (Sat, 07 May 2011) | 5 lines
  
  Rename sub->parent to sub->line.
  
  Improve readability of code, eg, (sub->parent == d->activeline) becomes
  (sub->line == d->activeline).
................
  r318019 | wedhorn | 2011-05-07 03:07:55 +0400 (Sat, 07 May 2011) | 5 lines
  
  Only allow voicemail if substate is OFFHOOK or no channel active (UNSET).
  
  (closes issue #17901)
  Reported by: salecha
................
  r318056 | russell | 2011-05-08 03:26:05 +0400 (Sun, 08 May 2011) | 14 lines
  
  Merged revisions 318055 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ........
    r318055 | russell | 2011-05-07 18:24:18 -0500 (Sat, 07 May 2011) | 7 lines
    
    chan_iax2: Don't overwrite port found with an SRV lookup.
    
    (closes issue #17291)
    Reported by: jcovert
    Patches:
          chan_iax2.c.1.8.3-srvlookup-corrected.patch uploaded by jcovert (license 551)
  ........
................
  r318058 | russell | 2011-05-08 03:36:41 +0400 (Sun, 08 May 2011) | 15 lines
  
  Merged revisions 318057 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ........
    r318057 | russell | 2011-05-07 18:35:37 -0500 (Sat, 07 May 2011) | 8 lines
    
    res_config_curl: fix a crash with static realtime.
    
    (closes issue #18413)
    Reported by: jmls
    Patches:
          20101202__issue18413.diff.txt uploaded by tilghman (license 14)
    Tested by: jmls
  ........
................
  r318106 | wedhorn | 2011-05-09 11:40:40 +0400 (Mon, 09 May 2011) | 5 lines
  
  Add setsubstate_callwait.
  
  If a call is made to a line that already has a call and the device is
  offhook (ie activeish call), the call is set to CALLWAIT rather than RINGIN. 
................
  r318141 | jrose | 2011-05-09 17:56:32 +0400 (Mon, 09 May 2011) | 13 lines
  
  Allows ParkedCall application to specify a parkinglot.
  
  When invoking the app parkedcall, the argument can now include '@parkinglot' after the
  extension.
  
  (closes issue #18777)
  Reported by: cartama
  Patches:
        0018777.diff uploaded by cartama (license 1157)
  
  Review: https://reviewboard.asterisk.org/r/1209/
................
  r318143 | mnicholson | 2011-05-09 18:11:57 +0400 (Mon, 09 May 2011) | 16 lines
  
  Merged revisions 318142 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ........
    r318142 | mnicholson | 2011-05-09 09:09:38 -0500 (Mon, 09 May 2011) | 9 lines
    
    Make indicate/control frames WRITE events on framehooks.  Also, if a framehook
    returns a non-control frame, don't forward it to the channel.
    
    (closes issue #19251)
    Reported by: irroot
    Patches:
          (modified) framehook_indicate.patch2 uploaded by irroot (license 52)
    Tested by: irroot
  ........
................
  r318162 | jrose | 2011-05-09 18:21:33 +0400 (Mon, 09 May 2011) | 11 lines
  
  Merged revisions 318148 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ........
    r318148 | jrose | 2011-05-09 09:18:14 -0500 (Mon, 09 May 2011) | 4 lines
    
    Documenting an observed behavior of features in features.conf.  Since parkinglots use an
    integer for the parkinglot extensions, leading zeros specified in the configuration file
    are ignored.
  ........
................
  r318193 | jrose | 2011-05-09 18:37:10 +0400 (Mon, 09 May 2011) | 3 lines
  
  Minor change to 318141 to improve parsing behavior.
................
  r318194 | lmadsen | 2011-05-09 18:41:33 +0400 (Mon, 09 May 2011) | 6 lines
  
  Increase prepend filename length.
  
  (closes issue #19238)
  Reported by: byronclark
  Patches: 
        increase_prepend_filename_length.patch uploaded by byronclark (license 1200)
................
  r318232 | rmudgett | 2011-05-09 21:00:05 +0400 (Mon, 09 May 2011) | 48 lines
  
  Merged revisions 318231 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ................
    r318231 | rmudgett | 2011-05-09 11:57:18 -0500 (Mon, 09 May 2011) | 41 lines
    
    Don't get early media for ISDN on outgoing calls.
    
    It looks to be a long-standing misinterpretation of the progress indicator
    ie values:
    1 - Call is not end-to-end ISDN; further call progress information may be
    available in-band.
    8 - In-band information or an appropriate pattern is now available.
    
    Only value 8 is handled by chan_dahdi/sig_pri.  The 1 value is not handled
    as early media probably because the meaning of the second half of it's
    description was overlooked.
    
    * Test to see if either PRI_PROG_CALL_NOT_E2E_ISDN(1) or
    PRI_PROG_INBAND_AVAILABLE(8) bits are set to open the media path.
    
    (closes issue #18868)
    Reported by: isrl
    Patches:
          issue18868_19246_v1.8.patch uploaded by rmudgett (license 664)
    Tested by: satish_lx
    
    ..........
    
    No inband progress on PRI_EVENT_RINGING even if inband flag set.
    
    My ISDN-PRI provider sends an ALERTING with "Inband information or
    appropriate pattern now available", but Asterisk only generates and passes
    the RING to the SIP extension, not the inband message.  Unfortunately, the
    inband message is not a ringback tone but a prompt that says the number is
    not in service.  The SIP extension then hears two rings and the call is
    hungup which confuses the caller.
    
    * Post an AST_CONTROL_PROGRESS as well as opening the media path if inband
    audio is indicated with an ALERTING message.
    
    (closes issue #19246)
    Reported by: cristiandimache
    Patches:
          issue19246_v1.8.patch uploaded by rmudgett (license 664)
    Tested by: cristiandimache
  ................
................
  r318234 | dvossel | 2011-05-09 21:13:01 +0400 (Mon, 09 May 2011) | 21 lines
  
  Merged revisions 318233 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ................
    r318233 | dvossel | 2011-05-09 12:09:55 -0500 (Mon, 09 May 2011) | 14 lines
    
    Merged revisions 318230 via svnmerge from 
    https://origsvn.digium.com/svn/asterisk/branches/1.6.2
    
    ........
      r318230 | dvossel | 2011-05-09 11:51:45 -0500 (Mon, 09 May 2011) | 7 lines
      
      Fixes cases where sip_set_rtp_peer can return too early during media path reset.
      
      (closes issue #19225)
      Reported by: one47
      Patches:
            sip_set_rtp_peer.patch uploaded by one47 (license 23)
    ........
  ................
................
  r318283 | rmudgett | 2011-05-09 23:09:16 +0400 (Mon, 09 May 2011) | 31 lines
  
  Merged revisions 318282 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ........
    r318282 | rmudgett | 2011-05-09 14:07:01 -0500 (Mon, 09 May 2011) | 24 lines
    
    Hangup extension executed twice.
    
    When a user hangs up a call, in certain circumstances, the hangup
    extension can end up being executed twice:
    
    1) If a call is bridged and the 'h' extension executes the Hangup
    application, then the 'h' extension will be executed twice.
    
    2) If a call is bridged within a macro (Dial or Queue), it has its own 'h'
    extension, the main context also has an 'h' extension, and the macro 'h'
    extension executes the Hangup application, then both 'h' extensions will
    be executed.
    
    * Revert originally commited fix for #16106 and just set
    AST_FLAG_BRIDGE_HANGUP_RUN unconditionally in ast_bridge_call().  The
    bridge code just executed an 'h' extension so the main PBX loop does not
    need to execute one as well.
    
    (issue #16106)
    Reported by: ajohnson
    
    (issue #16548)
    Reported by: hajekd
  ........
................
  r318352 | rmudgett | 2011-05-10 03:16:12 +0400 (Tue, 10 May 2011) | 13 lines
  
  Merged revisions 318351 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ........
    r318351 | rmudgett | 2011-05-09 18:15:32 -0500 (Mon, 09 May 2011) | 6 lines
    
    Remove references to res_features and its export file.
    
    The contents of res/res_features.c was moved to into main/features.c
    awhile ago.  There is no longer any need for the res/Makefile to reference
    res_features or the res_features linker exports file to exist.
  ........
................
  r318400 | twilson | 2011-05-10 04:22:02 +0400 (Tue, 10 May 2011) | 25 lines
  
  Merged revisions 318337 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ................
    r318337 | twilson | 2011-05-09 15:23:15 -0500 (Mon, 09 May 2011) | 18 lines
    
    Merged revisions 318331 via svnmerge from 
    https://origsvn.digium.com/svn/asterisk/branches/1.6.2
    
    ........
      r318331 | twilson | 2011-05-09 15:04:41 -0500 (Mon, 09 May 2011) | 12 lines
      
      Don't offer video to directmedia callee unless caller offered it as well
      
      Make sure that when directmedia is enabled, that video is not offered to the
      callee even if it supports it. p->vrtp will not exist since the caller didn't
      offer video.
      
      (closes issue #19195)
      Reported by: one47
      Patches: 
            sip_cant_add_video_rtp uploaded by one47 (license 23)
    ........
  ................
................
  r318437 | russell | 2011-05-10 19:16:34 +0400 (Tue, 10 May 2011) | 9 lines
  
  Merged revisions 318436 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ........
    r318436 | russell | 2011-05-10 10:13:16 -0500 (Tue, 10 May 2011) | 2 lines
    
    chan_iax2: change LOG_NOTICE to LOG_DEBUG in iax2_read().
  ........
................
  r318500 | rmudgett | 2011-05-11 03:42:57 +0400 (Wed, 11 May 2011) | 22 lines
  
  Merged revisions 318499 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ........
    r318499 | rmudgett | 2011-05-10 18:41:08 -0500 (Tue, 10 May 2011) | 15 lines
    
    Unable to pickup DAHDI/PRI call because call state is reported as DIALING.
    
    The channel state is not updated to RINGING when an ALERTING message is
    received.  Regression caused when sig_pri.c (also sig_ss7.c) extracted
    from chan_dahdi.c.
    
    * Added missing channel state update to RINGING when the
    AST_CONTROL_RINGING frame is queued for ISDN and SS7.
    
    (closes issue #19257)
    Reported by: alecdavis
    Patches:
          issue19257_v1.8_v2.patch uploaded by rmudgett (license 664)
    Tested by: alecdavis, rmudgett
  ........
................
  r318551 | twilson | 2011-05-11 22:50:51 +0400 (Wed, 11 May 2011) | 34 lines
  
  Merged revisions 318549 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ................
    r318549 | twilson | 2011-05-11 13:39:48 -0500 (Wed, 11 May 2011) | 27 lines
    
    Merged revisions 318548 via svnmerge from 
    https://origsvn.digium.com/svn/asterisk/branches/1.6.2
    
    ........
      r318548 | twilson | 2011-05-11 12:15:39 -0500 (Wed, 11 May 2011) | 19 lines
      
      Clean up several chan_sip reference leaks
      
      Several situations in the code could lead to peers or sip_pvt references
      being leaked. This would cause RTP ports to never be destroyed (leading
      to exhaustion of all available RTP ports) and memory leaks.
      
      The original patch for this issue from rgagnon was the result of an
      obscene amount of testing and hard work, for which I am very grateful. I
      did some cleanup and added a few additional refcount fixes that I found.
      
      (closes issue #17255)
      Reported by: kvveltho
      Patches: 
            tag-1.6.2.17-r309252-sip-dos-mem-leak-fix.diff uploaded by rgagnon (license 1202)
      Tested by: rgagnon, twilson, wdoekes, loloski
      
      Review: https://reviewboard.asterisk.org/r/1101/
      Review: https://reviewboard.asterisk.org/r/1207/
      Review: https://reviewboard.asterisk.org/r/1210/
    ........
  ................
................
  r318552 | twilson | 2011-05-11 22:52:53 +0400 (Wed, 11 May 2011) | 9 lines
  
  Merged revisions 318550 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ........
    r318550 | twilson | 2011-05-11 13:47:33 -0500 (Wed, 11 May 2011) | 2 lines
    
    Comment out the REF_DEBUG that slipped in during debugging
  ........
................
  r318600 | wedhorn | 2011-05-12 11:25:52 +0400 (Thu, 12 May 2011) | 7 lines
  
  Add setsubstate_onhook.
  
  Add the setsubstate_onhook to complete the initial substate handling
  procedures. Added dumpsub(sub, forcehangup) which is the common way of
  calling setsubstate_onhook. Dumpsub attempts to activate another sub
  after setting the current one onhook.
................
  r318635 | wedhorn | 2011-05-13 00:44:21 +0400 (Fri, 13 May 2011) | 5 lines
  
  Consolidate setsubstate_* into setsubstate and use a switch.
  
  Consolidate the functions and add some debugging info. Allows to be
  able to set a substate without explicitly knowing what the state is. 
................
  r318672 | alecdavis | 2011-05-13 02:56:43 +0400 (Fri, 13 May 2011) | 36 lines
  
  Merged revisions 318671 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ........
    r318671 | alecdavis | 2011-05-13 10:52:08 +1200 (Fri, 13 May 2011) | 30 lines
    
    Fix directed group pickup feature code *8 with pickupsounds enabled 
    
    Since 1.6.2, the new pickupsound and pickupfailsound in features.conf cause many issues.
    
    1). chan_sip:handle_request_invite() shouldn't be playing out the fail/success audio, as it has 'netlock' locked.
    2). dialplan applications for directed_pickups shouldn't beep.
    3). feature code for directed pickup should beep on success/failure if configured.
    
    Created a sip_pickup() thread to handle the pickup and playout the audio, spawned from handle_request_invite.
    
    Moved app_directed:pickup_do() to features:ast_do_pickup().
    
    Functions below, all now use the new ast_do_pickup()
    app_directed_pickup.c:
       pickup_by_channel()
       pickup_by_exten()
       pickup_by_mark()
       pickup_by_part()
    features.c:
       ast_pickup_call()
    
    (closes issue #18654)
    Reported by: Docent
    Patches: 
          ast_do_pickup_1.8_trunk.diff.txt uploaded by alecdavis (license 585)
    Tested by: lmadsen, francesco_r, amilcar, isis242, alecdavis, irroot, rymkus, loloski, rmudgett
    
    Review: https://reviewboard.asterisk.org/r/1185/
  ........
................
  r318784 | rmudgett | 2011-05-13 05:50:15 +0400 (Fri, 13 May 2011) | 21 lines
  
  Merged revisions 318783 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ........
    r318783 | rmudgett | 2011-05-12 20:47:05 -0500 (Thu, 12 May 2011) | 14 lines
    
    PRI early media won't ring.
    
    And another way to pass early media.  Don't indicate that there is inband
    information present, just assume that the B channel is connected.
    
    * Restore clearing the dialing flag Rx squelch unconditionally when a
    PROCEEDING message comes in.
    
    (closes issue #19268)
    Reported by: tbsky
    Patches:
          issue19268_v1.8.patch uploaded by rmudgett (license 664)
    Tested by: tbsky
  ........
................
  r318785 | mnicholson | 2011-05-13 05:55:38 +0400 (Fri, 13 May 2011) | 13 lines
  
  Merged revisions 318720 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ........
    r318720 | mnicholson | 2011-05-12 18:35:51 -0500 (Thu, 12 May 2011) | 4 lines
    
    Handle ipv6 addresses in the sent-by Via: field.
    
    This change fixes a regression in via header parsing and ipv6 handling.
  
    (closes issue #18951)
  ........
................
  r318833 | wedhorn | 2011-05-13 12:33:35 +0400 (Fri, 13 May 2011) | 10 lines
  
  Move exten used for dialing from device to subchannel.
  
  There were some issues where if a simple switch was cancelled and a
  new switch started before the first had timed out where the d->exten
  would be used for both subchannels. This was bad leading to possible
  invalid extensions if some digits had been entered in the abandoned
  simple switch and the second one was completed before the first timed
  out, or the second would be cancelled because d->exten would be set to
  nothing on the time out of the first.
................
  r318869 | rmudgett | 2011-05-13 20:30:29 +0400 (Fri, 13 May 2011) | 26 lines
  
  Merged revisions 318868 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ........
    r318868 | rmudgett | 2011-05-13 11:28:26 -0500 (Fri, 13 May 2011) | 19 lines
    
    CDR's are being written immediately on caller hangup.
    
    CDR's are being written immediately on caller hangup.  The dialplan is not
    able to modify it in the h exten.  The h exten in the initial context is
    not run before closing CDR's when the bridge is unlinked if a macro is
    active and does not have an h exten.
    
    * Make ast_bridge_call() check for an h exten in the current context and
    if a macro is active then the initial context.  The first h exten found is
    then run before closing the CDR.
    
    (closes issue #18212)
    Reported by: leearcher
    Patches:
          issue18212_v1.8.patch uploaded by rmudgett (license 664)
    Tested by: rmudgett
    
    Review: https://reviewboard.asterisk.org/r/1206/
  ........
................
  r318918 | bbryant | 2011-05-13 21:58:53 +0400 (Fri, 13 May 2011) | 17 lines
  
  Merged revisions 318917 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ........
    r318917 | bbryant | 2011-05-13 13:56:04 -0400 (Fri, 13 May 2011) | 11 lines
    
    This patch allows TCP peers into the ast_db where they were previously
    restricted.
    
    (closes issue #18882)
    Reported by: cmaj
    Patches: 
          patch-chan_sip-1.8.3-rc2-allow-tcp-peer-store-db-and-readonly-rt-backend.diff.txt
          uploaded by cmaj (license 830)
    Tested by: cmaj
  ........
................
  r318920 | bbryant | 2011-05-13 22:06:27 +0400 (Fri, 13 May 2011) | 16 lines
  
  Merged revisions 318919 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ........
    r318919 | bbryant | 2011-05-13 14:04:50 -0400 (Fri, 13 May 2011) | 10 lines
    
    This patch fixes an issue with SRTP which makes HOLD/UNHOLD impossible when too
    much time has passed between sending audio.
    
    (closes issue #18206)
    Reported by: bernhardsi
    Patches: 
          res_srtp_unhold.patch uploaded by bernhards (license 1138)
    Tested by: bernhards, notthematrix
  ........
................
  r318922 | bbryant | 2011-05-13 22:10:45 +0400 (Fri, 13 May 2011) | 14 lines
  
  Merged revisions 318921 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ........
    r318921 | bbryant | 2011-05-13 14:09:34 -0400 (Fri, 13 May 2011) | 8 lines
    
    Fixes a segmentation fault in dynamic hints when a channel technology isn't
    loaded for a hint.
    
    (closes issue #18495)
    Reported by: bertrand
    Tested by: bertrand
  ........
................

Removed:
    team/may/ooh323_ipv6_direct_rtp/res/res_features.exports.in
Modified:
    team/may/ooh323_ipv6_direct_rtp/   (props changed)
    team/may/ooh323_ipv6_direct_rtp/CHANGES
    team/may/ooh323_ipv6_direct_rtp/apps/app_directed_pickup.c
    team/may/ooh323_ipv6_direct_rtp/channels/chan_iax2.c
    team/may/ooh323_ipv6_direct_rtp/channels/chan_sip.c
    team/may/ooh323_ipv6_direct_rtp/channels/chan_skinny.c
    team/may/ooh323_ipv6_direct_rtp/channels/sig_pri.c
    team/may/ooh323_ipv6_direct_rtp/channels/sig_ss7.c
    team/may/ooh323_ipv6_direct_rtp/channels/sip/reqresp_parser.c
    team/may/ooh323_ipv6_direct_rtp/configs/features.conf.sample
    team/may/ooh323_ipv6_direct_rtp/include/asterisk/features.h
    team/may/ooh323_ipv6_direct_rtp/main/app.c
    team/may/ooh323_ipv6_direct_rtp/main/channel.c
    team/may/ooh323_ipv6_direct_rtp/main/features.c
    team/may/ooh323_ipv6_direct_rtp/res/Makefile
    team/may/ooh323_ipv6_direct_rtp/res/res_config_curl.c
    team/may/ooh323_ipv6_direct_rtp/res/res_srtp.c

Propchange: team/may/ooh323_ipv6_direct_rtp/
------------------------------------------------------------------------------
Binary property 'branch-1.8-merged' - no diff available.

Propchange: team/may/ooh323_ipv6_direct_rtp/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Sat May 28 04:03:51 2011
@@ -1,1 +1,1 @@
-/trunk:1-313143,313191,313280,313367,313383-313481,313483-313744,313781-313906,313908-313943,313945-315447,315453-316213,316216-316520,316552-317916
+/trunk:1-313143,313191,313280,313367,313383-313481,313483-313744,313781-313906,313908-313943,313945-315447,315453-316213,316216-316520,316552-319000

Modified: team/may/ooh323_ipv6_direct_rtp/CHANGES
URL: http://svnview.digium.com/svn/asterisk/team/may/ooh323_ipv6_direct_rtp/CHANGES?view=diff&rev=321505&r1=321504&r2=321505
==============================================================================
--- team/may/ooh323_ipv6_direct_rtp/CHANGES (original)
+++ team/may/ooh323_ipv6_direct_rtp/CHANGES Sat May 28 04:03:51 2011
@@ -15,6 +15,7 @@
 Parking
 -------
  * parkedmusicclass can now be set for non-default parking lots.
+ * ParkedCall application can now specify a specific parkinglot.
 
 Asterisk Manager Interface
 --------------------------
@@ -304,6 +305,8 @@
  * Added 'D' command to ExternalIVR full details in doc/externalivr.txt
  * Added 'v' option to MeetMe to play voicemail greetings when a user joins/leaves
    a MeetMe conference
+ * Added ability to include '@parkinglot' to ParkedCall extension in order to specify
+   a specific parkinglot on which to search the extension.
 
 Dialplan Functions
 ------------------

Modified: team/may/ooh323_ipv6_direct_rtp/apps/app_directed_pickup.c
URL: http://svnview.digium.com/svn/asterisk/team/may/ooh323_ipv6_direct_rtp/apps/app_directed_pickup.c?view=diff&rev=321505&r1=321504&r2=321505
==============================================================================
--- team/may/ooh323_ipv6_direct_rtp/apps/app_directed_pickup.c (original)
+++ team/may/ooh323_ipv6_direct_rtp/apps/app_directed_pickup.c Sat May 28 04:03:51 2011
@@ -97,60 +97,17 @@
 static const char app2[] = "PickupChan";
 /*! \todo This application should return a result code, like PICKUPRESULT */
 
-/* Perform actual pickup between two channels */
-static int pickup_do(struct ast_channel *chan, struct ast_channel *target)
-{
-	int res = 0;
-	struct ast_party_connected_line connected_caller;
-	struct ast_channel *chans[2] = { chan, target };
-
-	ast_debug(1, "Call pickup on '%s' by '%s'\n", target->name, chan->name);
-	ast_cel_report_event(target, AST_CEL_PICKUP, NULL, NULL, chan);
-
-	ast_party_connected_line_init(&connected_caller);
-	ast_party_connected_line_copy(&connected_caller, &target->connected);
-	connected_caller.source = AST_CONNECTED_LINE_UPDATE_SOURCE_ANSWER;
-	if (ast_channel_connected_line_macro(NULL, chan, &connected_caller, 0, 0)) {
-		ast_channel_update_connected_line(chan, &connected_caller, NULL);
-	}
-	ast_party_connected_line_free(&connected_caller);
-
-	ast_channel_lock(chan);
-	ast_connected_line_copy_from_caller(&connected_caller, &chan->caller);
-	ast_channel_unlock(chan);
-	connected_caller.source = AST_CONNECTED_LINE_UPDATE_SOURCE_ANSWER;
-	ast_channel_queue_connected_line_update(chan, &connected_caller, NULL);
-	ast_party_connected_line_free(&connected_caller);
-
-	if ((res = ast_answer(chan))) {
-		ast_log(LOG_WARNING, "Unable to answer '%s'\n", chan->name);
-		return -1;
-	}
-
-	if ((res = ast_queue_control(chan, AST_CONTROL_ANSWER))) {
-		ast_log(LOG_WARNING, "Unable to queue answer on '%s'\n", chan->name);
-		return -1;
-	}
-
-	if ((res = ast_channel_masquerade(target, chan))) {
-		ast_log(LOG_WARNING, "Unable to masquerade '%s' into '%s'\n", chan->name, target->name);
-		return -1;
-	}
-
-	/* If you want UniqueIDs, set channelvars in manager.conf to CHANNEL(uniqueid) */
-	ast_manager_event_multichan(EVENT_FLAG_CALL, "Pickup", 2, chans,
-		"Channel: %s\r\nTargetChannel: %s\r\n", chan->name, target->name);
-
-	return res;
-}
-
 /* Helper function that determines whether a channel is capable of being picked up */
 static int can_pickup(struct ast_channel *chan)
 {
-	if (!chan->pbx && (chan->_state == AST_STATE_RINGING || chan->_state == AST_STATE_RING || chan->_state == AST_STATE_DOWN))
+	if (!chan->pbx && !chan->masq &&
+		!ast_test_flag(chan, AST_FLAG_ZOMBIE) &&
+		(chan->_state == AST_STATE_RINGING ||
+		 chan->_state == AST_STATE_RING ||
+		 chan->_state == AST_STATE_DOWN)) {
 		return 1;
-	else
-		return 0;
+	}
+	return 0;
 }
 
 struct pickup_by_name_args {
@@ -213,9 +170,8 @@
 
 	/* Just check that we are not picking up the SAME as target */
 	if (chan != target) {
-		res = pickup_do(chan, target);
-	}
-
+		res = ast_do_pickup(chan, target);
+	}
 	ast_channel_unlock(target);
 	target = ast_channel_unref(target);
 
@@ -236,6 +192,7 @@
 	while ((target = ast_channel_iterator_next(iter))) {
 		ast_channel_lock(target);
 		if ((chan != target) && can_pickup(target)) {
+			ast_log(LOG_NOTICE, "%s pickup by %s\n", target->name, chan->name);
 			break;
 		}
 		ast_channel_unlock(target);
@@ -245,7 +202,7 @@
 	ast_channel_iterator_destroy(iter);
 
 	if (target) {
-		res = pickup_do(chan, target);
+		res = ast_do_pickup(chan, target);
 		ast_channel_unlock(target);
 		target = ast_channel_unref(target);
 	}
@@ -277,12 +234,54 @@
 	struct ast_channel *target;
 	int res = -1;
 
-	if ((target = ast_channel_callback(find_by_mark, NULL, (char *) mark, 0))) {
-		ast_channel_lock(target);
-		res = pickup_do(chan, target);
-		ast_channel_unlock(target);
-		target = ast_channel_unref(target);
-	}
+	if (!(target = ast_channel_callback(find_by_mark, NULL, (char *) mark, 0))) {
+		return res;
+	}
+
+	ast_channel_lock(target);
+	if (can_pickup(target)) {
+		res = ast_do_pickup(chan, target);
+	} else {
+		ast_log(LOG_WARNING, "target has gone, or not ringing anymore for %s\n", chan->name);
+	}
+	ast_channel_unlock(target);
+	target = ast_channel_unref(target);
+
+	return res;
+}
+
+static int find_channel_by_group(void *obj, void *arg, void *data, int flags)
+{
+	struct ast_channel *chan = obj;
+	struct ast_channel *c = data;
+	int i;
+
+	ast_channel_lock(chan);
+	i = (c != chan) && (c->pickupgroup & chan->callgroup) &&
+		can_pickup(chan);
+
+	ast_channel_unlock(chan);
+	return i ? CMP_MATCH | CMP_STOP : 0;
+}
+
+static int pickup_by_group(struct ast_channel *chan)
+{
+	struct ast_channel *target;
+	int res = -1;
+
+	if (!(target = ast_channel_callback(find_channel_by_group, NULL, chan, 0))) {
+		return res;
+	}
+
+	ast_log(LOG_NOTICE, "%s, pickup attempt by %s\n", target->name, chan->name);
+	ast_channel_lock(target);
+	if (can_pickup(target)) {
+		res = ast_do_pickup(chan, target);
+	} else {
+		ast_log(LOG_WARNING, "target has gone, or not ringing anymore for %s\n", chan->name);
+	}
+	ast_channel_unlock(target);
+	target = ast_channel_unref(target);
 
 	return res;
 }
@@ -295,10 +294,10 @@
 	char *exten = NULL, *context = NULL;
 
 	if (ast_strlen_zero(data)) {
-		res = ast_pickup_call(chan);
+		res = pickup_by_group(chan);
 		return res;
 	}
-	
+
 	/* Parse extension (and context if there) */
 	while (!ast_strlen_zero(tmp) && (exten = strsep(&tmp, "&"))) {
 		if ((context = strchr(exten, '@')))
@@ -341,7 +340,11 @@
 
 	if ((target = ast_channel_callback(find_by_part, NULL, (char *) part, 0))) {
 		ast_channel_lock(target);
-		res = pickup_do(chan, target);
+		if (can_pickup(target)) {
+			res = ast_do_pickup(chan, target);
+		} else {
+			ast_log(LOG_WARNING, "target has gone, or not ringing anymore for %s\n", chan->name);
+		}
 		ast_channel_unlock(target);
 		target = ast_channel_unref(target);
 	}

Modified: team/may/ooh323_ipv6_direct_rtp/channels/chan_iax2.c
URL: http://svnview.digium.com/svn/asterisk/team/may/ooh323_ipv6_direct_rtp/channels/chan_iax2.c?view=diff&rev=321505&r1=321504&r2=321505
==============================================================================
--- team/may/ooh323_ipv6_direct_rtp/channels/chan_iax2.c (original)
+++ team/may/ooh323_ipv6_direct_rtp/channels/chan_iax2.c Sat May 28 04:03:51 2011
@@ -4638,7 +4638,9 @@
 			return -1;
 		}
 		ast_sockaddr_to_sin(&sin_tmp, sin);
-		sin->sin_port = htons(IAX_DEFAULT_PORTNO);
+		if (sin->sin_port == 0) {
+			sin->sin_port = htons(IAX_DEFAULT_PORTNO);
+		}
 		/* use global iax prefs for unknown peer/user */
 		/* But move the calling channel's native codec to the top of the preference list */
 		memcpy(&ourprefs, &prefs, sizeof(ourprefs));
@@ -5434,7 +5436,7 @@
 
 static struct ast_frame *iax2_read(struct ast_channel *c) 
 {
-	ast_log(LOG_NOTICE, "I should never be called!\n");
+	ast_debug(1, "I should never be called!\n");
 	return &ast_null_frame;
 }
 

Modified: team/may/ooh323_ipv6_direct_rtp/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/team/may/ooh323_ipv6_direct_rtp/channels/chan_sip.c?view=diff&rev=321505&r1=321504&r2=321505
==============================================================================
--- team/may/ooh323_ipv6_direct_rtp/channels/chan_sip.c (original)
+++ team/may/ooh323_ipv6_direct_rtp/channels/chan_sip.c Sat May 28 04:03:51 2011
@@ -1280,6 +1280,10 @@
 static void check_pendings(struct sip_pvt *p);
 static void *sip_park_thread(void *stuff);
 static int sip_park(struct ast_channel *chan1, struct ast_channel *chan2, struct sip_request *req, int seqno, char *parkexten);
+
+static void *sip_pickup_thread(void *stuff);
+static int sip_pickup(struct ast_channel *chan);
+
 static int sip_sipredirect(struct sip_pvt *p, const char *dest);
 static int is_method_allowed(unsigned int *allowed_methods, enum sipmethod method);
 
@@ -2789,36 +2793,25 @@
 	return NULL;
 }
 
-/* this func is used with ao2_callback to unlink/delete all marked
-   peers */
-static int peer_is_marked(void *peerobj, void *arg, int flags)
-{
-	struct sip_peer *peer = peerobj;
-	if (peer->the_mark && peer->pokeexpire != -1) {
-		AST_SCHED_DEL(sched, peer->pokeexpire);
-	}
-	return peer->the_mark ? CMP_MATCH : 0;
-}
-
-
-/* \brief Unlink all marked peers from ao2 containers */
-static void unlink_marked_peers_from_tables(void)
-{
-	ao2_t_callback(peers, OBJ_NODATA | OBJ_UNLINK | OBJ_MULTIPLE, peer_is_marked, NULL,
-						"initiating callback to remove marked peers");
-	ao2_t_callback(peers_by_ip, OBJ_NODATA | OBJ_UNLINK | OBJ_MULTIPLE, peer_is_marked, NULL,
-						"initiating callback to remove marked peers");
-}
-
-/* \brief Unlink single peer from all ao2 containers */
-static void unlink_peer_from_tables(struct sip_peer *peer)
-{
-	ao2_t_unlink(peers, peer, "ao2_unlink of peer from peers table");
-	if (!ast_sockaddr_isnull(&peer->addr)) {
-		ao2_t_unlink(peers_by_ip, peer, "ao2_unlink of peer from peers_by_ip table");
-	}
-}
-
+#ifdef REF_DEBUG
+#define ref_peer(arg1,arg2) _ref_peer((arg1),(arg2), __FILE__, __LINE__, __PRETTY_FUNCTION__)
+#define unref_peer(arg1,arg2) _unref_peer((arg1),(arg2), __FILE__, __LINE__, __PRETTY_FUNCTION__)
+static struct sip_peer *_ref_peer(struct sip_peer *peer, char *tag, char *file, int line, const char *func)
+{
+	if (peer)
+		__ao2_ref_debug(peer, 1, tag, file, line, func);
+	else
+		ast_log(LOG_ERROR, "Attempt to Ref a null peer pointer\n");
+	return peer;
+}
+
+static struct sip_peer *_unref_peer(struct sip_peer *peer, char *tag, char *file, int line, const char *func)
+{
+	if (peer)
+		__ao2_ref_debug(peer, -1, tag, file, line, func);
+	return NULL;
+}
+#else
 /*!
  * helper functions to unreference various types of objects.
  * By handling them this way, we don't have to declare the
@@ -2834,6 +2827,66 @@
 {
 	ao2_t_ref(peer, 1, tag);
 	return peer;
+}
+#endif /* REF_DEBUG */
+
+static void peer_sched_cleanup(struct sip_peer *peer)
+{
+	if (peer->pokeexpire != -1) {
+		AST_SCHED_DEL_UNREF(sched, peer->pokeexpire,
+				unref_peer(peer, "removing poke peer ref"));
+	}
+	if (peer->expire != -1) {
+		AST_SCHED_DEL_UNREF(sched, peer->expire,
+				unref_peer(peer, "remove register expire ref"));
+	}
+}
+
+typedef enum {
+	SIP_PEERS_MARKED,
+	SIP_PEERS_ALL,
+} peer_unlink_flag_t;
+
+/* this func is used with ao2_callback to unlink/delete all marked or linked
+   peers, depending on arg */
+static int match_and_cleanup_peer_sched(void *peerobj, void *arg, int flags)
+{
+	struct sip_peer *peer = peerobj;
+	peer_unlink_flag_t which = *(peer_unlink_flag_t *)arg;
+
+	if (which == SIP_PEERS_ALL || peer->the_mark) {
+		peer_sched_cleanup(peer);
+		return CMP_MATCH;
+	}
+	return 0;
+}
+
+static void unlink_peers_from_tables(peer_unlink_flag_t flag)
+{
+	ao2_t_callback(peers, OBJ_NODATA | OBJ_UNLINK | OBJ_MULTIPLE,
+		match_and_cleanup_peer_sched, &flag, "initiating callback to remove marked peers");
+	ao2_t_callback(peers_by_ip, OBJ_NODATA | OBJ_UNLINK | OBJ_MULTIPLE,
+		match_and_cleanup_peer_sched, &flag, "initiating callback to remove marked peers");
+}
+
+/* \brief Unlink all marked peers from ao2 containers */
+static void unlink_marked_peers_from_tables(void)
+{
+	unlink_peers_from_tables(SIP_PEERS_MARKED);
+}
+
+static void unlink_all_peers_from_tables(void)
+{
+	unlink_peers_from_tables(SIP_PEERS_ALL);
+}
+
+/* \brief Unlink single peer from all ao2 containers */
+static void unlink_peer_from_tables(struct sip_peer *peer)
+{
+	ao2_t_unlink(peers, peer, "ao2_unlink of peer from peers table");
+	if (!ast_sockaddr_isnull(&peer->addr)) {
+		ao2_t_unlink(peers_by_ip, peer, "ao2_unlink of peer from peers_by_ip table");
+	}
 }
 
 /*! \brief maintain proper refcounts for a sip_pvt's outboundproxy
@@ -2945,6 +2998,10 @@
 
 	if (dialog->t38id > -1) {
 		AST_SCHED_DEL_UNREF(sched, dialog->t38id, dialog_unref(dialog, "when you delete the t38id sched, you should dec the refcount for the stored dialog ptr"));
+	}
+
+	if (dialog->stimer) {
+		stop_session_timer(dialog);
 	}
 
 	dialog_unref(dialog, "Let's unbump the count in the unlink so the poor pvt can disappear if it is time");
@@ -3879,22 +3936,15 @@
  */
 int sip_cancel_destroy(struct sip_pvt *p)
 {
-	int res = 0;
-
 	if (p->final_destruction_scheduled) {
-		return res;
+		return 0;
 	}
 
 	if (p->autokillid > -1) {
-		int res3;
-
-		if (!(res3 = ast_sched_del(sched, p->autokillid))) {
-			append_history(p, "CancelDestroy", "");
-			p->autokillid = -1;
-			dialog_unref(p, "dialog unrefd because autokillid is de-sched'd");
-		}
-	}
-	return res;
+		append_history(p, "CancelDestroy", "");
+		AST_SCHED_DEL_UNREF(sched, p->autokillid, dialog_unref(p, "remove ref for autokillid"));
+	}
+	return 0;
 }
 
 /*! \brief Acknowledges receipt of a packet and stops retransmission
@@ -5496,7 +5546,10 @@
 {
 	struct sip_request *req;
 
-	if (p->stimer) {
+	/* Destroy Session-Timers if allocated */
+ 	if (p->stimer) {
+		p->stimer->quit_flag = 1;
+		stop_session_timer(p);
 		ast_free(p->stimer);
 		p->stimer = NULL;
 	}
@@ -5571,17 +5624,6 @@
 		p->route = NULL;
 	}
 	deinit_req(&p->initreq);
-
-	/* Destroy Session-Timers if allocated */
-	if (p->stimer) {
-		p->stimer->quit_flag = 1;
-		if (p->stimer->st_active == TRUE && p->stimer->st_schedid > -1) {
-			AST_SCHED_DEL_UNREF(sched, p->stimer->st_schedid,
-					dialog_unref(p, "removing session timer ref"));
-		}
-		ast_free(p->stimer);
-		p->stimer = NULL;
-	}
 
 	/* Clear history */
 	if (p->history) {
@@ -6537,7 +6579,7 @@
 		struct ast_control_t38_parameters parameters = p->t38.their_parms;
 
 		if (p->t38.state == T38_PEER_REINVITE) {
-			AST_SCHED_DEL(sched, p->t38id);
+			AST_SCHED_DEL_UNREF(sched, p->t38id, dialog_unref(p, "when you delete the t38id sched, you should dec the refcount for the stored dialog ptr"));
 			parameters.max_ifp = ast_udptl_get_far_max_ifp(p->udptl);
 			parameters.request_response = AST_T38_REQUEST_NEGOTIATE;
 			ast_queue_control_data(p->owner, AST_CONTROL_T38_PARAMETERS, &parameters, sizeof(parameters));
@@ -7798,7 +7840,7 @@
 /*! \brief find or create a dialog structure for an incoming SIP message.
  * Connect incoming SIP message to current dialog or create new dialog structure
  * Returns a reference to the sip_pvt object, remember to give it back once done.
- *     Called by handle_incoming(), sipsock_read
+ *     Called by handle_request_do
  */
 static struct sip_pvt *find_call(struct sip_request *req, struct ast_sockaddr *addr, const int intended_method)
 {
@@ -11069,11 +11111,15 @@
 		doing_directmedia = (!ast_sockaddr_isnull(&p->redirip) && !(ast_format_cap_is_empty(p->redircaps))) ? TRUE : FALSE;
 		/* Check if we need video in this call */
 		if ((ast_format_cap_has_type(p->jointcaps, AST_FORMAT_TYPE_VIDEO)) && !p->novideo) {
-			if (p->vrtp) {
+			ast_format_cap_joint_copy(p->jointcaps, p->redircaps, tmpcap);
+			if (doing_directmedia && !ast_format_cap_has_type(tmpcap, AST_FORMAT_TYPE_VIDEO)) {
+				ast_debug(2, "This call needs video offers, but caller probably did not offer it!\n");
+			} else if (p->vrtp) {
 				needvideo = TRUE;
 				ast_debug(2, "This call needs video offers!\n");
-			} else

[... 2517 lines stripped ...]



More information about the asterisk-commits mailing list