summaryrefslogtreecommitdiff
path: root/channels/chan_gtalk.c
AgeCommit message (Collapse)Author
2012-03-08Eliminate a bunch of shadow warnings.Sean Bright
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@358647 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-01Opaquify ast_channel typedefs, fd arrays, and softhangup flagTerry Wilson
Review: https://reviewboard.asterisk.org/r/1784/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@357721 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-29Opaquify ast_channel structs and listsTerry Wilson
Review: https://reviewboard.asterisk.org/r/1773/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@357542 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-24Opaquification for ast_format structs in struct ast_channelTerry Wilson
Review: https://reviewboard.asterisk.org/r/1770/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@356573 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-20ast_channel opaquification of pointers and integral typesTerry Wilson
Review: https://reviewboard.asterisk.org/r/1753/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@356042 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-13Opaquify char * and char[] in ast_channelTerry Wilson
Review: https://reviewboard.asterisk.org/r/1733/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@354968 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-01Constify some more channel driver technology callback parameters.Richard Mudgett
Review: https://reviewboard.asterisk.org/r/1707/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@353685 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-24Opaquify channel stringfieldsTerry Wilson
Continue channel opaque-ification by wrapping all of the stringfields. Eventually, we will restrict what can actually set these variables, but the purpose for now is to hide the implementation and keep people from adding code that directly accesses the channel structure. Semantic changes will follow afterward. Review: https://reviewboard.asterisk.org/r/1661/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@352348 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-09Replace direct access to channel name with accessor functionsTerry Wilson
There are many benefits to making the ast_channel an opaque handle, from increasing maintainability to presenting ways to kill masquerades. This patch kicks things off by taking things a field at a time, renaming the field to '__do_not_use_${fieldname}' and then writing setters/getters and converting the existing code to using them. When all fields are done, we can move ast_channel to a C file from channel.h and lop off the '__do_not_use_'. This patch sets up main/channel_interal_api.c to be the only file that actually accesses the ast_channel's fields directly. The intent would be for any API functions in channel.c to use the accessor functions. No more monkeying around with channel internals. We should use our own APIs. The interesting changes in this patch are the addition of channel_internal_api.c, the moving of the AST_DATA stuff from channel.c to channel_internal_api.c (note: the AST_DATA stuff will have to be reworked to use accessor functions when ast_channel is really opaque), and some re-working of the way channel iterators/callbacks are handled so as to avoid creating fake ast_channels on the stack to pass in matching data by directly accessing fields (since "name" is a stringfield and the fake channel doesn't init the stringfields, you can't use the ast_channel_name_set() function). I went with ast_channel_name(chan) for a getter, and ast_channel_name_set(chan, name) for a setter. The majority of the grunt-work for this change was done by writing a semantic patch using Coccinelle ( http://coccinelle.lip6.fr/ ). Review: https://reviewboard.asterisk.org/r/1655/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@350223 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-23Fix res_jabber resource leaksKinsey Moore
This should fix almost all resource leaks in res_jabber that involve ASTOBJ_CONTAINER_FIND and resolves an ambiguous situation where ast_aji_get_client would sometimes bump an object's refcount and sometimes not. Review: https://reviewboard.asterisk.org/r/1553 ........ Merged revisions 346086 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 346087 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@346088 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-10-19Outgoing calls with Google VoicePaul Belanger
Google has recently make some changes (again) to their protocol. Rather then patching asterisk to flip between the two different methods, we now allow both. Lets hope this keeps Google Voice happy for a while. (closes issue ASTERISK-18714) Reported by: Iordan Iordanov Patches: chan_gtalk.patch uploaded by Iordan Iordanov (licenses 6311) ........ Merged revisions 341435 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 341436 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@341437 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-08-22Merged revisions 332877 via svnmerge from Paul Belanger
https://origsvn.digium.com/svn/asterisk/branches/10 ................ r332877 | pabelanger | 2011-08-22 15:43:33 -0400 (Mon, 22 Aug 2011) | 13 lines Merged revisions 332876 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r332876 | pabelanger | 2011-08-22 15:41:24 -0400 (Mon, 22 Aug 2011) | 6 lines Revert previous commit It seems google is still making changes to the protocol. (issue ASTERISK-18301) ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@332880 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-08-21Merged revisions 332700 via svnmerge from Paul Belanger
https://origsvn.digium.com/svn/asterisk/branches/10 ................ r332700 | pabelanger | 2011-08-21 10:33:23 -0400 (Sun, 21 Aug 2011) | 12 lines Merged revisions 332699 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r332699 | pabelanger | 2011-08-21 10:31:31 -0400 (Sun, 21 Aug 2011) | 5 lines Fix outgoing calls in chan_gtalk (closes issue ASTERISK-18301) Reported by: az1324 ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@332701 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-14Merged revisions 328247 via svnmerge from Leif Madsen
https://origsvn.digium.com/svn/asterisk/branches/1.10 ................ r328247 | lmadsen | 2011-07-14 16:25:31 -0400 (Thu, 14 Jul 2011) | 14 lines Merged revisions 328209 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r328209 | lmadsen | 2011-07-14 16:13:06 -0400 (Thu, 14 Jul 2011) | 6 lines Introduce <support_level> tags in MODULEINFO. This change introduces MODULEINFO into many modules in Asterisk in order to show the community support level for those modules. This is used by changes committed to menuselect by Russell Bryant recently (r917 in menuselect). More information about the support level types and what they mean is available on the wiki at https://wiki.asterisk.org/wiki/display/AST/Asterisk+Module+Support+States ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@328259 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-11Merged revisions 327682 via svnmerge from Terry Wilson
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r327682 | twilson | 2011-07-11 12:41:59 -0700 (Mon, 11 Jul 2011) | 9 lines Update chan_gtalk to work with changed GMail-based calls The messages sent by the GMail client have changed, but include the old-style messages as well. This patch checks for this case and uses the old-style offer. (closes issue ASTERISK-18084) Review: https://reviewboard.asterisk.org/r/1312/ ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@327683 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-05Merged revisions 326411 via svnmerge from Tilghman Lesher
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r326411 | tilghman | 2011-07-05 17:08:29 -0500 (Tue, 05 Jul 2011) | 14 lines Add the attribute "type" to each "<use>" for menuselect. This matters only when autoconf fails to detect that weak linking is supported. External optional dependencies will become optional in both cases, as they are removed at compile time when not detected. However, runtime-optional modules are made mandatory when weak linking is not found. This change affects only the external optional dependencies; previously, they were incorrectly required when weak linking support was not detected. Patches: 20110702__issue18062__asterisk_trunk.diff.txt by tilghman (License #5003) Tested by: iasgoscouk ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@326412 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-02-22Media Project Phase2: SILK 8khz-24khz, SLINEAR 8khz-192khz, SPEEX 32khz, hd ↵David Vossel
audio ConfBridge, and other stuff -Functional changes 1. Dynamic global format list build by codecs defined in codecs.conf 2. SILK 8khz, 12khz, 16khz, and 24khz with custom attributes defined in codecs.conf 3. Negotiation of SILK attributes in chan_sip. 4. SPEEX 32khz with translation 5. SLINEAR 8khz, 12khz, 24khz, 32khz, 44.1khz, 48khz, 96khz, 192khz with translation using codec_resample.c 6. Various changes to RTP code required to properly handle the dynamic format list and formats with attributes. 7. ConfBridge now dynamically jumps to the best possible sample rate. This allows for conferences to take advantage of HD audio (Which sounds awesome) 8. Audiohooks are no longer limited to 8khz audio, and most effects have been updated to take advantage of this such as Volume, DENOISE, PITCH_SHIFT. 9. codec_resample now uses its own code rather than depending on libresample. -Organizational changes Global format list is moved from frame.c to format.c Various format specific functions moved from frame.c to format.c Review: https://reviewboard.asterisk.org/r/1104/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@308582 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-02-04Replace ast_log(LOG_DEBUG, ...) with ast_debug()Paul Belanger
(closes issue #18556) Reported by: kkm Review: https://reviewboard.asterisk.org/r/1071/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@306258 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-02-03Asterisk media architecture conversion - no more format bitfieldsDavid Vossel
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: https://origsvn.digium.com/svn/asterisk/trunk@306010 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-12-20Some scheduler API cleanup and improvements.Russell Bryant
Previously, I had added the ast_sched_thread stuff that was a generic scheduler thread implementation. However, if you used it, it required using different functions for modifying scheduler contents. This patch reworks how this is done and just allows you to optionally start a thread on the original scheduler context structure that has always been there. This makes it trivial to switch to the generic scheduler thread implementation without having to touch any of the other code that adds or removes scheduler entries. In passing, I made some naming tweaks to add ast_ prefixes where they were not there before. Review: https://reviewboard.asterisk.org/r/1007/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@299091 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-12-09Merged revisions 297957 via svnmerge from David Vossel
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r297957 | dvossel | 2010-12-09 15:32:20 -0600 (Thu, 09 Dec 2010) | 11 lines Fixes issue with outbound google voice calls not working. Thanks to az1234 and nevermind_quack for their input in helping debug the issue. (closes issue #18412) Reported by: nevermind_quack Patches: fix uploaded by dvossel (license 671) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@297958 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-11-02New CLI command 'gtalk show settings'.Paul Belanger
Review: https://reviewboard.asterisk.org/r/984/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@293578 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-10-14Merged revisions 291827 via svnmerge from David Vossel
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r291827 | dvossel | 2010-10-14 16:27:42 -0500 (Thu, 14 Oct 2010) | 18 lines Safer xml parsing, treat all clients the same, and better local candidate selection. The gtalk channel driver was doing several unsafe operations in regards to how it parsed incoming XML messages. I have cleaned that code up so it should be much safer now. We now treat all clients types the same. We have no reason to distinguish between GMAIL and GOOGLE VOICE clients anymore because they all work the same way. I also modified how the local ip is found. If no bindaddress is provided in the config file, we attempt to determine the local ip we would use to connect to google.com. If that fails, then we fall back to the ast_find_ourip() function as a last resort. Using the new method makes it much less likely that we would ever advertise a local RTP candidate as a loopback address. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@291828 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-10-14Merged revisions 291758 via svnmerge from Paul Belanger
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r291758 | pabelanger | 2010-10-14 11:15:12 -0400 (Thu, 14 Oct 2010) | 11 lines Add the ability for ast_find_ourip to return IPv4, IPv6 or both. While testing chan_gtalk I noticed jabber was using my IPv6 address and not IPv4. When using bindaddr=0.0.0.0 it is possible for ast_find_ourip() to return both IPv6 and IPv4 results. Adding a family parameter gives you the ablility to choose. Since jabber/gtalk/h323 do not support IPv6, we should only return IPv4 results. Review: https://reviewboard.asterisk.org/r/973/ ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@291760 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-10-13Merged revisions 291578 via svnmerge from David Vossel
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r291578 | dvossel | 2010-10-13 17:46:34 -0500 (Wed, 13 Oct 2010) | 4 lines More fixup for chan_gtalk. This patch makes the xml parsing safer. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@291579 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-10-11Merged revisions 291192 via svnmerge from David Vossel
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r291192 | dvossel | 2010-10-11 16:38:39 -0500 (Mon, 11 Oct 2010) | 19 lines Gtalk enhancements and general code cleanup. This patch includes several chan_gtalk enhancements. Two new gtalk.conf options have been added, externip and stunadd. Setting externip allows us to manually specify what the external IP address is outside of a NAT environment. Setting the stunaddr option to a valid stun server allows for that external ip to be retrieved via a STUN server automatically. This external IP is then advertised during call setup as a possible candidate. I have also attempted to clean up chan_gtalk's code so it meets our coding guidelines. During this cleanup I noticed several things that need to be done in the code and made a TODO section at the top of the file. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@291193 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-10-08Merged revisions 290973 via svnmerge from David Vossel
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r290973 | dvossel | 2010-10-08 15:44:59 -0500 (Fri, 08 Oct 2010) | 12 lines Make outbound Google Voice calls. This patch allows for outbound Google Voice calls to be dialed from Asterisk using chan_gtalk. Below is an example dialstring. exten -> blah,1,Dial(Gtalk/asterisk/+15552225555@voice.google.com,,) In this example, 'asterisk' is the jabber.conf profile configured to connect to your gmail account. In order to receive Google Voice calls make sure to enable 'allowguest=yes' in gtalk.conf. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@290974 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-10-07Merged revisions 290829 via svnmerge from David Vossel
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r290829 | dvossel | 2010-10-07 17:38:05 -0500 (Thu, 07 Oct 2010) | 6 lines Add Philippe Sultan to chan_gtalk author list. Philippe has made some notable contributions to the gtalk channel driver. His name deserves to be listed amoung the authors of that file. Thanks Philippe! ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@290831 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-10-07Merged revisions 290828 via svnmerge from David Vossel
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r290828 | dvossel | 2010-10-07 16:44:58 -0500 (Thu, 07 Oct 2010) | 5 lines Outbound gtalk calls now work correctly. There was a problem with how the candidates were being built on an outbound call. This patch fixes that. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@290830 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-10-06Merged revisions 290674 via svnmerge from David Vossel
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r290674 | dvossel | 2010-10-06 16:22:51 -0500 (Wed, 06 Oct 2010) | 4 lines Fixes commented out code to use #if 0 instead. Thanks to rmudgett for catching this! ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@290677 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-10-06Merged revisions 290648 via svnmerge from David Vossel
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r290648 | dvossel | 2010-10-06 16:08:19 -0500 (Wed, 06 Oct 2010) | 12 lines Fixes gtalk outbound DTMF to work properly. Outbound DTMF with gtalk needs to be done within the RTP stream. I discovered this after investigating a packet capture from the gmail client. Instead of performing jingle signaling DTMF, the gtalk servers expect all DTMF to arrive on the RTP stream using RFC2833 way of doing things. Chan_gtalk also had an issue with negotiating RTP payload type 106 for the telephony-event and then sending DTMF as payload 101. This has been resolved by always negotiating 101 as the payload type like we do everywhere else. With this patch, incoming google voice calls forwarded to Asterisk via gtalk work. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@290649 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-10-05Merged revisions 290479 via svnmerge from David Vossel
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r290479 | dvossel | 2010-10-05 17:00:43 -0500 (Tue, 05 Oct 2010) | 6 lines Fixes chan_gtalk to work with gmail client This patch was written by Philippe Sultan (phsultan). Thanks for keeping this up to date! ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@290480 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-20Add load priority order, such that preload becomes unnecessary in most casesTilghman Lesher
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@278132 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-14ast_callerid restructuringRichard Mudgett
The purpose of this patch is to eliminate struct ast_callerid since it has turned into a miscellaneous collection of various party information. Eliminate struct ast_callerid and replace it with the following struct organization: struct ast_party_name { char *str; int char_set; int presentation; unsigned char valid; }; struct ast_party_number { char *str; int plan; int presentation; unsigned char valid; }; struct ast_party_subaddress { char *str; int type; unsigned char odd_even_indicator; unsigned char valid; }; struct ast_party_id { struct ast_party_name name; struct ast_party_number number; struct ast_party_subaddress subaddress; char *tag; }; struct ast_party_dialed { struct { char *str; int plan; } number; struct ast_party_subaddress subaddress; int transit_network_select; }; struct ast_party_caller { struct ast_party_id id; char *ani; int ani2; }; The new organization adds some new information as well. * The party name and number now have their own presentation value that can be manipulated independently. ISDN supplies the presentation value for the name and number at different times with the possibility that they could be different. * The party name and number now have a valid flag. Before this change the name or number string could be empty if the presentation were restricted. Most channel drivers assume that the name or number is then simply not available instead of indicating that the name or number was restricted. * The party name now has a character set value. SIP and Q.SIG have the ability to indicate what character set a name string is using so it could be presented properly. * The dialed party now has a numbering plan value that could be useful to have available. The various channel drivers will need to be updated to support the new core features as needed. They have simply been converted to supply current functionality at this time. The following items of note were either corrected or enhanced: * The CONNECTEDLINE() and REDIRECTING() dialplan functions were consolidated into func_callerid.c to share party id handling code. * CALLERPRES() is now deprecated because the name and number have their own presentation values. * Fixed app_alarmreceiver.c write_metadata(). The workstring[] could contain garbage. It also can only contain the caller id number so using ast_callerid_parse() on it is silly. There was also a typo in the CALLERNAME if test. * Fixed app_rpt.c using ast_callerid_parse() on the channel's caller id number string. ast_callerid_parse() alters the given buffer which in this case is the channel's caller id number string. Then using ast_shrink_phone_number() could alter it even more. * Fixed caller ID name and number memory leak in chan_usbradio.c. * Fixed uninitialized char arrays cid_num[] and cid_name[] in sig_analog.c. * Protected access to a caller channel with lock in chan_sip.c. * Clarified intent of code in app_meetme.c sla_ring_station() and dial_trunk(). Also made save all caller ID data instead of just the name and number strings. * Simplified cdr.c set_one_cid(). It hand coded the ast_callerid_merge() function. * Corrected some weirdness with app_privacy.c's use of caller presentation. Review: https://reviewboard.asterisk.org/r/702/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@276347 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-08Fix calls of ast_sockaddr_from_sin() from IPv6 integration.Richard Mudgett
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@274828 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-08Add IPv6 to Asterisk.Mark Michelson
This adds a generic API for accommodating IPv6 and IPv4 addresses within Asterisk. While many files have been updated to make use of the API, chan_sip and the RTP code are the files which actually support IPv6 addresses at the time of this commit. The way has been paved for easier upgrading for other files in the near future, though. Big thanks go to Simon Perrault, Marc Blanchet, and Jean-Philippe Dionne for their hard work on this. (closes issue #17565) Reported by: russell Patches: asteriskv6-test-report.pdf uploaded by russell (license 2) Review: https://reviewboard.asterisk.org/r/743 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@274783 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-03-02fixes adaptive jitterbuffer configurationDavid Vossel
When configuring the adaptive jitterbuffer, the target_extra value not only could not be set from the configuration, but was not even being set to its proper default. This value is required in order for the adaptive jitterbuffer to work correctly. To resolve this a config option has been added to expose this value to the conf files, and a default value is provided when no config specific value is present. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@249893 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-11-04Expand codec bitfield from 32 bits to 64 bits.Tilghman Lesher
Reviewboard: https://reviewboard.asterisk.org/r/416/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@227580 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-25Add JABBER_RECEIVE as a dialplan function, implement SendText in Jingle channelsPhilippe Sultan
JABBER_RECEIVE (along with JabberSend) makes Asterisk interact with users over XMPP to process calls. SendText can be used instead of JabberSend in the context of XMPP based voice channels (chan_gtalk and chan_jingle). (closes issue #12569) Reported by: eech55 Tested by: phsultan, asannucci, lmadsen, jtodd, maxgo Review: https://reviewboard.asterisk.org/r/88/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@220457 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-08-12Always specify which RTP engine is desired for a new RTP instance.Russell Bryant
This fixes a crash reported in #asterisk-dev where chan_mgcp unexpectedly allocated an RTP instance from res_rtp_multicast, since by not specifying an engine, you get the first one in the list of engines. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@211732 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-06-26Merge the new Channel Event Logging (CEL) subsystem.Russell Bryant
CEL is the new system for logging channel events. This was inspired after facing many problems trying to represent what is possible to happen to a call in Asterisk using CDR records. For more information on CEL, see the built in HTML or PDF documentation generated from the files in doc/tex/. Many thanks to Steve Murphy (murf) and Brian Degenhardt (bmd) for their hard work developing this code. Also, thanks to Matt Nicholson (mnicholson) and Sean Bright (seanbright) for their assistance in the final push to get this code ready for Asterisk trunk. Review: https://reviewboard.asterisk.org/r/239/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@203638 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-22Don't crash if an RTP instance can't be created. This could occur when anSean Bright
invalid bindaddr was specified in gtalk.conf. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@196381 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-24Convert the ast_channel data structure over to the astobj2 framework.Russell Bryant
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-10Fix some uninitialized memory notices that appeared under valgrind.Joshua Colp
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@187772 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-02Merge in the RTP engine API.Joshua Colp
This API provides a generic way for multiple RTP stacks to be integrated into Asterisk. Right now there is only one present, res_rtp_asterisk, which is the existing Asterisk RTP stack. Functionality wise this commit performs the same as previously. API documentation can be viewed in the rtp_engine.h header file. Review: http://reviewboard.digium.com/r/209/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@186078 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-31Merged revisions 185362 via svnmerge from David Brooks
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r185362 | dbrooks | 2009-03-31 11:37:12 -0500 (Tue, 31 Mar 2009) | 35 lines Fix incorrect parsing in chan_gtalk when xmpp contains extra whitespaces To drill into the xmpp to find the capabilities between channels, chan_gtalk calls iks_child() and iks_next(). iks_child() and iks_next() are functions in the iksemel xml parsing library that traverse xml nodes. The bug here is that both iks_child() and iks_next() will return the next iks_struct node *regardless* of type. chan_gtalk expects the next node to be of type IKS_TAG, which in most cases, it is, but in this case (a call being made from the Empathy IM client), there exists iks_struct nodes which are not IKS_TAG data (they are extraneous whitespaces), and chan_gtalk doesn't handle that case, so capabilities don't match, and a call cannot be made. iks_first_tag() and iks_next_tag(), on the other hand, will not return the very next iks_struct, but will check to see if the next iks_struct is of type IKS_TAG. If it isn't, it will be skipped, and the next struct of type IKS_TAG it finds will be returned. This assures that chan_gtalk will find the iks_struct it is looking for. This fix simply changes all calls to iks_child() and iks_next() to become calls to iks_first_tag() and iks_next_tag(), which resolves the capability matching. The following is a payload listing from Empathy, which, due to the extraneous whitespace, will not be parsed correctly by iksemel: <iq from='dbrooksjab@235-22-24-10/Telepathy' to='astjab@235-22-24-10/asterisk' type='set' id='542757715704'> <session xmlns='http://www.google.com/session' initiator='dbrooksjab@235-22-24-10/Telepathy' type='initiate' id='1837267342'> <description xmlns='http://www.google.com/session/phone'> <payload-type clockrate='16000' name='speex' id='96'/> <payload-type clockrate='8000' name='PCMA' id='8'/> <payload-type clockrate='8000' name='PCMU' id='0'/> <payload-type clockrate='90000' name='MPA' id='97'/> <payload-type clockrate='16000' name='SIREN' id='98'/> <payload-type clockrate='8000' name='telephone-event' id='99'/> </description> </session> </iq> Review: http://reviewboard.digium.com/r/181/ ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@185363 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-12Issue a warning message if our candidate's IP is the loopback address.Philippe Sultan
(closes issue #13985) Reported by: jcovert Tested by: phsultan git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@175089 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-12Merged revisions 175029 via svnmerge from Philippe Sultan
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r175029 | phsultan | 2009-02-12 11:16:21 +0100 (Thu, 12 Feb 2009) | 12 lines Set the initiator attribute to lowercase in our replies when receiving calls. This attribute contains a JID that identifies the initiator of the GoogleTalk voice session. The GoogleTalk client discards Asterisk's replies if the initiator attribute contains uppercase characters. (closes issue #13984) Reported by: jcovert Patches: chan_gtalk.2.patch uploaded by jcovert (license 551) Tested by: jcovert ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@175058 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-09-12Create a new config file status, CONFIG_STATUS_FILEINVALID for differentiatingTilghman Lesher
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: https://origsvn.digium.com/svn/asterisk/trunk@142992 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-21Fix two memory leaks in chan_gtalk, thanks Eliel!Philippe Sultan
(closes issue #13310) Reported by: eliel Patches: chan_gtalk.c.patch uploaded by eliel (license 64) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@139281 65c4cc65-6c06-0410-ace0-fbb531ad65f3