Archived
14
0
Fork 0
Commit graph

933 commits

Author SHA1 Message Date
dvossel
5e031dc5f9 Merged revisions 181340 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r181340 | dvossel | 2009-03-11 12:25:31 -0500 (Wed, 11 Mar 2009) | 11 lines
  
  encrypted IAX2 during packet loss causes decryption to fail on retransmitted frames
  
  If an iax channel is encrypted, and a retransmit frame is sent, that packet's iseqno is updated while it is encrypted.  This causes the entire frame to be corrupted.  When the corrupted frame is sent, the other side decrypts it and sends a VNAK back because the decrypted frame doesn't make any sense.  When we get the VNAK, we look through the sent queue and send the same corrupted frame causing a loop.  To fix this, encrypted frames requiring retransmission are decrypted, updated, then re-encrypted.  Since key-rotation may change the key held by the pvt struct, the keys used for encryption/decryption are held within the iax_frame to guarantee they remain correct.
  
  (closes issue #14607)
  Reported by: stevenla
  Tested by: dvossel
  
  Review: http://reviewboard.digium.com/r/192/
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@181371 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-11 17:34:57 +00:00
file
2d95f1b342 Do not try to remove a registration scheduled item if the scheduler context has already been destroyed.
(closes issue #14580)
Reported by: alecdavis


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@179323 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-02 14:28:09 +00:00
dvossel
a7919bd735 IAX2 prune realtime, minor tweak to last fix
A return statement was missing which caused unexpected cli output.

issue #14479


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@178871 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-26 17:46:12 +00:00
dvossel
828dcfc193 IAX2 prune realtime fix
Iax2 prune realtime had issues.  If "iax2 prune realtime all" was called, it would appear like the command was successful, but in reality nothing happened.  This is because the reload that was supposed to take place checks the config files, sees no changes, and does nothing.  If there had been a change in the the config file, the realtime users would have been marked for deletion and everything would have been fine.  Now prune_users() and prune_peers() are called instead of reload_config() to prune all users/peers that are realtime.  These functions remove all users/peers with the rtfriend and delme flags set. iax2_prune_realtime() also lacked the code to properly delete a single friend.  For example. if iax2 prune realtime <friend> was called, only the peer instance would be removed. The user would still remain.  

(closes issue #14479)
Reported by: mousepad99
Review: http://reviewboard.digium.com/r/176/


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@178767 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-26 15:50:22 +00:00
dvossel
e6812047ba Allows manager command to see if IAX link is trunked and encrypted. Displays what kind of encryption is enabled as well.
Manager command "iaxpeers" now shows if a link is trunked and encrypted.  Instead of encryption saying simply "yes" or "no", it now displays what type of encryption is enabled and if keyrotation is on or not.  

(closes issue #14427)
Reported by: snuffy
Patches:
	iax_show_trunks.diff uploaded by snuffy (license 35)
	2009022200_iax2_show_trunkencryption.diff.txt uploaded by mvanbaak (license 7)
Tested by: mvanbaak, dvossel, snuffy
Review: http://reviewboard.digium.com/r/173/


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@178300 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-24 17:42:37 +00:00
dvossel
1743f9a2fc Changes the way keyrotation is enabled by default
Key rotation was enabled by default by setting the global encryption method to IAX_ENCRYPT_KEYROTATE.  the problem with this is that if encryption is not enabled, and the encryption method is set to anything except 0, the peer appears to have encryption enabled when issuing a "iax2 show peers".  Rather than have the key rotation bit always set by default, it is now only set when an encryption method is enabled. 

(closes issue #14523)
Reported by: mvanbaak


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@178030 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-23 17:59:55 +00:00
dvossel
c12f564893 Merged revisions 176354 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r176354 | dvossel | 2009-02-16 17:30:52 -0600 (Mon, 16 Feb 2009) | 8 lines
  
  Fixes issue with AST_CONTROL_SRCUPDATE not being relayed correctly during bridging
  
  This should have been committed with rev176247, but I missed it.  srcupdate frames no longer break out of the native bridge, but are not being sent to the other call leg either.  This fixs that.
  
  issue #13749
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@176355 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-16 23:33:55 +00:00
dvossel
2a601b14ad Merged revisions 175597 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
  r175597 | dvossel | 2009-02-13 14:11:55 -0600 (Fri, 13 Feb 2009) | 4 lines
  
  Fixed iax2 key rotation backwards compatibility
  
  Turns key rotation back on by default.  Added bit into encryption IE to indicate whether or not key rotation is supported or not. If it is not supported then it is not enabled, which insures backwards compatibility.  This eliminates the need for the keyrotate option in iax.conf, so it has been removed.  
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@176248 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-16 21:30:17 +00:00
dvossel
6ca5b4ac7d Fixed iax2 key rotation backwards compatibility
Turns key rotation back on by default.  Added bit into encryption IE to indicate whether or not key rotation is supported or not. If it is not supported then it is not enabled, which insures backwards compatibility.  This eliminates the need for the keyrotate option in iax.conf, so it has been removed. 

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


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@175597 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-13 20:11:55 +00:00
dvossel
e6fb59edca Adds force encryption option to iax.conf
This patch adds forceencryption=yes as an iax.conf option.  When force encryption is enabled, no unencrypted connections are allowed.  This insures all connections are encrypted.  This is a new feature, so CHANGES and iax.conf.sample are updated as well.   

(closes issue #13285)
Reported by: sgofferj
Tested by: russell
Review: http://reviewboard.digium.com/r/150/



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@175344 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-12 21:27:11 +00:00
kpfleming
0bc6288ce8 correct warning message to not refer specifically to DAHDI
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@175250 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-12 18:48:52 +00:00
dvossel
427e018228 Setting key rotation to be off by default
Key rotation breaks compatibility between (trunk/1.6.1) and (1.2/1.4/1.6.0).  As a follow up to this, I am investigating possible ways to allow key rotation to be on by default and not affect the other branches, but for now it must be turned off. 


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@175127 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-12 17:07:17 +00:00
dvossel
c0feb81ef3 Adds immediate yes/no option to iax.conf
This is very similar to the DAHDI immediate=yes option.  When the phone is picked up, instead of giving a dialtone it connects directly to the "s" extension.  Changes where implemented in chan_iax2.c to directly connect to the "s" extension in the appropriate context when this option is enabled.  Examples explaining its use are added to iax2.conf.sample.  CHANGES has been updated as well. 

(closes issue #14266)
Reported by: jcovert
Patches:
      chan_iax2.c.patch-trunk uploaded by jcovert (license 551)
      iax.conf.sample.patch uploaded by jcovert (license 551)
Tested by: jcovert, dvossel
Review: http://reviewboard.digium.com/r/143/


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@174046 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-06 20:12:33 +00:00
russell
65e7ac9ff3 Add a common implementation of a scheduler context with a dedicated thread.
This commit expands the Asterisk scheduler API to include a common implementation
of a scheduler context being processed by a dedicated thread.  chan_iax2 has been
updated to use this new code.  Also, as a result, this resolves some race
conditions related to the previous chan_iax2 scheduler handling.

Related to rev 171452 which resolved the same issues in 1.4.

Code from team/russell/sched_thread2

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


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@173858 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-06 10:55:35 +00:00
dvossel
6c67e59d30 Fixes issue with IAX2 transfer not handing off calls. Reverts changes in 116884
Fixes issue with IAX2 transfers not taking place. As it was, a call that was being transfered would never be handed off correctly to the call ends because of how call numbers were stored in a hash table. The hash table, "iax_peercallno_pvt", storing all the current call numbers did not take into account the complications associated with transferring a call, so a separate hash table was required. This second hash table "iax_transfercallno_pvt" handles calls being transfered, once the call transfer is complete the call is removed from the transfer hash table and added to the peer hash table resuming normal operations. Addition functions were created to handle storing, removing, and comparing items in the iax_transfercallno_pvt table. The changes reverted in 116884 caused backwards compatibility issues involving iax2 transfer with 1.6.0, 1.4, and 1.2. 
  
(closes issue #13468)
Reported by: nicox
Tested by: dvossel



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@173502 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-04 21:25:14 +00:00
tilghman
58bde8d2fc Merged revisions 170588 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r170588 | tilghman | 2009-01-23 13:20:44 -0600 (Fri, 23 Jan 2009) | 2 lines
  
  Additions to AST-2009-001
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@170608 f38db490-d61c-443f-a65b-d21fe96a405b
2009-01-23 19:25:10 +00:00
tilghman
61dce7a72a Merged revisions 167260 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
  r167260 | tilghman | 2009-01-06 14:48:05 -0600 (Tue, 06 Jan 2009) | 9 lines
  
  Merged revisions 167259 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.2
  
  ........
    r167259 | tilghman | 2009-01-06 14:44:03 -0600 (Tue, 06 Jan 2009) | 2 lines
    
    Security fix AST-2009-001.
  ........
................


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@167265 f38db490-d61c-443f-a65b-d21fe96a405b
2009-01-06 21:02:33 +00:00
russell
4e37275b2f Open a timer before loading configuration so that the trunking configuration option
will take effect.

(closes issue #14082)
Reported by: seandarcy


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@164525 f38db490-d61c-443f-a65b-d21fe96a405b
2008-12-15 22:25:46 +00:00
russell
c5bde913d7 Fix log message to refer to the generic timing interface, not DAHDI specifically
(inspired by issue #14082)


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@164522 f38db490-d61c-443f-a65b-d21fe96a405b
2008-12-15 22:22:43 +00:00
eliel
6e243a5434 Janitor, use ARRAY_LEN() when possible.
(closes issue #13990)
Reported by: eliel
Patches:
      array_len.diff uploaded by eliel (license 64)



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@161218 f38db490-d61c-443f-a65b-d21fe96a405b
2008-12-05 10:31:25 +00:00
russell
14324a5259 Merged revisions 160003 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r160003 | russell | 2008-12-01 11:27:30 -0600 (Mon, 01 Dec 2008) | 6 lines

Apply some logic used in iax2_indicate() to iax2_setoption(), as well, since they
both have the potential to send control frames in the middle of call setup.  We
have to wait until we have received a message back from the remote end before
we try to send any more frames.  Otherwise, the remote end will consider it
invalid, and we'll get stuck in an INVAL/VNAK storm.

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@160004 f38db490-d61c-443f-a65b-d21fe96a405b
2008-12-01 17:34:31 +00:00
kpfleming
246ce365ae incorporates r159808 from branches/1.4:
------------------------------------------------------------------------
r159808 | kpfleming | 2008-11-29 10:58:29 -0600 (Sat, 29 Nov 2008) | 7 lines

update dev-mode compiler flags to match the ones used by default on Ubuntu Intrepid, so all developers will see the same warnings and errors

since this branch already had some printf format attributes, enable checking for them and tag functions that didn't have them

format attributes in a consistent way


------------------------------------------------------------------------

in addition:

move some format attributes from main/utils.c to the header files they belong in, and fix up references to the relevant functions based on new compiler warnings



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@159818 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-29 17:57:39 +00:00
murf
25c015126d Merged revisions 159316 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r159316 | murf | 2008-11-25 15:41:10 -0700 (Tue, 25 Nov 2008) | 15 lines

(closes issue #12694)
Reported by: yraber
Patches:
      12694.2nd.diff uploaded by murf (license 17)
Tested by: murf, laurav

Thanks to file (Joshua Colp) for his IAX fix.

the change to cdr.c allows no-answer to percolate
up into CDR's, and feels like the right place to
locate this fix; if BUSY is done here, no-answer
should be, too.



........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@159360 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-25 23:03:01 +00:00
tilghman
41e940096a Merged revisions 159269 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r159269 | tilghman | 2008-11-25 15:56:48 -0600 (Tue, 25 Nov 2008) | 7 lines
  
  Don't try to send a response on a NULL pvt.
  (closes issue #13919)
   Reported by: barthpbx
   Patches: 
         chan_iax2.c.patch uploaded by eliel (license 64)
   Tested by: barthpbx
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@159276 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-25 21:57:59 +00:00
tilghman
3a6ac00947 Merged revisions 159246 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
  r159246 | tilghman | 2008-11-25 15:40:28 -0600 (Tue, 25 Nov 2008) | 14 lines
  
  Merged revisions 159245 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.2
  
  ........
    r159245 | tilghman | 2008-11-25 15:37:06 -0600 (Tue, 25 Nov 2008) | 7 lines
    
    Regression fix for last security fix.  Set the iseqno correctly.
    (closes issue #13918)
     Reported by: ffloimair
     Patches: 
           20081119__bug13918.diff.txt uploaded by Corydon76 (license 14)
     Tested by: ffloimair
  ........
................


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@159247 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-25 21:42:42 +00:00
seanbright
3ce5f8f4ee This is basically a complete rollback of r155401, as it was determined that
it would be best to maintain API compatibility.  Instead, this commit introduces
ao2_callback_data() which is functionally identical to ao2_callback() except
that it allows you to pass arbitrary data to the callback.

Reviewed by Mark Michelson via ReviewBoard:
	http://reviewboard.digium.com/r/64


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@158959 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-25 01:01:49 +00:00
tilghman
79a53174fa Merged revisions 156229 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r156229 | tilghman | 2008-11-12 12:39:21 -0600 (Wed, 12 Nov 2008) | 11 lines
  
  Revert revision 132506, since it occasionally caused IAX2 HANGUP packets not
  to be sent, and instead, schedule a task to destroy the iax2 pvt structure
  10 seconds later.  This allows the IAX2 HANGUP packet to be queued,
  transmitted, and ACKed before the pvt is destroyed.
  (closes issue #13645)
   Reported by: dzajro
   Patches: 
         20081111__bug13645__3.diff.txt uploaded by Corydon76 (license 14)
   Tested by: vazir
   Reviewed: http://reviewboard.digium.com/r/51/
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@156243 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-12 18:55:18 +00:00
seanbright
a7a95954c8 Add ability to pass arbitrary data to the ao2_callback_fn (called from
ao2_callback and ao2_find).  Currently, passing OBJ_POINTER to either
of these mandates that the passed 'arg' is a hashable object, making
searching for an ao2 object based on outside criteria difficult.

Reviewed by Russell and Mark M. via ReviewBoard:
    http://reviewboard.digium.com/r/36/


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@155401 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-07 22:39:30 +00:00
tilghman
d6530734b8 Switch to using a thread condition to signal that a child thread is ready for
work, rather than a busy wait.
(closes issue #13011)
 Reported by: jpgrayson
 Patches: 
       chan_iax2_find_idle.patch uploaded by jpgrayson (license 492)


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@154428 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-04 23:03:00 +00:00
tilghman
f4647bcf73 Merged revisions 154365 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r154365 | tilghman | 2008-11-04 14:49:33 -0600 (Tue, 04 Nov 2008) | 9 lines
  
  On busy systems, it's possible for the values checked within a single line
  of code to change, unless the structure is locked to ensure a consistent
  state.
  (closes issue #13717)
   Reported by: kowalma
   Patches: 
         20081102__bug13717.diff.txt uploaded by Corydon76 (license 14)
   Tested by: kowalma
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@154366 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-04 20:51:18 +00:00
eliel
2baff26171 Add XML documentation for:
Functions
        - IAXPEER()
        - IAXVAR()



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@153852 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-03 13:33:58 +00:00
kpfleming
cc1b2c100f bring over all the fixes for the warnings found by gcc 4.3.x from the 1.4 branch, and add the ones needed for all the new code here too
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@153616 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-02 18:52:13 +00:00
eliel
2d6e969e7c Add IAX2Provision() application XML documentation.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@153582 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-02 06:24:53 +00:00
tilghman
c172237190 Make helper call a little safer (suggested by Russell on IRC)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@150635 f38db490-d61c-443f-a65b-d21fe96a405b
2008-10-17 17:09:03 +00:00
tilghman
fac48f7769 Fix the FRACK! warnings in chan_iax2 when POKE/LAGRQ packets are not answered.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@150580 f38db490-d61c-443f-a65b-d21fe96a405b
2008-10-17 16:34:29 +00:00
mmichelson
469fc0630b Add an IAXregistry manager command. See doc/manager_1_1.txt
for more details of this command.

(closes issue #13326)
Reported by: ib2
Patches:
      bug13326_trunk_20080822.diff uploaded by snuffy (license 35)



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@150311 f38db490-d61c-443f-a65b-d21fe96a405b
2008-10-17 00:18:01 +00:00
mmichelson
1db365288b Remove an odd redundant comparison
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@150253 f38db490-d61c-443f-a65b-d21fe96a405b
2008-10-16 22:30:23 +00:00
murf
6499c3c6d4 (closes issue #13557)
Reported by: nickpeirson
Patches:
      pbx.c.patch uploaded by nickpeirson (license 579)
      replace_bzero+bcopy.patch uploaded by nickpeirson (license 579)
Tested by: nickpeirson, murf

1. replaced all refs to bzero and bcopy to memset and memmove instead.
2. added a note to the CODING-GUIDELINES
3. add two macros to asterisk.h to prevent bzero, bcopy from creeping
   back into the source
4. removed bzero from configure, configure.ac, autoconfig.h.in




git-svn-id: http://svn.digium.com/svn/asterisk/trunk@147807 f38db490-d61c-443f-a65b-d21fe96a405b
2008-10-09 14:17:33 +00:00
seanbright
146f94185f Move the DAHDI-to-DAHDI operator mode check from app_dial into chan_dahdi
so we don't have to hardcode anything.

(closes issue #13636)
Reported by: seanbright
Patches:
      13636.diff uploaded by seanbright (license 71)
Reviewed by: russellb, putnopvut


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@147388 f38db490-d61c-443f-a65b-d21fe96a405b
2008-10-07 21:34:44 +00:00
tilghman
74ecba3091 Merged revisions 146799 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r146799 | tilghman | 2008-10-06 15:52:04 -0500 (Mon, 06 Oct 2008) | 8 lines
  
  Dialplan functions should not actually return 0, unless they have modified the
  workspace.  To signal an error (and no change to the workspace), -1 should be
  returned instead.
  (closes issue #13340)
   Reported by: kryptolus
   Patches: 
         20080827__bug13340__2.diff.txt uploaded by Corydon76 (license 14)
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@146802 f38db490-d61c-443f-a65b-d21fe96a405b
2008-10-06 21:09:05 +00:00
tilghman
a4697b9f56 Merged revisions 143140 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r143140 | tilghman | 2008-09-15 16:29:32 -0500 (Mon, 15 Sep 2008) | 6 lines
  
  Set the raw formats at the same time as the other formats.
  (closes issue #13240)
   Reported by: jvandal
   Patches: 
         20080813__bug13240.diff.txt uploaded by Corydon76 (license 14)
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@143141 f38db490-d61c-443f-a65b-d21fe96a405b
2008-09-15 21:31:36 +00:00
tilghman
5d19839a33 Repair IAXVAR implementation so that it works again (regression?)
(closes issue #13354)
 Reported by: adomjan
 Patches: 
       20080828__bug13354.diff.txt uploaded by Corydon76 (license 14)
       20080829__bug13354__1.6.0.diff.txt uploaded by Corydon76 (license 14)
 Tested by: Corydon76, adomjan


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@143031 f38db490-d61c-443f-a65b-d21fe96a405b
2008-09-13 13:54:15 +00:00
tilghman
95bae85759 Create a new config file status, CONFIG_STATUS_FILEINVALID for differentiating
when a file is invalid from when a file is missing.  This is most important when
we have two configuration files.  Consider the following example:

Old system:
sip.conf     users.conf     Old result               New result
========     ==========     ==========               ==========
Missing      Missing        SIP doesn't load         SIP doesn't load
Missing      OK             SIP doesn't load         SIP doesn't load
Missing      Invalid        SIP doesn't load         SIP doesn't load
OK           Missing        SIP loads                SIP loads
OK           OK             SIP loads                SIP loads
OK           Invalid        SIP loads incompletely   SIP doesn't load
Invalid      Missing        SIP doesn't load         SIP doesn't load
Invalid      OK             SIP doesn't load         SIP doesn't load
Invalid      Invalid        SIP doesn't load         SIP doesn't load

So in the case when users.conf doesn't load because there's a typo that
disrupts the syntax, we may only partially load users, instead of failing with
an error, which may cause some calls not to get processed.  Worse yet, the old
system would do this with no indication that anything was even wrong.

(closes issue #10690)
 Reported by: dtyoo
 Patches: 
       20080716__bug10690.diff.txt uploaded by Corydon76 (license 14)


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@142992 f38db490-d61c-443f-a65b-d21fe96a405b
2008-09-12 23:30:03 +00:00
mvanbaak
02e84822e5 Some fixes to autocompletion in some commands.
Changes applied by this patch:

- Fix autocompletion in 'sip prune realtime', sip peers where never auto completed. Now we complete this command with:
  'sip prune realtime peer' -> all | like | sip peers
  Also I have modified the syntax in the usage, was wrong...
- Pass ast_cli_args->argv and ast_cli_args->argc while running autocompletion on CLI commands (CLI_GENERATE).
  With this we avoid comparisons on ast_cli_args->line like this:
  strcasestr(a->line, " description")
  strcasestr(a->line, "descriptions ")
  strcasestr(a->line, "realtime peer"), and so on..

  Making the code more confusing (check the spaces in description!).
  The only thing we must be sure is to first check a->pos or a->argc.
														      
- Fix 'iax2 prune realtime' autocompletion, now we autocomplete this command with 'all' & 'iax2 peers', check a look that iax2 peers where all the peers, now only the ones in the cache..

(closes issue #13133)
Reported by: eliel
Patches:
      clichanges.patch uploaded by eliel (license 64)


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@141464 f38db490-d61c-443f-a65b-d21fe96a405b
2008-09-06 12:03:11 +00:00
seanbright
1a4691bd39 Merged revisions 140605 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r140605 | seanbright | 2008-09-02 14:14:57 -0400 (Tue, 02 Sep 2008) | 8 lines

Make sure to use the correct length of the mohinterpret and mohsuggest
buffers when copying configuration values.

(closes issue #13336)
Reported by: decryptus_proformatique
Patches:
      chan_iax2_mohinterpret_mohsuggest_general_settings.patch uploaded by decryptus (license 555)

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@140606 f38db490-d61c-443f-a65b-d21fe96a405b
2008-09-02 18:15:54 +00:00
mmichelson
91df49dd46 Merged revisions 140488 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r140488 | mmichelson | 2008-08-29 12:34:17 -0500 (Fri, 29 Aug 2008) | 22 lines

After working on the ao2_containers branch, I noticed
something a bit strange. In all cases where we provide
a callback function to ao2_container_alloc, the callback
function would only return 0 or CMP_MATCH. After inspecting
the ao2_callback() code carefully, I found that if you're
only looking for one specific item, then you should return
CMP_MATCH | CMP_STOP. Otherwise, astobj2 will continue
traversing the current bucket until the end searching for
more matches.

In cases like chan_iax2 where in 1.4, all the peers are
shoved into a single bucket, this makes for potentially
terrible performance since the entire bucket will be
traversed even if the peer is one of the first ones come
across in the bucket.

All the changes I have made were for cases where the 
callback function defined was passed to ao2_container_alloc
so that calls to ao2_find could find a unique instance
of whatever object was being stored in the container.


........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@140489 f38db490-d61c-443f-a65b-d21fe96a405b
2008-08-29 17:47:17 +00:00
russell
009b7b31cb Merged revisions 140051 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r140051 | russell | 2008-08-26 10:27:23 -0500 (Tue, 26 Aug 2008) | 15 lines

Fix a race condition with the IAX scheduler thread.  A lock and condition are
used here to allow newly scheduled tasks to wake up the scheduler just in case
the new task needs to run sooner than the current wakeup time when the thread
is sleeping.  However, there was a race condition such that a newly scheduled
task would not properly wake up the scheduler or affect the wake up period.
The order of execution would have been:

  1) Scheduler thread determines wake up time of N ms.
  2) Another thread schedules a task and signals the condition, with an
     execution time of < N ms.
  3) Scheduler thread locks and goes to sleep for N ms.

By moving the sleep time determination to inside the critical section, this
possibility is avoided.

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@140053 f38db490-d61c-443f-a65b-d21fe96a405b
2008-08-26 15:29:25 +00:00
mmichelson
6ebfa613da Merged revisions 139466 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r139466 | mmichelson | 2008-08-22 12:24:47 -0500 (Fri, 22 Aug 2008) | 3 lines

Fix the build. Thanks, mvanbaak!


........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@139469 f38db490-d61c-443f-a65b-d21fe96a405b
2008-08-22 17:25:12 +00:00
mmichelson
90485f52ec Merged revisions 139456 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r139456 | mmichelson | 2008-08-22 11:57:38 -0500 (Fri, 22 Aug 2008) | 7 lines

Prevent a deadlock in chan_iax2 resulting from
incorrect locking order between iax2_pvt and
ast_channel structures.

AST-13


........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@139457 f38db490-d61c-443f-a65b-d21fe96a405b
2008-08-22 16:58:21 +00:00
seanbright
fb6d7e2731 Fix the output of the JitterBufStats manager event.
(closes issue #13324)
Reported by: srt
Patches:
      13324_missing_nl_in_jitterbufstats_event_2.diff uploaded by srt (license 378)


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@138473 f38db490-d61c-443f-a65b-d21fe96a405b
2008-08-17 13:31:54 +00:00
seanbright
3d55cb9df3 More RSW merges. This should do it for the channels/ dir.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@136917 f38db490-d61c-443f-a65b-d21fe96a405b
2008-08-09 14:12:34 +00:00
tilghman
008db88c65 Merged revisions 135747 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r135747 | tilghman | 2008-08-05 16:34:46 -0500 (Tue, 05 Aug 2008) | 9 lines

In a conversion to use ast_strlen_zero, the meaning of the flag IAX_HASCALLERID
was perverted.  This change reverts IAX2 to the original meaning, which was,
that the callerid set on the client should be overridden on the server, even if
that means the resulting callerid is blank.  In other words, if you set
"callerid=" in the IAX config, then the callerid should be overridden to blank,
even if set on the client.  Note that there's a distinction, even on realtime,
between the field not existing (NULL in databases) and the field existing, but
set to blank (override callerid to blank).

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@135748 f38db490-d61c-443f-a65b-d21fe96a405b
2008-08-05 21:37:35 +00:00
kpfleming
0891b8a53c make datastore creation and destruction a generic API since it is not really channel related, and add the ability to add/find/remove datastores to manager sessions
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@135680 f38db490-d61c-443f-a65b-d21fe96a405b
2008-08-05 16:56:11 +00:00
russell
6c97118405 Merge changes from team/bbryant/keyrotation
This set of changes enhances IAX2 encryption support by adding key rotation
to provide enhanced security.  The key used for encryption is rotated right 
after the call gets set up, and then again every few minutes.  This was
discussed at the last AstriDevCon.  For interoperability with older versions
of Asterisk, there is an option that disables key rotation.

(closes issue #13018)
Reported by: bbryant
Patches:
      07072008__iax2_key_rotation.diff uploaded by bbryant (license 36)
Tested by: russell, bbryant


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@135158 f38db490-d61c-443f-a65b-d21fe96a405b
2008-08-01 18:16:24 +00:00
tilghman
1b294dd713 Deprecate *_device_state_* APIs in favor of *_devstate_* APIs
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@133860 f38db490-d61c-443f-a65b-d21fe96a405b
2008-07-25 21:20:03 +00:00
tilghman
28947c57f5 Yet another conversion of '|' to ','
(closes issue #13137)
 Reported by: eliel
 Patches: 
       chan_iax2trunk-IAXPEER.patch uploaded by eliel (license 64)


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@132981 f38db490-d61c-443f-a65b-d21fe96a405b
2008-07-23 17:20:43 +00:00
tilghman
47584f4101 Merged revisions 132713 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r132713 | tilghman | 2008-07-22 16:19:39 -0500 (Tue, 22 Jul 2008) | 10 lines

Merged revisions 132711 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r132711 | tilghman | 2008-07-22 16:14:10 -0500 (Tue, 22 Jul 2008) | 2 lines

Fixes for AST-2008-010 and AST-2008-011

........

................


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@132778 f38db490-d61c-443f-a65b-d21fe96a405b
2008-07-22 21:53:40 +00:00
bbryant
a6eddfe299 Add autocompletion to "iax2 set debug peer".
(closes issue #13129)
Reported by: eliel
Patches:
      chan_iax2.c.patch uploaded by eliel (license 64)


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@132572 f38db490-d61c-443f-a65b-d21fe96a405b
2008-07-21 22:49:08 +00:00
bbryant
33d7c67255 Add "iax2 set debug peer" command and remove deprecated iax2 debug
commands that conflicted with adding new features to the newer debug 
commaands.

(closes issue #13103)
Reported by: mvanbaak
Patches:
      2008071901__issue13103_iax2_set_debug_peer.diff uploaded by 
mvanbaak (license 7)
Tested by: bbryant, mvanbaak


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@132470 f38db490-d61c-443f-a65b-d21fe96a405b
2008-07-21 17:55:04 +00:00
bbryant
a8b4985aff Fix an issue in iax2 where a call that's been rejected still kept an open channel on the side that attempted to make the call (not the side of the
call that rejected the call). Changes were load tested and also approved by Russell.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@132466 f38db490-d61c-443f-a65b-d21fe96a405b
2008-07-21 17:22:02 +00:00
tilghman
da51d253b4 Merged revisions 131970 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r131970 | tilghman | 2008-07-18 11:30:31 -0500 (Fri, 18 Jul 2008) | 2 lines

Make the ast_assert call within ast_sched_del report something useful.

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@131982 f38db490-d61c-443f-a65b-d21fe96a405b
2008-07-18 16:33:56 +00:00
bbryant
bb5c7f3343 Merged revisions 131491 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r131491 | bbryant | 2008-07-16 17:17:07 -0500 (Wed, 16 Jul 2008) | 6 lines

Fix a bug in iax2 registration that allowed peers to register with 
case-insensitive names (user_cmp_cb and peer_cmp_cb are now both 
case-sensitive).

(closes issue #13091)

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@131492 f38db490-d61c-443f-a65b-d21fe96a405b
2008-07-16 22:17:36 +00:00
russell
acac321512 Merged revisions 131421 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r131421 | russell | 2008-07-16 15:47:53 -0500 (Wed, 16 Jul 2008) | 7 lines

Always ensure that the channel's tech_pvt reference is NULL after calling the
destroy callback.
(closes issue #13060)
Reported by: jpgrayson
Patches:
      chan_iax2_tech_pvt_crash.patch uploaded by jpgrayson (license 492)

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@131422 f38db490-d61c-443f-a65b-d21fe96a405b
2008-07-16 20:48:27 +00:00
tilghman
c0b9403374 Merged revisions 130889 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r130889 | tilghman | 2008-07-14 18:59:13 -0500 (Mon, 14 Jul 2008) | 8 lines

Override the callerid in all cases when the callerid is set in the user, not
just when a remote callerid is set.  Also, if not set in the user, allow the
remote CallerID to pass through.
(closes issue #12875)
 Reported by: dimas
 Patches: 
       20080714__bug12875.diff.txt uploaded by Corydon76 (license 14)

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@130890 f38db490-d61c-443f-a65b-d21fe96a405b
2008-07-14 23:59:54 +00:00
tilghman
4e5ccba876 Merged revisions 130514 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r130514 | tilghman | 2008-07-13 12:56:10 -0500 (Sun, 13 Jul 2008) | 4 lines

Reverting 2 changesets, as it breaks incoming IAX2 calls
(Related to issue #12963)
Reported by: mvanbaak

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@130515 f38db490-d61c-443f-a65b-d21fe96a405b
2008-07-13 17:58:47 +00:00
tilghman
d1792e982d Merged revisions 130169 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r130169 | tilghman | 2008-07-11 13:51:56 -0500 (Fri, 11 Jul 2008) | 7 lines

Ensure that a destination callno of 0 will not match for frames that do not
start a dialog (new, lagrq, and ping).
(closes issue #12963)
 Reported by: russellb
 Patches: 
       chan_iax2_dup_new_fix4.patch uploaded by jpgrayson (license 492)

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@130170 f38db490-d61c-443f-a65b-d21fe96a405b
2008-07-11 18:52:42 +00:00
tilghman
e9fe1993bd Merged revisions 129803 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r129803 | tilghman | 2008-07-10 16:57:05 -0500 (Thu, 10 Jul 2008) | 8 lines

Correctly deal with duplicate NEW frames (due to retransmission).  Also, fixup
the destination call number matching to be more strict and reliable.
(closes issue #12963)
 Reported by: jpgrayson
 Patches: 
       chan_iax2_dup_new_fix3.patch uploaded by jpgrayson (license 492)
 Tested by: jpgrayson, Corydon76

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@129804 f38db490-d61c-443f-a65b-d21fe96a405b
2008-07-10 22:06:07 +00:00
tilghman
697a11d439 Merged revisions 129047 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r129047 | tilghman | 2008-07-08 11:45:23 -0500 (Tue, 08 Jul 2008) | 7 lines

Timestamp decoding for video mini-frames is bogus, because the timestamp only
includes 15 bits, unlike voice frames, which contain a 16-bit timestamp.
(closes issue #13013)
 Reported by: jpgrayson
 Patches: 
       chan_iax2_unwrap_ts.patch uploaded by jpgrayson (license 492)

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@129048 f38db490-d61c-443f-a65b-d21fe96a405b
2008-07-08 16:49:01 +00:00
bbryant
0110f8c87a Janitor project to convert sizeof to ARRAY_LEN macro.
(closes issue #13002)
Reported by: caio1982
Patches:
      janitor_arraylen5.diff uploaded by caio1982 (license 22)


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@129045 f38db490-d61c-443f-a65b-d21fe96a405b
2008-07-08 16:40:28 +00:00
russell
715a24e685 Merged revisions 128795 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r128795 | russell | 2008-07-07 17:41:48 -0500 (Mon, 07 Jul 2008) | 8 lines

Fix handling of when a pvt disappears.  Properly return the pvt locked
and don't hold the pvt lock while destroying the ast_channel.

(closes issue #13014)
Reported by: jpgrayson
Patches:
      chan_iax2_ast_iax2_new2.patch uploaded by jpgrayson (license 492)

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@128796 f38db490-d61c-443f-a65b-d21fe96a405b
2008-07-07 22:42:30 +00:00
seanbright
539f7a260e Merged revisions 128737 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r128737 | seanbright | 2008-07-07 16:47:56 -0400 (Mon, 07 Jul 2008) | 9 lines

Remove spurious trailing whitespace from log messages and fix a spelling error
in a log message.

(closes issue #13017)
Reported by: jpgrayson
Patches:
      chan_iax2_space_after_newline.patch uploaded by jpgrayson (license 492)
      chan_iax2_spelling.patch uploaded by jpgrayson (license 492)

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@128738 f38db490-d61c-443f-a65b-d21fe96a405b
2008-07-07 20:50:29 +00:00
mmichelson
86dd1db1e3 Merged revisions 128639 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r128639 | mmichelson | 2008-07-07 12:02:28 -0500 (Mon, 07 Jul 2008) | 10 lines

By using the iaxdynamicthreadcount to identify a thread, it was possible
for thread identifiers to be duplicated. By using a globally-unique monotonically-
increasing integer, this is now avoided.

(closes issue #13009)
Reported by: jpgrayson
Patches:
      chan_iax2_dyn_threadnum.patch uploaded by jpgrayson (license 492)


........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@128640 f38db490-d61c-443f-a65b-d21fe96a405b
2008-07-07 17:09:11 +00:00
bbryant
d3a5ecf1ad Remove commit that somehow got mergeed into trunk.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@127933 f38db490-d61c-443f-a65b-d21fe96a405b
2008-07-03 22:44:39 +00:00
bbryant
5ca399c2cd Update these files with transfer code.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@127931 f38db490-d61c-443f-a65b-d21fe96a405b
2008-07-03 22:36:02 +00:00
tilghman
2da25c2375 Keep ast_app_inboxcount API compatible with 1.6.0.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@127609 f38db490-d61c-443f-a65b-d21fe96a405b
2008-07-02 21:27:53 +00:00
tilghman
a86ce0b9a8 Merged revisions 127133 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r127133 | tilghman | 2008-07-01 15:25:37 -0500 (Tue, 01 Jul 2008) | 2 lines

Disable the old, slow search for matching callno in chan_iax2 (but allow it to be reenabled for debugging)

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@127143 f38db490-d61c-443f-a65b-d21fe96a405b
2008-07-01 20:28:54 +00:00
tilghman
be73effbcc Merged revisions 127068 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r127068 | tilghman | 2008-07-01 13:52:53 -0500 (Tue, 01 Jul 2008) | 8 lines

Change around how we schedule pings and lagrqs, and fix a reason why the
jobs were not getting properly cancelled.
(closes issue #12903)
 Reported by: stevedavies
 Patches: 
       20080620__bug12903__2.diff.txt uploaded by Corydon76 (license 14)
 Tested by: stevedavies

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@127074 f38db490-d61c-443f-a65b-d21fe96a405b
2008-07-01 19:20:25 +00:00
tilghman
2198289d03 Merged revisions 126999 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r126999 | tilghman | 2008-07-01 11:50:46 -0500 (Tue, 01 Jul 2008) | 2 lines

Suppress annoying warning by finding the remaining cases where the callno is not in the hash.

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@127000 f38db490-d61c-443f-a65b-d21fe96a405b
2008-07-01 16:52:29 +00:00
tilghman
6d937eee36 More expansion of the deadlock avoidance macro, including a macro to do locking
of the channel lock


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@125020 f38db490-d61c-443f-a65b-d21fe96a405b
2008-06-25 02:34:11 +00:00
mvanbaak
c342cdeaf3 Older versions of GNU gcc do not allow 'NULL' as sentinel.
They want (char *)NULL as sentinel.
An example is OpenBSD (confirmed on 4.3) that ships with gcc 3.3.4

This commit introduces a contstant SENTINEL which is declared as:
#define SENTINEL ((char *)NULL)

All places I could test compile on my openbsd system are converted.
Update CODING-GUIDELINES to tell about this constant.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@124127 f38db490-d61c-443f-a65b-d21fe96a405b
2008-06-19 20:48:33 +00:00
tilghman
7ca66b4821 Merged revisions 123391 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r123391 | tilghman | 2008-06-17 13:56:53 -0500 (Tue, 17 Jun 2008) | 3 lines

Fix 3 more places where failure to lock the structure could cause the wrong lock to be
unlocked.  (Closes issue #12795)

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@123392 f38db490-d61c-443f-a65b-d21fe96a405b
2008-06-17 18:57:45 +00:00
tilghman
8f14f6c4b2 Merged revisions 123113 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r123113 | tilghman | 2008-06-16 14:50:12 -0500 (Mon, 16 Jun 2008) | 2 lines

Port "hasvoicemail" change from SIP to other channel drivers

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@123114 f38db490-d61c-443f-a65b-d21fe96a405b
2008-06-16 19:57:05 +00:00
tilghman
86f9034a9f Add some more IAX2-specific information about the channel to the CHANNEL()
function and begin the transition from SIPCHANINFO() to just using CHANNEL().
(closes issue #12856)
 Reported by: mostyn
 Patches: 
       iax_and_sip_channel_info.patch uploaded by mostyn (license 398)
       (with some additional cleanup by me)


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@122802 f38db490-d61c-443f-a65b-d21fe96a405b
2008-06-15 15:21:16 +00:00
russell
a720d9e5c8 Merge changes from timing branch
- Convert chan_iax2 to use the timing API
 - Convert usage of timing in the core to use the timing API instead of
   using DAHDI directly
 - Make a change to the timing API to add the set_rate() function
 - change the timing core to use a rwlock
 - merge a timing implementation, res_timing_dahdi

Basic testing was successful using res_timing_dahdi


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@122523 f38db490-d61c-443f-a65b-d21fe96a405b
2008-06-13 12:45:50 +00:00
russell
a7ac808e45 Merged revisions 122259 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r122259 | russell | 2008-06-12 13:22:44 -0500 (Thu, 12 Jun 2008) | 3 lines

Fix some race conditions that cause ast_assert() to report that chan_iax2 tried
to remove an entry that wasn't in the scheduler

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@122262 f38db490-d61c-443f-a65b-d21fe96a405b
2008-06-12 18:23:54 +00:00
jpeeler
490730a6b3 Goodbye Zaptel, hello DAHDI. Removes Zaptel driver support with DAHDI. Configuration file and dialplan backwards compatability has been put in place where appropiate. Release announcement to follow.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@122234 f38db490-d61c-443f-a65b-d21fe96a405b
2008-06-12 17:27:55 +00:00
russell
497b8c298c Bump up the debug level of a couple of messages
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@121407 f38db490-d61c-443f-a65b-d21fe96a405b
2008-06-10 00:52:46 +00:00
tilghman
e8556a10e2 Expand RQ_INTEGER type out to multiple types, one for each precision
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@121367 f38db490-d61c-443f-a65b-d21fe96a405b
2008-06-09 22:51:59 +00:00
tilghman
13366a3a41 Merge the adaptive realtime branch, which will make adding new required fields
to realtime less painful in the future.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@120789 f38db490-d61c-443f-a65b-d21fe96a405b
2008-06-05 19:07:27 +00:00
russell
ae5d47ddbd Merged revisions 120168 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r120168 | russell | 2008-06-03 16:34:55 -0500 (Tue, 03 Jun 2008) | 4 lines

Fix another place where peer->callno could change at a very bad time, and also
fix a place where a peer was used after the reference was released.
(inspired by rev 120001)

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@120169 f38db490-d61c-443f-a65b-d21fe96a405b
2008-06-03 21:35:11 +00:00
tilghman
c446a0a7f6 Merged revisions 120001 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r120001 | tilghman | 2008-06-03 11:10:53 -0500 (Tue, 03 Jun 2008) | 9 lines

Save the callno when we're poking, because our peer structure could change
during destruction (and thus we unlock the wrong callno, causing a
cascade failure).
(closes issue #12717)
 Reported by: gewfie
 Patches: 
       20080525__bug12717.diff.txt uploaded by Corydon76 (license 14)
 Tested by: gewfie

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@120012 f38db490-d61c-443f-a65b-d21fe96a405b
2008-06-03 16:19:35 +00:00
russell
82465b45c8 Merged revisions 119838 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r119838 | russell | 2008-06-02 15:08:04 -0500 (Mon, 02 Jun 2008) | 7 lines

Revert a change made for issue #12479.  This change caused a regression such that
a dial string such as (IAX2/foo) did not automatically fall back to dialing the 's'
extension anymore.

(closes issue #12770)
Reported by: dagmoller

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@119839 f38db490-d61c-443f-a65b-d21fe96a405b
2008-06-02 20:08:24 +00:00
russell
f1fa3634f8 Merged revisions 119687 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r119687 | russell | 2008-06-02 07:30:17 -0500 (Mon, 02 Jun 2008) | 3 lines

Even of the first PING or LAGRQ doesn't get sent because it comes up too soon,
make sure to reschedule so it gets sent later.

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@119688 f38db490-d61c-443f-a65b-d21fe96a405b
2008-06-02 12:30:42 +00:00
russell
880538ba7b Merged revisions 119533 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r119533 | russell | 2008-06-01 20:06:09 -0500 (Sun, 01 Jun 2008) | 2 lines

Change a debug message to an actual debug message

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@119534 f38db490-d61c-443f-a65b-d21fe96a405b
2008-06-02 01:08:16 +00:00
russell
83db58ff7b Merged revisions 119238 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r119238 | russell | 2008-05-30 07:55:36 -0500 (Fri, 30 May 2008) | 15 lines

Merged revisions 119237 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r119237 | russell | 2008-05-30 07:49:39 -0500 (Fri, 30 May 2008) | 7 lines

- Instead of only enforcing destination call number checking on an ACK, check
  all full frames except for PING and LAGRQ, which may be sent by older versions
  too quickly to contain the destination call number.
  (As suggested by Tim Panton on the asterisk-dev list)
- Merge changes from team/russell/iax2-frame-race, which prevents PING and LAGRQ
  from being sent before the destination call number is known.

........

................


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@119239 f38db490-d61c-443f-a65b-d21fe96a405b
2008-05-30 12:59:11 +00:00
russell
ccee03dccb Merged revisions 119009 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r119009 | russell | 2008-05-29 13:49:12 -0500 (Thu, 29 May 2008) | 16 lines

Merged revisions 119008 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r119008 | russell | 2008-05-29 13:45:21 -0500 (Thu, 29 May 2008) | 7 lines

Merge changes from team/russell/iax2-another-fix-to-the-fix

As described in the following post to the asterisk-dev mailing list, only
enforce destination call numbers when processing an ACK.

http://lists.digium.com/pipermail/asterisk-dev/2008-May/033217.html

(closes issue #12631)
........

................


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@119010 f38db490-d61c-443f-a65b-d21fe96a405b
2008-05-29 18:54:11 +00:00
tilghman
3db76e85a4 Merged revisions 118953 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r118953 | tilghman | 2008-05-29 12:20:16 -0500 (Thu, 29 May 2008) | 3 lines

Add some debugging code that ensures that when we do deadlock avoidance, we
don't lose the information about how a lock was originally acquired.

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@118955 f38db490-d61c-443f-a65b-d21fe96a405b
2008-05-29 17:35:19 +00:00
bbryant
1f0e544155 Fixes a bug in chan_iax that uses send_command to poke a peer while a channel is unlocked in some cases, and because it can cause seemingly
random failures could be related to some bugs in the tracker...


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@118702 f38db490-d61c-443f-a65b-d21fe96a405b
2008-05-28 16:01:05 +00:00
bbryant
b9489f3898 Remove loop from the detection of a sequence number that acknowledges
the receiving of a packet that we've kept in memory just incase the 
packet needs to be retransmitted.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@118562 f38db490-d61c-443f-a65b-d21fe96a405b
2008-05-27 19:45:41 +00:00
mvanbaak
c1210321e7 - revert change to ast_queue_hangup and create ast_queue_hangup_with_cause
- make data member of the ast_frame struct a named union instead of a void

Recently the ast_queue_hangup function got a new parameter, the hangupcause
Feedback came in that this is no good and that instead a new function should be created.
This I did.

The hangupcause was stored in the seqno member of the ast_frame struct. This is not very
elegant, and since there's already a data member that one should be used.
Problem is, this member was a void *.
Now it's a named union so it can hold a pointer, an uint32 and there's a padding in case someone
wants to store another type in there in the future.

This commit is so massive, because all ast_frame.data uses have to be
altered to ast_frame.data.data

Thanks russellb and kpfleming for the feedback.

(closes issue #12674)
Reported by: mvanbaak


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@117802 f38db490-d61c-443f-a65b-d21fe96a405b
2008-05-22 16:29:54 +00:00