Commit Graph

5948 Commits

Author SHA1 Message Date
David Vossel 88bda581ec Merged revisions 195991 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r195991 | dvossel | 2009-05-21 14:04:56 -0500 (Thu, 21 May 2009) | 14 lines
  
  Sign problem calculating timestamp for iax frame leads to no audio on the receiving peer.
  
  There are rare cases in which a frame's delivery timestamp is slightly less than the iax2_pvt's offset.  This causes the pvt's timestamp to be a small negative number, but since the timestamp value is unsigned it looks like a huge positive number.  This patch checks for this negative case and sets the ms to zero.  A similar check is already done right below this one in the 'else' statement.
  
  (closes issue #15032)
  Reported by: guillecabeza
  Patches:
        chan_iax2.c.patch_timestamp uploaded by guillecabeza (license 380)
  Tested by: guillecabeza
  
  (closes issue #14216)
  Reported by: Andrey Sofronov
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@195995 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-21 19:11:49 +00:00
Mark Michelson 56903a7485 Get rid of some duplicated code and correct a connected line error.
When receiving a 200 OK response to an INVITE, it was possible to transmit two
connected line updates instead of a single one. Furthermore, the second did not
have the proper information present.

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



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@195798 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-20 20:45:05 +00:00
Mark Michelson 7b4eeed257 Add basic support for handling connected line-related UPDATE requests.
SIP purists may want to look the other way...

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

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

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

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

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

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

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

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

ABE-1840
ABE-1822



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@195589 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-19 20:59:38 +00:00
Joshua Colp 99a1e0ce01 Merged revisions 195448 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r195448 | file | 2009-05-19 11:41:45 -0300 (Tue, 19 May 2009) | 7 lines
  
  Fix a bug where direct RTP setup would partially occur even when disabled if the calling channel was answered.
  
  (issue #13545)
  Reported by: davidw
  (issue #14244)
  Reported by: mbnwa
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@195449 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-19 14:43:54 +00:00
Richard Mudgett 0163194d93 The facilityenable parameter does not have anything to do with pritimer parameters.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@195266 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-18 16:29:06 +00:00
Joshua Colp 9f4e8a5bda Fix a bug where specifying an empty outboundproxy would cause packets to get sent to ourself.
(closes issue #15106)
Reported by: timeshell


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@195089 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-18 13:36:17 +00:00
David Vossel 2595c54876 Merged revisions 194873 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r194873 | dvossel | 2009-05-15 17:43:13 -0500 (Fri, 15 May 2009) | 17 lines
  
  IAX2 REGAUTH loop
  
  IAX was not sending REGREJ to terminate invalid registrations.  Instead it sent another REGAUTH if the authentication challenge failed.  This caused a loop of REGREQ and REGAUTH frames.
  
  (Related to Security fix AST-2009-001)
  
  (closes issue #14867)
  Reported by: aragon
  Tested by: dvossel
  
  (closes issue #14717)
  Reported by: mobeck
  Patches:
        regauth_loop_update_patch.diff uploaded by dvossel (license 671)
  Tested by: dvossel
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@194874 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-15 22:44:44 +00:00
David Vossel d9ac4bfc6f Merged revisions 194557,194685 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r194557 | dvossel | 2009-05-14 17:59:43 -0500 (Thu, 14 May 2009) | 10 lines
  
  IAX2 "Ghost" Channels
  
  There is a bug tracker issue where people are reporting "Ghost" channels in their 'iax2 show channels' output.  The confusion is caused by channels being listed as "(NONE)" with format "unknown".  These are not channels of coarse.  They are usually just pending registration or poke requests, but it is confusing output.  To help make sense of this I have added two columns to 'iax2 show channels'.  One shows the first message which started the transaction, and the second shows the last message sent by either side of the call.  This helps diagnose why the entry exists and why it may not go away.
  
  (closes issue #14207)
  Reported by: clive18
  
  Review: https://reviewboard.asterisk.org/r/246/
........
  r194685 | dvossel | 2009-05-15 10:40:37 -0500 (Fri, 15 May 2009) | 6 lines
  
  Update to previous IAX2 "Ghost" Channels patch.
  
  Fixed some comments made on reviewboard for the previous patch.
  
  (issue #14207)
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@194833 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-15 20:52:12 +00:00
Mark Michelson 64c6397bd0 Merged revisions 194484 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r194484 | mmichelson | 2009-05-14 17:17:55 -0500 (Thu, 14 May 2009) | 24 lines
  
  Fix a race condition where a reinvite could trigger a 482 response.
  
  The loop detection/spiral detection code in chan_sip used the owner
  channel's state as a criterion for determining if the incoming INVITE
  is a looped request. The problem with this is that the INVITE-handling
  code happens in a different thread than the thread that marks the owner
  channel as being up. As a result, if a reinvite were to come in very quickly,
  say from another Asterisk on the same LAN, it was possible for the reinvite
  to arrive before the owner channel had been set to the up state.
  
  This patch corrects the problem by using the invitestate of the sip_pvt
  instead, since that can be guaranteed to be set correctly by the time
  the reinvite arrives. Since there is a switch statement further in the
  INVITE-handling code, the AST_STATE_RINGING state also checks the invitestate
  of the sip_pvt in case we should actually be treating the channel as if it were
  up already.
  
  (closes issue #12215)
  Reported by: jpyle
  Patches:
        12215_confirmed.patch uploaded by mmichelson (license 60)
  Tested by: lmadsen
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@194496 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-14 22:20:51 +00:00
Richard Mudgett 7872538b83 Add outgoing_colp misdn.conf port parameter.
Select what to do with outgoing COLP information on this port.
0 - Send out COLP information unaltered. (default)
1 - Force COLP to restricted on all outgoing COLP information.
2 - Do not send COLP information.
outgoing_colp=0

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

JIRA ABE-1853


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@194479 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-14 22:03:49 +00:00
Mark Michelson 56275abb32 Update spiral support in trunk and 1.6.X to match what is in 1.4.
In 1.4, a SIP spiral is treated the same way as a call forward. This
works much better than what is currently in trunk and 1.6.X. The code
in trunk and 1.6.X did not create a new call to the recipient of the spiral,
instead trying to continue the same call. In addition to just being plain
wrong, this also had the side effect of only being able to spiral calls
to other SIP channels.

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

(relates to issue #13630)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@193954 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-12 20:28:13 +00:00
Kevin P. Fleming 1c988d8996 add 'const' qualifiers in various places where they should have been
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@193832 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-12 13:59:35 +00:00
Richard Mudgett 3b01ff719c Merged revisions 193613 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r193613 | rmudgett | 2009-05-11 14:09:00 -0500 (Mon, 11 May 2009) | 12 lines
  
  Sent wrong message to clear a call we started if the other end has not responed yet.
  
  In the state MISDN_CALLING (i.e. SETUP was sent but no answer has arrived yet),
  it is not allowed to clear the call with RELEASE_COMPLETE.  It must be
  cleared with DISCONNECT.  A RELEASE_COMPLETE is only allowed as an answer
  to a SETUP.  (See Q.931 ch. 5.3.2, 5.3.2.a, 5.3.2.b)
  
  Patches:
      chan-misdn-ccstate7.patch uploaded by customer.
  
  JIRA ABE-1862
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@193614 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-11 19:11:29 +00:00
David Vossel fbad7a508d TCP not matching valid peer.
find_peer() does not find a valid peer when using pvt->recv as the sockaddr_in argument.  Because of the way TCP works, the port number in pvt->recv is not what we're looking for at all.  There is currently only one place that find_peer searches for a peer using the sockaddr_in argument.  If the peer is not found after using pvt->recv (works for UDP since the port number will be correct), a temp sockaddr_in struct is made using the Contact header in the sip_request.  This has the correct port number in it.

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



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@193387 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-08 20:32:51 +00:00
David Vossel 86d63dc261 Merged revisions 193262 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r193262 | dvossel | 2009-05-08 09:51:09 -0500 (Fri, 08 May 2009) | 9 lines
  
  "misdn show config" segfaults asterisk, if no MSN lists 
  
  (closes issue #14976)
  Reported by: alecdavis
  Patches:
        misdn_config.diff.txt uploaded by alecdavis (license 585)
  Tested by: alecdavis, FabienToune
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@193263 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-08 14:52:19 +00:00
Richard Mudgett 90f76fcfba Merged revisions 193050 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r193050 | rmudgett | 2009-05-07 17:17:06 -0500 (Thu, 07 May 2009) | 5 lines
  
  Give a more helpful message when an incoming call's dialed extension does not match.
  
  Added the dialed extension and context to the chan_misdn messages warning
  that the dialed number cannot be matched in the dialplan.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@193077 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-07 22:24:04 +00:00
Tilghman Lesher e4149506a1 Send DTMF frame before playing back audio.
(closes issue #14858)
 Reported by: barryf
 Patches: 
       20090507__bug14858.diff.txt uploaded by tilghman (license 14)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@192938 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-07 17:13:36 +00:00
Tilghman Lesher 01e5a86e1a Merged revisions 192932 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r192932 | tilghman | 2009-05-07 11:29:08 -0500 (Thu, 07 May 2009) | 10 lines
  
  Eliminate repetition of fullcontact during reconstruction.
  If the fullcontact field appears in both the sippeers and the
  sipregs table, then during reconstruction of the field, it will
  otherwise be doubled.
  (closes issue #14754)
   Reported by: Alexei Gradinari
   Patches: 
         20090506__bug14754.diff.txt uploaded by tilghman (license 14)
   Tested by: lmadsen
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@192933 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-07 16:43:56 +00:00
Joshua Colp 9936f0ca14 Fix a bug where a timer would be created but not acknowledged.
This scenario crept up if chan_iax2 was loaded with no configuration file present.
It would create a timer and tell it to go at an interval but the thread that normally
acknowledges it would not be created because no configuration file was present. The timer
will now be closed if no configuration file is present.

(closes issue #15014)
Reported by: madkins


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@192808 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-06 17:38:51 +00:00
Joshua Colp 19916d118d Merged revisions 192633 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r192633 | file | 2009-05-06 10:30:51 -0300 (Wed, 06 May 2009) | 7 lines
  
  Update some old logic to stop both begin and end DTMF frames from reaching the core if rfc2833 is not enabled.
  
  (closes issue #15036)
  Reported by: dimas
  Patches:
        v1-15036.patch uploaded by dimas (license 88)
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@192634 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-06 13:34:35 +00:00
Richard Mudgett 7019ff68db Fixed crashes from issue8824 review board channel locking changes.
The local struct ast_party_connected_line connected_caller variable
was uninitialized when the copy function was called.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@192590 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-05 20:54:07 +00:00
Matthew Fredrickson 965b0f328e Revert CPC patch for now, until I decide whether or not it all should be merged into libss7/1.0 (It's still in the bug13495 branch and in libss7/trunk)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@192427 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-05 17:33:42 +00:00
Joshua Colp 2e7c1e3613 Fix a bug with setting t38pt_udptl at the user or peer level.
If an incoming call authenticated as a user or peer and t38pt_udptl was
not set to yes in general then no UDPTL session would be present and any
T38 related things would fail. This commit changes it so that if after
authenticating T38 is enabled but no UDPTL session is present one will be
created.

(issue AST-215)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@192387 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-05 14:22:47 +00:00
David Vossel 0d44a84870 Merged revisions 192213 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r192213 | dvossel | 2009-05-04 17:37:31 -0500 (Mon, 04 May 2009) | 11 lines
  
  global mohinterpret setting is ignored
  
  mohinterpret and mohsuggest global variables were not copied over during build_users and build_peers.
  
  (closes issue #14728)
  Reported by: dimas
  Patches:
        v1-14728.patch uploaded by dimas (license 88)
  Tested by: dimas, dvossel
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@192214 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-04 22:44:51 +00:00
Sean Bright a0766f8113 Conditional include ioctl's to change EC policy based on DAHDI caps.
This feels like a sane change (wouldn't compile without this addition), but I'm
not intimately familiar with this code.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@191739 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-02 16:43:59 +00:00
Tilghman Lesher a3229fd3e2 Merged revisions 191559 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r191559 | tilghman | 2009-05-01 15:00:23 -0500 (Fri, 01 May 2009) | 6 lines
  
  SIP Response 410 maps to cause code 22 (or 23), not 1.
  (closes issue #14993)
   Reported by: BigJimmy
   Patches: 
         causepatch uploaded by BigJimmy (license 371)
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@191560 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-01 20:01:21 +00:00
Tilghman Lesher 451c59aa18 Set debug message back to DEBUG level.
(closes issue #15007)
 Reported by: hulber


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@191494 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-01 18:18:00 +00:00
Kevin P. Fleming d9d2779008 Add buffer and echo canceller control to CHANNEL() dialplan function for DAHDI channels
Adds ability for CHANNEL() dialplan function, when used on DAHDI channels,
to temporarily change the number of buffers and/or the buffer policy, and also
to enable, disable, or switch the echo canceller between FAX/data and voice
modes.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@191411 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-30 21:42:35 +00:00
Tilghman Lesher b6d2a4a7a8 Make H.323 compile with FDLEAK detection code enabled
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@191219 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-29 23:06:56 +00:00
Richard Mudgett d35fd35ae3 Outgoing PTP redirected calls did not wait for the COLR from the redirected-to party.
For outgoing PTP redirected calls, you now need to use the inhibit(i)
option on all of the REDIRECTING statements before dialing the redirected-to
party.  You still have to set the REDIRECTING(to-xxx,i) and the
REDIRECTING(from-xxx,i) values.  The PTP call will update the redirecting-to
presentation when it becomes available and queue the redirecting update to
the calling channel.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@191175 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-29 21:07:06 +00:00
David Vossel ca138fc807 Consistent SSL/TLS options across conf files
ast_tls_read_conf() is a new api call for handling SSL/TLS options across all conf files.  Before this change, SSL/TLS options were not consistent.  http.conf and manager.conf required the 'ssl' prefix while sip.conf used options with the 'tls' prefix.  While the options had different names in different conf files, they all did the exact same thing.  Now, instead of mixing 'ssl' or 'tls' prefixes to do the same thing depending on what conf file you're in, all SSL/TLS options use the 'tls' prefix.  For example.  'sslenable' in http.conf and manager.conf is now 'tlsenable' which matches what already existed in sip.conf. Since this has the potential to break backwards compatibility, previous options containing the 'ssl' prefix still work, but they are no longer documented in the sample.conf files.  The change is noted in the CHANGES file though.

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



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@191028 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-29 14:39:48 +00:00
Matthew Fredrickson a082ad616f Add support setting CPC from channel variable
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@190947 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-28 22:07:24 +00:00
Matthew Fredrickson 6389ec15fb Make sure that we do not clear the down flag on the BRI during PTMP link transients
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@190946 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-28 22:05:05 +00:00
Richard Mudgett 89d06c7759 Make PTP DivertingLegInformation3 message behavior closer to the specifications.
*  Wait for a DivertingLegInformation3 message after receiving a
DivertingLegInformation1 message to complete the redirecting-to information
before queuing a redirecting update to the other channel.

*  A DivertingLegInformation2 message should be responded to with a
DivertingLegInformation3 when the COLR is determined.  If the call
could or does experience another redirection, you should manually
determine the COLR to send to the switch by setting REDIRECTING(to-pres)
to the COLR and setting REDIRECTING(to-num) = ${EXTEN}.

*  A DivertingLegInformation2 message must have an original called number
if the redirection count is greater than one.  Since Asterisk does
not keep track of this information, we can only indicate that the
number is not available due to interworking.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@190735 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-27 20:03:49 +00:00
David Vossel 8f0b88c8c8 TLS/SSL private key option
Adds option to specify a private key .pem file when configuring TLS or SSL in AMI, HTTP, and SIP.  Before this, the certificate file was used for both the public and private key.  It is possible for this file to hold both, but most configurations allow for a separate private key file to be specified.  Clarified in .conf files how these options are to be used.  The current conf files do not explain how the private key is handled at all, so without knowledge of Asterisk's TLS implementation, it would be hard to know for sure what was going on or how to set it up.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@190545 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-24 21:22:31 +00:00
Richard Mudgett c95c065903 There is no need to use the struct ast_party_connected_line.source update values.
The messages sent by a technology when a connected line update is received
are best determined by the current call state of the channel.  The struct
ast_party_connected_line.source value is really only useful as a possible
tracing aid.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@190517 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-24 17:59:01 +00:00
Russell Bryant c878b21887 Fix a build error.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@190457 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-24 15:17:38 +00:00
Russell Bryant cba19c8a67 Convert the ast_channel data structure over to the astobj2 framework.
There is a lot that could be said about this, but the patch is a big 
improvement for performance, stability, code maintainability, 
and ease of future code development.

The channel list is no longer an unsorted linked list.  The main container 
for channels is an astobj2 hash table.  All of the code related to searching 
for channels or iterating active channels has been rewritten.  Let n be 
the number of active channels.  Iterating the channel list has gone from 
O(n^2) to O(n).  Searching for a channel by name went from O(n) to O(1).  
Searching for a channel by extension is still O(n), but uses a new method 
for doing so, which is more efficient.

The ast_channel object is now a reference counted object.  The benefits 
here are plentiful.  Some benefits directly related to issues in the 
previous code include:

1) When threads other than the channel thread owning a channel wanted 
   access to a channel, it had to hold the lock on it to ensure that it didn't 
   go away.  This is no longer a requirement.  Holding a reference is 
   sufficient.

2) There are places that now require less dealing with channel locks.

3) There are places where channel locks are held for much shorter periods 
   of time.

4) There are places where dealing with more than one channel at a time becomes 
   _MUCH_ easier.  ChanSpy is a great example of this.  Writing code in the 
   future that deals with multiple channels will be much easier.

Some additional information regarding channel locking and reference count 
handling can be found in channel.h, where a new section has been added that 
discusses some of the rules associated with it.

Mark Michelson also assisted with the development of this patch.  He did the 
conversion of ChanSpy and introduced a new API, ast_autochan, which makes it 
much easier to deal with holding on to a channel pointer for an extended period 
of time and having it get automatically updated if the channel gets masqueraded.
Mark was also a huge help in the code review process.

Thanks to David Vossel for his assistance with this branch, as well.  David 
did the conversion of the DAHDIScan application by making it become a wrapper 
for ChanSpy internally.

The changes come from the svn/asterisk/team/russell/ast_channel_ao2 branch.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@190423 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-24 14:04:26 +00:00
Joshua Colp f314c5f13f Fix nat setting on RTP instances.
(closes issue #14827)
Reported by: pj


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@190421 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-24 13:49:03 +00:00
Russell Bryant bbcf30787d Merged revisions 190356 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r190356 | russell | 2009-04-23 16:07:07 -0500 (Thu, 23 Apr 2009) | 2 lines

Remove a bogus ast_channel_unlock().

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@190357 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-23 21:13:07 +00:00
Joshua Colp 80b8d34377 Merged revisions 190286 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r190286 | file | 2009-04-23 16:13:18 -0300 (Thu, 23 Apr 2009) | 6 lines
  
  Fix a bug in chan_local glare hangup detection.
  
  If both sides of a Local channel were hung up at around the same time it was
  possible for one thread to destroy the local private structure and have the other thread
  immediately try to remove the already freed structure from the local channel list.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@190287 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-23 19:15:30 +00:00
Jeff Peeler 2f8da7106d Make chan_h323 respect packetization settings and fix small reload issue.
Previously, packetization settings were ignored and now they are not. A new
config option 'autoframing' has been added to mirror the way chan_sip handles
it. Turning on the autoframing option (available both as a global option or per
peer) overrides the local settings with the remote packetization settings.
Testing was performed with varying packetization levels with the following
codecs: ulaw, alaw, gsm, and g729.

Also, an unrelated config reload issue has been fixed in the case of the config
file not changing.

(closes issue #12415)
Reported by: pj
Patches:
      2009012200_h323packetization.diff.txt uploaded by mvanbaak (license 7), 
      modified by me


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@189993 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-22 19:23:49 +00:00
Tilghman Lesher 9cbd90a864 Do not continue to receive DTMF, when the channel is hungup and about to be destroyed.
(closes issue #14858)
 Reported by: barryf
 Patches: 
       20090421__bug14858.diff.txt uploaded by tilghman (license 14)
 Tested by: barryf


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@189911 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-22 16:01:30 +00:00
David Vossel 00d7c4fefc Fixes segfault when switching UDP to TCP in sip.conf after reload.
If transport in sip.conf is switched from UDP to TCP, Asterisk segfaults right after issuing a sip reload.  The problem is the socket type is changed to TCP but the fd may still be present for UDP.  Later, when the TCP session should be created or set using an existing one, it isn't because the old file descriptor is still present.  Now every time transport is changed during a sip.conf reload, the file descriptor is set to -1, signifying it must be created or found.

(closes issue #14727)
Reported by: pj
Tested by: dvossel

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



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@189771 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-21 20:28:37 +00:00
Richard Mudgett 6bb2b6c096 Added CCBS/CCNR Party A support and enhanced COLP support.
This change adds the following features to chan_misdn:
* CCBS/CCNR Party A support for PTMP and PTP modes.
* Enhances COLP support for call diversion and explicit call transfer.

These enhanced features require a modified version of mISDN.

The latest modified mISDN v1.1.x based version is available at:
http://svn.digium.com/svn/thirdparty/mISDN/trunk
http://svn.digium.com/svn/thirdparty/mISDNuser/trunk

Taged versions of the modified mISDN code are available under:
http://svn.digium.com/svn/thirdparty/mISDN/tags
http://svn.digium.com/svn/thirdparty/mISDNuser/tags

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

Merged from team/rmudgett/misdn_facility branch.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@189735 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-21 17:44:01 +00:00
Doug Bailey 9c2ff7bb1e Merged revisions 189391 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r189391 | dbailey | 2009-04-20 14:10:56 -0500 (Mon, 20 Apr 2009) | 4 lines
  
  Clean up problem with manager implementation of mmap where it was not testing against MAP_FAILED response.
  Got rid of shadowed variable used in processign the mmap results. 
  Change test of mmap results to compare against MAP_FAILED
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@189419 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-20 19:28:16 +00:00
Joshua Colp b5b18b7810 Fix a bug with non-UDP connections that caused dialogs to not get freed.
This issue crept up because of a reference count issue on non-UDP based dialogs.
The dialog reference count was increased when transmitting a packet reliably but never
decreased. This caused the dialog structure to hang around despite being unlinked from
the dialogs container.

(closes issue #14919)
Reported by: vrban


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@189350 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-20 17:05:15 +00:00
David Vossel 437eec8423 Merged revisions 189203 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r189203 | dvossel | 2009-04-17 20:27:19 -0500 (Fri, 17 Apr 2009) | 12 lines
  
  Fixed autologoff in agents.conf not working when agent logs in via AgentLogin app
  
  An agent logs in by calling an extension that calls the AgentLogin app.  In agents.conf ackcall=always is set, so when they get a call they have the choice to either acknowledge it or ignore it.  autologoff=10 is set as well, so if the agent ignores the call over 10sec one may assume that the agent should be logged out (and in this case hungup on as well), but this was not happening.
  
  (closes issue #14091)
  Reported by: evandro
  Patches:
        autologoff.diff uploaded by dvossel (license 671)
  
  Review: http://reviewboard.digium.com/r/225/
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@189204 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-18 01:28:45 +00:00
Richard Mudgett 13af9ed74c Merged revisions 188833,189134 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r188833 | rmudgett | 2009-04-16 16:37:58 -0500 (Thu, 16 Apr 2009) | 4 lines
  
  Only disable mISDN DSP if Asterisk DSP is enabled. Leave jitter setting alone.
  
  JIRA ABE-1835
........
  r189134 | rmudgett | 2009-04-17 16:27:55 -0500 (Fri, 17 Apr 2009) | 4 lines
  
  Modifed/added some debug messages.
  
  JIRA ABE-1835
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@189137 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-17 21:48:10 +00:00
Mark Michelson 4bf5e1b805 Prevent a crash when SIP blonde transferring an unbridged call.
If one attempts to use the attended transfer button on a SIP phone
to transfer an unbridged call (such as a call to an IVR) but hangs
up while the target of the transfer is still ringing, we need to not
crash.

The problem was that ast_hangup was called from outside the channel
thread.

AST-211



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@189097 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-17 20:20:23 +00:00