path: root/channels/iax2-parser.c
AgeCommit message (Collapse)AuthorFilesLines
2011-02-03Asterisk media architecture conversion - no more format bitfieldsdvossel1-11/+11
This patch is the foundation of an entire new way of looking at media in Asterisk. The code present in this patch is everything required to complete phase1 of my Media Architecture proposal. For more information about this project visit the link below. https://wiki.asterisk.org/wiki/display/AST/Media+Architecture+Proposal The primary function of this patch is to convert all the usages of format bitfields in Asterisk to use the new format and format_cap APIs. Functionally no change in behavior should be present in this patch. Thanks to twilson and russell for all the time they spent reviewing these changes. Review: https://reviewboard.asterisk.org/r/1083/ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@306010 f38db490-d61c-443f-a65b-d21fe96a405b
2010-01-28Informational message, not an error.tilghman1-2/+2
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@243943 f38db490-d61c-443f-a65b-d21fe96a405b
2009-11-09Don't try to convert a 64-bit integer, where only a 32-bit integer is stored.tilghman1-1/+1
(closes issue #16194) Reported by: habile git-svn-id: http://svn.digium.com/svn/asterisk/trunk@228979 f38db490-d61c-443f-a65b-d21fe96a405b
2009-11-04Expand codec bitfield from 32 bits to 64 bits.tilghman1-5/+60
Reviewboard: https://reviewboard.asterisk.org/r/416/ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@227580 f38db490-d61c-443f-a65b-d21fe96a405b
2009-09-03Merge code associated with AST-2009-006dvossel1-0/+10
(closes issue #12912) Reported by: rathaus Tested by: tilghman, russell, dvossel, dbrooks git-svn-id: http://svn.digium.com/svn/asterisk/trunk@215955 f38db490-d61c-443f-a65b-d21fe96a405b
2009-06-01Tell the IAX2 parser about more control frame types.russell1-1/+7
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@198729 f38db490-d61c-443f-a65b-d21fe96a405b
2009-05-21Const-ify the world (or at least a good part of it)kpfleming1-1/+1
This patch adds 'const' tags to a number of Asterisk APIs where they are appropriate (where the API already demanded that the function argument not be modified, but the compiler was not informed of that fact). The list includes: - CLI command handlers - CLI command handler arguments - AGI command handlers - AGI command handler arguments - Dialplan application handler arguments - Speech engine API function arguments In addition, various file-scope and function-scope constant arrays got 'const' and/or 'static' qualifiers where they were missing. Review: https://reviewboard.asterisk.org/r/251/ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@196072 f38db490-d61c-443f-a65b-d21fe96a405b
2009-05-15Merged revisions 194557,194685 via svnmerge from dvossel1-46/+130
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: http://svn.digium.com/svn/asterisk/trunk@194833 f38db490-d61c-443f-a65b-d21fe96a405b
2008-12-13Merge ast_str_opaque branch (discontinue usage of ast_str internals)tilghman1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@163991 f38db490-d61c-443f-a65b-d21fe96a405b
2008-12-10Finish conversion to using ARRAY_LEN and remove it as a janitor project.file1-2/+2
(closes issue #14032) Reported by: bkruse Patches: 14032.patch uploaded by bkruse (license 132) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@162542 f38db490-d61c-443f-a65b-d21fe96a405b
2008-09-13Repair IAXVAR implementation so that it works again (regression?)tilghman1-14/+22
(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-08-09More RSW merges. This should do it for the channels/ dir.seanbright1-21/+21
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@136917 f38db490-d61c-443f-a65b-d21fe96a405b
2008-08-01Merge changes from team/bbryant/keyrotationrussell1-1/+11
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-07-31fix the potential use of an uninitialized variablerussell1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@134916 f38db490-d61c-443f-a65b-d21fe96a405b
2008-07-31Optimize frame cache by realloc'ing the smallest frame when the cache is full.tilghman1-2/+19
This ensures that we don't just keep a cache of tiny frames, continually doing an alloc/free for each data frame, thus negating the point of having a cache. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@134867 f38db490-d61c-443f-a65b-d21fe96a405b
2008-07-31Merged revisions 134814 via svnmerge from russell1-7/+18
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r134814 | russell | 2008-07-31 11:45:31 -0500 (Thu, 31 Jul 2008) | 7 lines In case we have some processing threads that free more frames than they allocate, do not let the frame cache grow forever. (closes issue #13160) Reported by: tavius Tested by: tavius, russell ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@134815 f38db490-d61c-443f-a65b-d21fe96a405b
2008-07-03Fix one more file that got changed.bbryant1-5/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@127934 f38db490-d61c-443f-a65b-d21fe96a405b
2008-07-03Update these files with transfer code.bbryant1-1/+5
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@127931 f38db490-d61c-443f-a65b-d21fe96a405b
2008-05-22- revert change to ast_queue_hangup and create ast_queue_hangup_with_causemvanbaak1-3/+3
- 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
2007-11-16Start untangling header inclusion in a way that does not affectrizzo1-5/+0
build times - tested, there is no measureable difference before and after this commit. In this change: use asterisk/compat.h to include a small set of system headers: inttypes.h, unistd.h, stddef.h, stddint.h, sys/types.h, stdarg.h, stdlib.h, alloca.h, stdio.h Where available, the inclusion is conditional on HAVE_FOO_H as determined by autoconf. Normally, source files should not include any of the above system headers, and instead use either "asterisk.h" or "asterisk/compat.h" which does it better. For the time being I have left alone second-level directories (main/db1-ast, etc.). git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89333 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-08improve linked-list macros in two ways:kpfleming1-2/+2
- the *_CURRENT macros no longer need the list head pointer argument - add AST_LIST_MOVE_CURRENT to encapsulate the remove/add operation when moving entries between lists git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89106 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-01Corydon posted this janitor project to the bug tracker and mvanbaak providedrussell1-1/+1
a patch for it. It replaces a bunch of simple calls to snprintf with ast_copy_string (closes issue #10843) Reported by: Corydon76 Patches: 2007092900_10843.diff uploaded by mvanbaak (license 7) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@84173 f38db490-d61c-443f-a65b-d21fe96a405b
2007-09-06Initialize iax_frames variable to NULL, keeps valgrind happy.file1-2/+2
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@81814 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-29This code was in team/murf/bug8684-trunk; it should fix bug 8684 in trunk. I ↵murf1-2/+2
didn't add it to 1.4 yet, because it's not entirely clear to me if this is a bug fix or an enhancement. A lot of files were affected by small changes like ast_variable_new getting an added arg, for the file name the var was defined in; ast_category_new gets added args of filename and lineno; ast_category and ast_variable structures now record file and lineno for each entry; a list of all #include and #execs in a config file (or any of its inclusions are now kept in the ast_config struct; at save time, each entry is put back into its proper file of origin, in order. #include and #exec directives are folded in properly. Headers indicating that the file was generated, are generated also for each included file. Some changes to main/manager.c to take care of file renaming, via the UpdateConfig command. Multiple inclusions of the same file are handled by exploding these into multiple include files, uniquely named. There's probably more, but I can't remember it right now. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@81361 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-18Merge in ast_strftime branch, which changes timestamps to be accurate to the ↵tilghman1-2/+2
microsecond, instead of only to the second git-svn-id: http://svn.digium.com/svn/asterisk/trunk@75706 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-17Merged revisions 75445 via svnmerge from russell1-7/+14
https://origsvn.digium.com/svn/asterisk/branches/1.4 ................ r75445 | russell | 2007-07-17 15:48:21 -0500 (Tue, 17 Jul 2007) | 13 lines Merged revisions 75444 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r75444 | russell | 2007-07-17 15:45:27 -0500 (Tue, 17 Jul 2007) | 5 lines Ensure that when encoding the contents of an ast_frame into an iax_frame, that the size of the destination buffer is known in the iax_frame so that code won't write past the end of the allocated buffer when sending outgoing frames. (ASA-2007-014) ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@75446 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-13Merged revisions 69184 via svnmerge from file1-1/+2
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r69184 | file | 2007-06-13 15:58:59 -0400 (Wed, 13 Jun 2007) | 2 lines Add TXMEDIA to list so that it is properly displayed during iax2 packet output. ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@69185 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-06Issue 9869 - replace malloc and memset with ast_calloc, and other coding ↵tilghman1-5/+5
guidelines changes git-svn-id: http://svn.digium.com/svn/asterisk/trunk@67864 f38db490-d61c-443f-a65b-d21fe96a405b
2007-04-20Merge changes from team/russell/iax2_osprussell1-0/+11
This set of changes adds OSP support to chan_iax2. However, I have modified the patch a bit from what was submitted. You now use the CHANNEL() function to get and set the OSP token for IAX2. (issue #8531, reported by and original patch by homesick, patch updated by me) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@61702 f38db490-d61c-443f-a65b-d21fe96a405b
2007-03-20Merged revisions 59076 via svnmerge from file1-0/+1
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r59076 | file | 2007-03-20 16:42:46 -0400 (Tue, 20 Mar 2007) | 2 lines Copy len variable as well, should fix remaining IAX2 DTMF issues. ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@59077 f38db490-d61c-443f-a65b-d21fe96a405b
2007-01-16IAX2 remote variables - Bug 7619tilghman1-1/+33
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@51123 f38db490-d61c-443f-a65b-d21fe96a405b
2007-01-04Merged revisions 49536 via svnmerge from kpfleming1-2/+6
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r49536 | kpfleming | 2007-01-04 15:58:42 -0600 (Thu, 04 Jan 2007) | 2 lines don't mark these allocations as 'cache' allocations when caching has been disabled ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@49538 f38db490-d61c-443f-a65b-d21fe96a405b
2007-01-04Merged revisions 49523 via svnmerge from kpfleming1-0/+2
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r49523 | kpfleming | 2007-01-04 15:06:02 -0600 (Thu, 04 Jan 2007) | 2 lines if we're going to decrement the frame count when we free a frame, we should inrement it when we create one :-) ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@49524 f38db490-d61c-443f-a65b-d21fe96a405b
2007-01-04Merged revisions 49465 via svnmerge from kpfleming1-2/+3
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r49465 | kpfleming | 2007-01-04 12:31:55 -0600 (Thu, 04 Jan 2007) | 2 lines only do IAX2 frame caching for voice and video frames ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@49466 f38db490-d61c-443f-a65b-d21fe96a405b
2007-01-04Merged revisions 49457,49460-49461 via svnmerge from kpfleming1-1/+1
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r49457 | kpfleming | 2007-01-04 12:05:47 -0600 (Thu, 04 Jan 2007) | 2 lines make building of codec_gsm against the system GSM library actually work ........ r49460 | kpfleming | 2007-01-04 12:16:40 -0600 (Thu, 04 Jan 2007) | 2 lines don't define this type either if LOW_MEMORY is enabled ........ r49461 | kpfleming | 2007-01-04 12:17:01 -0600 (Thu, 04 Jan 2007) | 2 lines don't do frame header caching in the core if LOW_MEMORY is defined ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@49463 f38db490-d61c-443f-a65b-d21fe96a405b
2007-01-04Merged revisions 49458 via svnmerge from mogorman1-1/+14
https://svn.digium.com/svn/asterisk/branches/1.4 ........ r49458 | kpfleming | 2007-01-04 12:06:51 -0600 (Thu, 04 Jan 2007) | 2 lines don't do frame caching in LOW_MEMORY mode ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@49462 f38db490-d61c-443f-a65b-d21fe96a405b
2006-12-27Merged revisions 48987 via svnmerge from kpfleming1-1/+1
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r48987 | kpfleming | 2006-12-27 12:29:13 -0600 (Wed, 27 Dec 2006) | 2 lines allow 'show memory' and 'show memory summary' to distinguish memory allocations that were done for caching purposes, so they don't look like memory leaks ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@48989 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-19Extend the thread storage API such that a custom initialization function canrussell1-1/+1
be called for each thread specific object after they are allocated. Note that there was already the ability to define a custom cleanup function. Also, if the custom cleanup function is used, it *MUST* call free on the thread specific object at the end. There is no way to have this magically done that I can think of because the cleanup function registered with the pthread implementation will only call the function back with a pointer to the thread specific object, not the parent ast_threadstorage object. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@45623 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-31there is no need for __iax_frame_free ...russell1-10/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@41650 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-31there is no need to use iax_frame_free here, as it will actually just end uprussell1-1/+1
having a bunch of erroneous messages about attempting to double free frames spammed to the console. Problem reported to me by file ... git-svn-id: http://svn.digium.com/svn/asterisk/trunk@41629 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-31Merge in VLDTMF support with Zaptel/Core done by the ever great Darumkilla ↵file1-3/+6
Russell Bryant and the RTP portion done by myself, Muffinlicious Joshua Colp. This has gone through so many discussions/revisions it's not funny but we finally have it! git-svn-id: http://svn.digium.com/svn/asterisk/trunk@41507 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-29Merge team/russell/frame_cachingrussell1-12/+70
There are some situations in Asterisk where ast_frame and/or iax_frame structures are rapidly allocatted and freed (at least 50 times per second for one call). This code significantly improves the performance of ast_frame_header_new(), ast_frdup(), ast_frfree(), iax_frame_new(), and iax_frame_free() by keeping a thread-local cache of these structures and using frames from the cache whenever possible instead of calling malloc/free every time. This commit also converts the ast_frame and iax_frame structures to use the linked list macros. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@41278 f38db490-d61c-443f-a65b-d21fe96a405b
2006-07-31make the counting of ingress, outgress, and total frames thread-saferussell1-6/+8
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@38587 f38db490-d61c-443f-a65b-d21fe96a405b
2006-07-21Merge a new implementation of ast_inet_ntoa, our thread safe replacement forrussell1-7/+3
inet_ntoa, which uses thread specific data (aka thread local storage) instead of stack allocatted buffers to store the result. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@38042 f38db490-d61c-443f-a65b-d21fe96a405b
2006-07-08Support hold/unhold in Zap, update IAX2 parser to know about modern ↵markster1-1/+12
commands, forward hold/unhold in dial, add hold device state and implement holding in the SLA. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@37318 f38db490-d61c-443f-a65b-d21fe96a405b
2006-06-07simplify autoconfig include mechanism (make tholo happy he can use lint ↵kpfleming1-4/+4
again :-) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@32846 f38db490-d61c-443f-a65b-d21fe96a405b
2006-02-01use string fields for some stuff in ast_channelkpfleming1-3/+3
const-ify some more APIs remove 'type' field from ast_channel, in favor of the one in the channel's tech structure allow string field module users to specify the 'chunk size' for pool allocations update chan_alsa to be compatible with recent const-ification patches git-svn-id: http://svn.digium.com/svn/asterisk/trunk@9060 f38db490-d61c-443f-a65b-d21fe96a405b
2005-12-30update doxygen docs to specify authorsrussell1-1/+2
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@7682 f38db490-d61c-443f-a65b-d21fe96a405b
2005-11-29git-svn-id: http://svn.digium.com/svn/asterisk/trunk@7221 ↵kpfleming1-0/+0
2005-11-10issue #5693kpfleming1-5/+4
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@7058 f38db490-d61c-443f-a65b-d21fe96a405b