aboutsummaryrefslogtreecommitdiffstats
path: root/channels/chan_mgcp.c
AgeCommit message (Collapse)AuthorFilesLines
2008-03-05Add a control frame to indicate the source of media has changed. Depending ↵file1-0/+3
on the underlying technology it may need to change some things. (closes issue #12148) Reported by: jcomellas git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@106235 f38db490-d61c-443f-a65b-d21fe96a405b
2008-02-05Clear the DTMF buffer on hangup.mmichelson1-0/+3
(closes issue #11919) Reported by: eferro Patches: mgcp_dtmfclean_on_hangup.diff uploaded by eferro (license 337) Tested by: eferro git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@102453 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-27When deleting a task from the scheduler, ignoring the return value couldtilghman1-6/+3
possibly cause memory to be accessed after it is freed, which causes all sorts of random memory corruption. Instead, if a deletion fails, wait a bit and try again (noting that another thread could change our taskid value). (closes issue #11386) Reported by: flujan Patches: 20080124__bug11386.diff.txt uploaded by Corydon76 (license 14) Tested by: Corydon76, flujan, stuarth` git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@100465 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-08Fix various DTMF issues in chan_mgcp.file1-11/+49
(closes issue #11443) Reported by: eferro Patches: dtmf_control_hybrid-inband-mode.patch uploaded by eferro (license 337) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@97195 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-17Issue 11574: Add dependencies on res_monitor and res_features. oej1-0/+3
I wonder if Asterisk can run at all without res_features. My guess is that there's propably a lot of more modules and the core that depends on it. Reported by: caio1982 (closes issue #11574) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@93182 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-03Changing some bad logic when calculating the interdigit timeout.mmichelson1-1/+1
(closes issue #11402, reported and patched by eferro) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@90639 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-30Clear the DTMF buffer if the call times out.mmichelson1-0/+1
(closes issue #11418, reported and patched by eferro) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@90231 f38db490-d61c-443f-a65b-d21fe96a405b
2007-09-21gcc 4.2 has a new set of warnings dealing with cosnt pointers. This set ofrussell1-1/+1
changes gets all of Asterisk (minus chan_alsa for now) to compile with gcc 4.2. (closes issue #10774, patch from qwell) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@83432 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-21Don't try to dereference the owner channel when it may not existrussell1-10/+7
(issue #10507, maxper) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@80132 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-13(closes issue #10437)file1-2/+0
Reported by: haklin Don't set the callerid name and number a second time on a newly created channel. ast_channel_alloc itself already sets it and setting it twice would cause a memory leak. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@79174 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-01Add some fixes for building on Solaris.file1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@77869 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-14use ast_localtime() in every place localtime_r() was being usedkpfleming1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@69392 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-04Fixes for dtmf/dialing with mgcp (similar to the recent fix for chan_skinny)qwell1-56/+72
Issue 9855, patch by DEA. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@67121 f38db490-d61c-443f-a65b-d21fe96a405b
2007-04-09This is a big improvement over the current CDR fixes. It may still need ↵murf1-1/+1
refinement, but this won't have as many folks bothered. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@60989 f38db490-d61c-443f-a65b-d21fe96a405b
2007-01-31Merged revisions 53045 via svnmerge from russell1-0/+1
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r53045 | russell | 2007-01-31 15:25:11 -0600 (Wed, 31 Jan 2007) | 3 lines Fix a bunch of places where pthread_attr_init() was called, but pthread_attr_destroy() was not. ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@53046 f38db490-d61c-443f-a65b-d21fe96a405b
2007-01-19Merge the changes from the /team/group/vldtmf_fixup branch.russell1-2/+2
The main bug being addressed here is a problem introduced when two SIP channels using SIP INFO dtmf have their media directly bridged. So, when a DTMF END frame comes into Asterisk from an incoming INFO message, Asterisk would try to emulate a digit of some length by first sending a DTMF BEGIN frame and sending a DTMF END later timed off of incoming audio. However, since there was no audio coming in, the DTMF_END was never generated. This caused DTMF based features to no longer work. To fix this, the core now knows when a channel doesn't care about DTMF BEGIN frames (such as a SIP channel sending INFO dtmf). If this is the case, then Asterisk will not emulate a digit of some length, and will instead just pass through the single DTMF END event. Channel drivers also now get passed the length of the digit to their digit_end callback. This improves SIP INFO support even further by enabling us to put the real digit duration in the INFO message instead of a hard coded 250ms. Also, for an incoming INFO message, the duration is read from the frame and passed into the core instead of just getting ignored. (issue #8597, maybe others...) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@51311 f38db490-d61c-443f-a65b-d21fe96a405b
2006-11-10Discussion of these CLI changes resulted in more consistency (Bug 8236)tilghman1-6/+6
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@47436 f38db490-d61c-443f-a65b-d21fe96a405b
2006-11-07These mods are to solve the problem in bug 7506. It's a lot of rework to ↵murf1-3/+2
solve a fairly small problem... such is life. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@47303 f38db490-d61c-443f-a65b-d21fe96a405b
2006-11-02Reverse change of "show" to "list" and make several other commands more ↵tilghman1-35/+18
consistent with "category verb arguments" git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@47051 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-25apparently developers are still not aware that they should be use ↵kpfleming1-24/+23
ast_copy_string instead of strncpy... fix up many more users, and fix some bugs in the process git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@46200 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-04update thread creation code a bitkpfleming1-1/+1
reduce standard thread stack size slightly to allow the pthreads library to allocate the stack+data and not overflow a power-of-2 allocation in the kernel and waste memory/address space add a new stack size for 'background' threads (those that don't handle PBX calls) when LOW_MEMORY is defined git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@44378 f38db490-d61c-443f-a65b-d21fe96a405b
2006-09-28Put in missing \ns on the end of ast_logs (issue #7936 reported by wojtekka)file1-3/+3
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@43933 f38db490-d61c-443f-a65b-d21fe96a405b
2006-09-21Clean up chan_mgcp's module load function (issue #8001 reported by Mithraen ↵file1-21/+22
with mods by moi) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@43454 f38db490-d61c-443f-a65b-d21fe96a405b
2006-09-18merge qwell's CLI verbification workkpfleming1-57/+81
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@43212 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-31everything that loads a config that needs a config file to runmogorman1-1/+2
now reports AST_MODULE_LOAD_DECLINE when loading if config file is not there, also fixed an error in res_config_pgsql where it had a non static function when it should. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@41633 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-31Merge in VLDTMF support with Zaptel/Core done by the ever great Darumkilla ↵file1-4/+12
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-28Merge in RTP-level packet bridging. Packet comes in, packet goes out - ↵file1-6/+12
that's what RTP-level packet bridging is all about! git-svn-id: http://svn.digium.com/svn/asterisk/trunk@41235 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-21merge new_loader_completion branch, including (at least):kpfleming1-21/+10
- restructured build tree and makefiles to eliminate recursion problems - support for embedded modules - support for static builds - simpler cross-compilation support - simpler module/loader interface (no exported symbols) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@40722 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-16Merged revisions 40057 via svnmerge from kpfleming1-4/+6
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r40057 | kpfleming | 2006-08-16 13:57:44 -0500 (Wed, 16 Aug 2006) | 2 lines don't allow AUEP responses to overflow the stack during a string copy (reported by Mu Security) ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@40058 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-16move the calls to ast_jb_configure() to before the PBX thread is started on therussell1-4/+2
channel to remove the theoretical race condition that the channel could get bridged before the channel's jitterbuffer gets configured. This was pointed out by PCadach on IRC. Thanks! git-svn-id: http://svn.digium.com/svn/asterisk/trunk@39964 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-05Merged revisions 38903-38904 via svnmerge from russell1-1/+7
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r38903 | russell | 2006-08-05 01:07:39 -0400 (Sat, 05 Aug 2006) | 2 lines suppress a compiler warning about the usage of a potentially uninitialized variable ........ r38904 | russell | 2006-08-05 01:08:50 -0400 (Sat, 05 Aug 2006) | 10 lines Fix an issue that would cause a NewCallerID manager event to be generated before the channel's NewChannel event. This was due to a somewhat recent change that included using ast_set_callerid() where it wasn't before. This function should not be used in the channel driver "new" functions. (issue #7654, fixed by me) Also, fix a couple minor bugs in usecount handling. chan_iax2 could have increased the usecount but then returned an error. The place where chan_sip increased the usecount did not call ast_update_usecount() ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@38905 f38db490-d61c-443f-a65b-d21fe96a405b
2006-07-21Merge a new implementation of ast_inet_ntoa, our thread safe replacement forrussell1-26/+16
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-19merge Russell's 'hold_handling' branch, finally implementing music-on-hold ↵kpfleming1-218/+133
handling the way it was decided at AstriDevCon Europe 2006 (and the way people really want it to be) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@37988 f38db490-d61c-443f-a65b-d21fe96a405b
2006-07-13allow users of RTP to use G726-32 AAL2 packing even when RFC3551 packing has ↵kpfleming1-5/+5
been requested (Sipura/Grandstream ATAs and others will need this) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@37501 f38db490-d61c-443f-a65b-d21fe96a405b
2006-07-03Blocked revisions 36725 via svnmergerussell1-31/+7
........ r36725 | russell | 2006-07-03 00:19:09 -0400 (Mon, 03 Jul 2006) | 4 lines use ast_set_callerid to be more consistent and to make sure that the "callerid" option in the conf files is always handled the same way and sets ANI (issue #7285, gkloepfer) ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@36726 f38db490-d61c-443f-a65b-d21fe96a405b
2006-06-23revert my changes that converted the jb on the channel to be dynamicallyrussell1-12/+8
allocated. These changes caused crashes when using a channel type that did not support the jitterbuffer. Instead of fixing why it's crashing, I'm going to implement this in a better way next week. The way I did it caused a jitterbuffer to be allocated on every channel where the channel type supported jitterbuffers, even if they were disabled. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@35746 f38db490-d61c-443f-a65b-d21fe96a405b
2006-06-22- dynamically allocate the ast_jb structure that is on the channel structurerussell1-8/+12
so that channels not using a jitterbuffer don't waste as much memory - ensure that the channel drivers that use jitterbuffers can handle a failure from configuring a jitterbuffer on a new channel because of a memory allocation error - On passing through these channel drivers, configure the jitterbuffer before starting the PBX thread instead of afterwards. If the pbx fails to start for whatever reason, this would have caused a crash. - Also on passing, move the increase of the usecount to after all of the possible failure conditions in the function - fix a place where ast_update_use_count() was not called - ensure that the owner channel pointer of the channel pvt strcutures is set to NULL in failure conditions git-svn-id: http://svn.digium.com/svn/asterisk/trunk@35553 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-06-01- add the ability to configure forced jitterbuffers on h323, jingle,russell1-9/+26
and mgcp channels - remove the jitterbuffer configuration from the pvt structures in the sip, zap, and skinny channel drivers, as copying the same global configuration into each pvt structure has no benefit. - update and fix some typos in jitterbuffer related documentation (issue #7257, north, with additional updates and modifications) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@31413 f38db490-d61c-443f-a65b-d21fe96a405b
2006-05-31update the rest of the channel drivers that use RTP so that their channelrussell1-1/+1
tech structures indicate that they create jitter git-svn-id: http://svn.digium.com/svn/asterisk/trunk@31077 f38db490-d61c-443f-a65b-d21fe96a405b
2006-05-10ensure that control frames with payload can be sent to channel drivers via ↵kpfleming1-2/+2
->indicate() update iax2_indicate to pass control frame payload to the connected channel add an API call for sending an indication with payload, and use it for control frames with payload git-svn-id: http://svn.digium.com/svn/asterisk/trunk@26417 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-21more stncpy/ast_copy_string replacement.rizzo1-21/+18
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@22046 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-14This rather large commit changes the way modules are loaded. rizzo1-20/+11
As partly documented in loader.c and include/asterisk/module.h, modules are now expected to return all of their methods and flags into a structure 'mod_data', and are normally loaded with RTLD_NOW | RTLD_LOCAL, so symbols are resolved immediately and conflicts should be less likely. Only in a small number of cases (res_*, typically) modules are loaded RTLD_GLOBAL, so they can export symbols. The core of the change is only the two files loader.c and include/asterisk/module.h, all the rest is simply adaptation of the existing modules to the new API, a rather mechanical (but believe me, time and finger-consuming!) process whose detail you can figure out by svn diff'ing any single module. Expect some minor compilation issue after this change, please report it on mantis http://bugs.digium.com/view.php?id=6968 so we collect all the feedback in one place. I am just sorry that this change missed SVN version number 20000! git-svn-id: http://svn.digium.com/svn/asterisk/trunk@20003 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-08since the module API is changing, it's a good time to const-ify the ↵kpfleming1-2/+2
description() and key() return values git-svn-id: http://svn.digium.com/svn/asterisk/trunk@18552 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-05Bug 6873 - Finish moving from the non-threadsafe (and poor randomness) ↵tilghman1-6/+6
rand() to threadsafe ast_random() git-svn-id: http://svn.digium.com/svn/asterisk/trunk@17627 f38db490-d61c-443f-a65b-d21fe96a405b
2006-02-11Merged revisions 9609 via svnmerge from russell1-0/+1
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r9609 | russell | 2006-02-11 14:23:20 -0500 (Sat, 11 Feb 2006) | 2 lines fix memory leak from not destroying the scheduler context on module unload ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@9610 f38db490-d61c-443f-a65b-d21fe96a405b
2006-02-10Merged revisions 9404 via svnmerge from kpfleming1-6/+2
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r9404 | kpfleming | 2006-02-10 14:38:59 -0600 (Fri, 10 Feb 2006) | 2 lines don't create monitor threads in detached mode, when we need to be able to pthread_join() them later if the module is unloaded (solve crash-on-unload problem for these channel modules) ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@9405 f38db490-d61c-443f-a65b-d21fe96a405b
2006-02-01use string fields for some stuff in ast_channelkpfleming1-9/+8
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
2006-01-31define a global null_frame object so when queueing a null frame, you don'trussell1-2/+1
have to allocate one on the stack git-svn-id: http://svn.digium.com/svn/asterisk/trunk@9001 f38db490-d61c-443f-a65b-d21fe96a405b
2006-01-21Bug 5515 - Devicestate and API documentation updatetilghman1-35/+99
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@8371 f38db490-d61c-443f-a65b-d21fe96a405b