Commit Graph

6912 Commits

Author SHA1 Message Date
Jonathan Rose
b3a2f27111 Adds legacy_useroption_parsing to address interoperability concerns.
With the new option engaged, Asterisk should interpret user fields with useroptions
contained within the userfield of the uri by stripping them out of the original message
whenever a semicolon is encountered in the userfield string.

(closes issue #18344)
Reported by: danimal
Tested by: jrose

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@319938 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-20 13:28:24 +00:00
Terry Wilson
35a3aa4601 Merged revisions 319653 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2

................
  r319653 | twilson | 2011-05-18 16:11:57 -0700 (Wed, 18 May 2011) | 15 lines
  
  Merged revisions 319652 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r319652 | twilson | 2011-05-18 16:04:35 -0700 (Wed, 18 May 2011) | 8 lines
    
    Make sure everyone gets an unhold when a transfer succeeds
    
    Some phones, like the Snom phones, send a hold to the transfer target after
    before sending the REFER. We need to make sure that we unhold the parties
    that are being connected after the masquerade. If Local channels with the /nm
    option are used when dialing the parties, hold music would still be playing on
    the transfer target, even after being connected with the transferee.
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@319654 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-18 23:15:58 +00:00
Terry Wilson
0219829eef Unbreak the storing of registrations for restart
The fix for issue 18882 broke retrieving non-realtime peers from the ast_db
on restart/reload. This patch tries to unbreak things while leaving the intent
of the original fix intact.
(closes issue #19318)
Reported by: remiq
Patches: 
      diff.txt uploaded by twilson (license 396)
Tested by: lmadsen, remiq


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@319552 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-18 20:22:36 +00:00
Richard Mudgett
789411102a Merged revision 319468 from
https://origsvn.digium.com/svn/asterisk/be/branches/C.3-bier

..........
  r319468 | rmudgett | 2011-05-17 16:49:31 -0500 (Tue, 17 May 2011) | 15 lines

  The mISDN HDLC mode is prevented on dialed channels.

  The use of mISDN HDLC mode is prevented if the mISDN dial technology
  option 'h1' is used when config option astdtmf=yes.

  There is a bug in channels/misdn/isdn_lib.c which prevents the use of HDLC
  mode.  Instead of setting the channel to HDLC mode it is set to
  transparent(no dsp, no hdlc), although hdlc is not "no hdlc".  I.e the
  logging message is correct, but the if condition is not.

  Make check the nodsp and hdlc flags.

  JIRA ABE-2787
  JIRA SWP-3437
..........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@319469 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-17 21:57:56 +00:00
Terry Wilson
ac0cc37ab5 Merged revisions 319202 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2

........
  r319202 | twilson | 2011-05-16 11:00:21 -0700 (Mon, 16 May 2011) | 4 lines
  
  Unlink a peer from peers_by_ip when expiring a registration
  
  Review: https://reviewboard.asterisk.org/r/1218/
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@319204 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-16 18:17:43 +00:00
David Vossel
215638e661 Merged revisions 319144 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2

........
  r319144 | dvossel | 2011-05-16 10:56:16 -0500 (Mon, 16 May 2011) | 2 lines
  
  Fixes issue with peer ref-counting during handle_request_subscribe.

  (closes issue #19293)
  Reported by: irroot
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@319145 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-16 15:57:26 +00:00
Matthew Nicholson
6f625f139a Make sure tcptls_session exists before dereferencing it.
(closes issue #19192)
Reported by: stknob
Patches:
      10-tcptls-unreachable-peer-segfault.patch uploaded by Chainsaw (license 723)
Tested by: vois, Chainsaw


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@319142 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-16 15:53:26 +00:00
Brett Bryant
6ddb2e9ee0 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



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@318917 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-13 17:56:04 +00:00
Richard Mudgett
209d8d3c15 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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@318783 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-13 01:47:05 +00:00
Matthew Nicholson
1b1961f73f Handle ipv6 addresses in the sent-by Via: field.
This change fixes a regression in via header parsing and ipv6 handling.

(closes issue #18951)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@318720 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-12 23:35:51 +00:00
Alec L Davis
87d80af96c 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/



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@318671 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-12 22:52:08 +00:00
Terry Wilson
84b9092e03 Comment out the REF_DEBUG that slipped in during debugging
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@318550 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-11 18:47:33 +00:00
Terry Wilson
5badb39856 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/
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@318549 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-11 18:39:48 +00:00
Richard Mudgett
0ec0f72506 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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@318499 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-10 23:41:08 +00:00
Russell Bryant
5578557df1 chan_iax2: change LOG_NOTICE to LOG_DEBUG in iax2_read().
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@318436 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-10 15:13:16 +00:00
Terry Wilson
f96cf88212 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)
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@318337 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-09 20:23:15 +00:00
David Vossel
a0d4192e2d 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)
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@318233 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-09 17:09:55 +00:00
Richard Mudgett
90c544c0e1 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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@318231 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-09 16:57:18 +00:00
Russell Bryant
1c168cd613 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)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@318055 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-07 23:24:18 +00:00
Russell Bryant
7c6e763258 chan_sip: Destroy variables on a sip_pvt before copying vars from the sip_peer.
Don't duplicate variables on the sip_pvt.  Just reset the variable list each
time.

(closes issue #19202)
Reported by: wdoekes
Patches:
      issue19202_destroy_challenged_invite_chanvars.patch uploaded by wdoekes (license 717)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@317867 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-06 20:01:16 +00:00
Russell Bryant
d5a0fb899a chan_sip: fix a deadlock in check_rtp_timeout.
Don't block doing silly deadlock avoidance.  Just return and try again later.
The funciton gets called often enough that it's fine.  Also, this change was
already made in trunk.

(closes issue #18791)
Reported by: irroot
Patches:
      chan_sip.rtptimeout.patch uploaded by irroot (license 52)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@317865 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-06 19:46:49 +00:00
Russell Bryant
25ccc62ee9 URI encode less characters in the RPID and Contact headers.
If this change causes any problems, we will need to backport the more extensive
uri encoding and decoding handling changes that are in trunk/1.10.

(closes issue #18686)
Reported by: wolfgang
Patches:
      quick-and-dirty.patch uploaded by wdoekes (license 717)
Tested by: wdoekes, devellow, wolfgang, mav3rick


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@317861 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-06 19:35:00 +00:00
Richard Mudgett
900e3e5d03 Fix SIP connected line updates.
This patch fixes a couple SIP connected line update problems:

1) The connected line needs to be updated when the initial INVITE is sent
if there is a peer callerid configured.  Previously, the connected line
information did not get reported until the call was connected so SIP could
not report connected line information in ringing or progress messages.

2) The connected line should not be updated on initial connect if there is
no connected line information.  Previously, all it did was wipe out any
default preset CONNECTEDLINE information set by the dialplan with empty
strings.

(closes issue #18367)
Reported by: GeorgeKonopacki
Patches:
      issue18367_v1.8.patch uploaded by rmudgett (license 664)
Tested by: rmudgett

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@317670 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-06 16:19:18 +00:00
Russell Bryant
6446ba738b Fix some consistency issues with jitterbuffer config.
Store the defaults noted in the sample config files in the jitterbuffer config
data structure.  This makes the CLI commands that output these settings show
the right thing.  Also only show the settings that are relevant in the settings
CLI commands, based on which jitterbuffer is selected and whether it's enabled.

(closes issue #19083)
Reported by: rgagnon
Patches:
      issue-19083-trunk-r313139.diff uploaded by rgagnon (license 1202)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@317478 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-05 22:53:45 +00:00
Russell Bryant
1ccfa50ba8 Fix more "set but unused" warnings.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@317474 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-05 22:36:33 +00:00
Jonathan Rose
fd5f6b5174 Resolves a deadlock that occurs during sip_new
This is based on an uncommitted patch by jpeeler for the issue.  Instead of
relocking and then unlocking the channel though, we keep the lock on the channel
until we are finished doing what we need to the channel.

(closes issue #18441)
Reported by: Alric



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@317283 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-05 19:09:13 +00:00
Russell Bryant
06efd495b2 Merged revisions 317255 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2

................
  r317255 | russell | 2011-05-05 13:29:53 -0500 (Thu, 05 May 2011) | 22 lines
  
  Merged revisions 317211 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r317211 | russell | 2011-05-05 13:20:29 -0500 (Thu, 05 May 2011) | 15 lines
    
    chan_sip: fix broken realtime peer count, fix memory leak
    
    This patch addresses two bugs in chan_sip:
    
    1) The count of realtime peers and users was off.  The increment checked the
    value of the caching option, while the decrement did not.
    
    2) Add a missing regfree() for a regex.
    
    (closes issue #19108)
    Reported by: vrban
    Patches:
          missing_regfree.patch uploaded by vrban (license 756)
          sip_object_counter.patch uploaded by vrban (license 756)
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@317281 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-05 18:39:44 +00:00
Matthew Nicholson
976060a8ca Set SO_KEEPALIVE on SIP TCP sockets so that they eventually go away when a peer
abruptly disappears.  This mostly occurs after a successful registration.

(closes issue #17544)
Reported by: marcelloceschia
Patches:
      (modified) tcptls.patch uploaded by st (license 907)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@317196 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-05 18:02:52 +00:00
David Vossel
e389fab7dd Merged revisions 316616 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2

........
  r316616 | dvossel | 2011-05-04 08:40:41 -0500 (Wed, 04 May 2011) | 12 lines
  
  Fixes session-timers=refuse not being enforced for *caller*
  
  During handle_request_invite, the session timer mode was retrieved from
  a cached variable.  This patch forces a peer lookup of the session timer
  mode in the case of an incoming invite.
  
  (closes issue #18804)
  Reported by: wdoekes
  Patches: 
        issue18804_session_timer_refuse_caller.patch uploaded by wdoekes (license 717)
        issue_18804_v2.diff uploaded by dvossel (license 671)
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@316617 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-04 13:44:41 +00:00
Russell Bryant
1c252efce5 Use htons() instead of ntohs() in some places.
(closes issue #19200)
Reported by: wdoekes
Patches:
      issue19200-trunk.patch uploaded by wdoekes (license 717)
      issue19200-1.8.x.patch uploaded by wdoekes (license 717)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@316336 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-03 22:13:31 +00:00
David Vossel
27ef94eb74 Merged revisions 316329 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2

................
  r316329 | dvossel | 2011-05-03 16:29:55 -0500 (Tue, 03 May 2011) | 17 lines
  
  Merged revisions 316328 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r316328 | dvossel | 2011-05-03 16:27:59 -0500 (Tue, 03 May 2011) | 10 lines
    
    Fixes chan_local crashs in local_fixup()
    
    Thanks OEJ for tracking down the issue and submitting the patch.
    
    (closes issue #19053)
    Reported by: oej
    Tested by: oej
    
    Review: https://reviewboard.asterisk.org/r/1158/
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@316330 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-03 21:37:59 +00:00
Russell Bryant
a82f1bb995 Fix a bunch of compiler warnings generated by gcc 4.6.0.
Most of these are -Wunused-but-set-variable, but there were a few others
mixed in here, as well.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@316265 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-03 19:55:49 +00:00
Richard Mudgett
c5ad2f12a0 The dahdi_hangup() call does not clean up the channel fully.
After dahdi_hangup() has supposedly hungup an ISDN channel there is still
traffic on the S0-bus because the channel was not cleaned up fully.

Shuffled the hangup code to include some missing cleanup.  Also fixed some
code formatting in the area.  I think the primary missing clean up code
was the call to tone_zone_play_tone() to turn off any active tones on the
channel.

(closes issue #19188)
Reported by: jg1234
Patches:
      issue19188_v1.8.patch uploaded by rmudgett (license 664)
Tested by: jg1234


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@316224 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-03 19:18:30 +00:00
David Vossel
981716535a Never put the Require: timer header in an Invite.
This has already been discussed and should have been resolved earlier.  View
revsion 285565's log for more information about why it is important to not
put timer in the Require header.

(closes issue #18704)
Reported by: mfrager


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@316217 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-03 18:59:06 +00:00
Matthew Nicholson
e8210addf8 Merged revisions 315893 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2

................
  r315893 | mnicholson | 2011-04-27 14:03:05 -0500 (Wed, 27 Apr 2011) | 21 lines
  
  Merged revisions 315891 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r315891 | mnicholson | 2011-04-27 13:57:56 -0500 (Wed, 27 Apr 2011) | 14 lines
    
    Fix our compliance with RFC 3261 section 18.2.2.
    
    This change optimizes the free_via() function and removes some redundant null
    checking. It also fixes compliance with RFC 3261 section 18.2.2 by always using
    the port specified in the Via header for routing responses (even when maddr is
    not set). Also the htons() function is now used when setting the port.
    Additional documentation comments have been added in various places to make the
    logic in the code clearer.
    
    (closes issue #18951)
    Reported by: jmls
    Patches:
          issue18951_set_proper_port_from_via.patch uploaded by wdoekes (license 717) (modified)
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@315894 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-04-27 19:14:27 +00:00
Terry Wilson
e4ef679575 Merged revisions 315672 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2

................
  r315672 | twilson | 2011-04-26 15:52:25 -0700 (Tue, 26 Apr 2011) | 18 lines
  
  Merged revisions 315671 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r315671 | twilson | 2011-04-26 15:47:56 -0700 (Tue, 26 Apr 2011) | 11 lines
    
    Make sure unregistering a peer unlinks it from the peer container
    
    Instead of mostly copying the code from expire_register, just use the function
    that "does the right thing".
    
    (closes issue #16033)
    Reported by: kkm
    Patches: 
          016033-tilgman-fixed-refcount.diff uploaded by kkm (license 888)
    Tested by: kkm, tilghman, twilson
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@315673 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-04-26 22:56:19 +00:00
Russell Bryant
4e99831b16 chan_local: resolve a deadlock.
This patch resolves a fairly complex deadlock that can occur with the
combination of chan_local and a dialplan switch, such as dynamic realtime
extensions, which pulls autoservice into the picture when doing a dialplan
lookup.

(closes issue #18818)
Reported by: nic
Patches:
      issue18818.patch uploaded by jthurman (license 614)
      18818.v1.txt uploaded by russell (license 2)
Tested by: nic, jthurman, kterzi, steve-howes, sysreq, IshMalik


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@315446 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-04-26 17:40:23 +00:00
Richard Mudgett
ced679eef9 When using MGCP realtime gateway definitions, random crashes occur.
Fixed incorrect linked list node removal for realtime gateways.

(closes issue #18291)
Reported by: nahuelgreco
Patches:
      dangling-pointers-when-pruning.patch uploaded by nahuelgreco (license 162)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@315349 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-04-25 21:49:00 +00:00
Russell Bryant
f575dd5397 Merged revisions 315212 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2

........
  r315212 | russell | 2011-04-25 14:00:24 -0500 (Mon, 25 Apr 2011) | 7 lines
  
  Don't link non-cached realtime peers into the peers_by_ip container.
  
  (closes issue #18924)
  Reported by: wdoekes
  Patches:
        issue18924_uncached_realtime_peers_leak-1.6.2.17.patch uploaded by wdoekes (license 717)
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@315213 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-04-25 19:04:28 +00:00
Alec L Davis
d67b2b00b3 Merged revisions 315052 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2

................
  r315052 | alecdavis | 2011-04-25 19:11:12 +1200 (Mon, 25 Apr 2011) | 16 lines
  
  Merged revisions 315051 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r315051 | alecdavis | 2011-04-25 19:06:29 +1200 (Mon, 25 Apr 2011) | 11 lines
    
    chan_local:check_bridge() misplaced misplaced ast_mutex_unlock 
    
    if !p->chan->_bridge->_softhangup path isn't followed, brigde remains locked.
    
    (closes issue #19176)
    Reported by: alecdavis
    Patches: 
          bug19176.diff.txt uploaded by alecdavis (license 585)
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@315053 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-04-25 07:14:32 +00:00
Alec L Davis
f014ffa9d0 chan_dahdi: Can't return to normal ring after distinctive ring on FXS
clear a previous distinctivering pattern before each new call

(closes issue #18985)
Reported by: bromont
Patches: 
      bug18985.diff.txt uploaded by alecdavis (license 585)
Tested by: alecdavis, bromont




git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@315001 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-04-22 22:59:18 +00:00
Matthew Nicholson
1e0234afd6 Merged revisions 314958 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2

................
  r314958 | mnicholson | 2011-04-22 15:49:45 -0500 (Fri, 22 Apr 2011) | 17 lines
  
  Merged revisions 311203,314908 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r311203 | mnicholson | 2011-03-17 14:14:37 -0500 (Thu, 17 Mar 2011) | 4 lines
    
    Don't hold the pvt lock while streaming a file.
    
    ABE-2756
  ........
    r314908 | mnicholson | 2011-04-22 15:01:48 -0500 (Fri, 22 Apr 2011) | 4 lines
    
    Prevent the login thread and the app threads from using the asterisk channel at the same time.
    
    ABE-2756
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@314959 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-04-22 21:20:08 +00:00
Tzafrir Cohen
51be3664e1 Fix a few typos (shown by Lintian)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@314779 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-04-22 13:59:43 +00:00
Richard Mudgett
1310fd4175 Correct DAHDIShowChannels XML documentation.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@314732 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-04-21 22:38:44 +00:00
Matthew Nicholson
4468fe047e Merged revisions 314620 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2

................
  r314620 | mnicholson | 2011-04-21 13:22:19 -0500 (Thu, 21 Apr 2011) | 20 lines
  
  Merged revisions 314607 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r314607 | mnicholson | 2011-04-21 13:19:21 -0500 (Thu, 21 Apr 2011) | 14 lines
    
    Added limits to the number of unauthenticated sessions TCP based protocols are allowed to have open simultaneously.  Also added timeouts for unauthenticated sessions where it made sense to do so.
    
    Unrelated, the manager interface now properly checks if the user has the "system" privilege before executing shell commands via the Originate action. 
    
    AST-2011-005
    AST-2011-006
    
    (closes issue #18787)
    Reported by: kobaz
    
    (related to issue #18996)
    Reported by: tzafrir
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@314628 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-04-21 18:24:05 +00:00
Terry Wilson
459ab135c2 Merged revisions 314549 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2

........
  r314549 | twilson | 2011-04-20 17:17:34 -0700 (Wed, 20 Apr 2011) | 6 lines
  
  Don't allocate more space than necessary for a sip_pkt
  
  This extra allocation is a hold-over from when pkt->data was a 
  character array. Now that it is an allocated string, just allocate 
  enough for the sip_pkt.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@314550 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-04-21 00:23:04 +00:00
David Vossel
4c1dd375f7 Remove the need for deadlock avoidance in chan_sip do_monitor.
Deadlock avoidance between the sip pvt and the pvt->owner is
very difficult.  Now that channel's are ao2 objects, this complication
is no longer necessary.  It turns out the pvt's msg queue only
exists because of deadlock avoidance (when deadlock avoidance fails
msgs were added to a queue to be processed later), so this goes away as well.

The technique used in the new sip_lock_pvt_full() function should
be used as a template for replacing all locations where deadlock
avoidance occurs between a channel tech_pvt and the pvt's owner.
My hope is that this will begin a reversal of the invalid channel
driver locking architecture we have been using for so long. 

This patch also resolves an issue where the pvt->owner gets
unlocked during processing the msg queue.

(closes issue #18690)
Reported by: dvossel

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@314067 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-04-18 15:23:45 +00:00
David Vossel
2998c62fc4 sip codec negotiation of dynamic rtp payloads error fix
This patch fixes how chan_sip handles dynamic rtp payload types
it does not understand.  At the moment if a dynamic payload's mime
type does not match one we understand, the payload does not get
removed from our payload table.  As a result of this, the payload
is set to whatever dynamic codec we use internally for that payload
number on outgoing INVITES.  This is incorrect.

This patch fixes this by properly checking the rtpmap set function's
return code to make sure it was found.  The function can return both
-1 and -2 depending on the source of the mismatch.  We were just
checking -1 explicitly.

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



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@314017 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-04-18 13:41:06 +00:00
Richard Mudgett
89f98df5d8 Leftover debug messages unconditionally sent to the console.
Executing Dial(DAHDI/1/18475551212,300,) with the echotraining config
option enabled outputs the following debug messages unconditionally:

Dialing T1847555121 on 1
Dialing www2w on 1

* Made debug messages in my_dial_digits() normal debug messages that do
not get output unless enabled.

* Reworded some debug messages in my_dial_digits() to be clearer.

* Replace strncpy() with ast_copy_string() in my_dial_digits() which does
the same job better.

(closes issue #18847)
Reported by: vmikhelson
Tested by: rmudgett


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@313780 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-04-14 20:59:56 +00:00
Jonathan Rose
2600de8c9f fixing stupid mistake with putting code before variable declaration
........

  Merged revisions 313435 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
	
  ........
	  
    r313432 | jrose | 2011-04-12 13:12:29 -0500 (Tue, 12 Apr 2011) | 14 lines
		      
	reload Chan_dahdi memory leak caused by variables
			
	chan_dahdi reloading with variables set via setvar in chan_dahdi.conf would
	stay in the dahdi_pvt structs for individual channels (causing them to just
	continue adding the new ones to the list) and also there was a memory leak
	causes by the conf objects. This patch resolves both of these by using 
	ast_variables_destroy during the loading process.
									
	(closes issue #17450)
	Reported by: nahuelgreco
	Patches:
		patch.diff uploaded by jrose (license 1225)
	Tested by: tilghman, jrose
	Review: https://reviewboard.asterisk.org/r/1170/
																	
  ........

........
																	  
																	  																																	














git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@313436 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-04-12 18:47:05 +00:00