summaryrefslogtreecommitdiff
path: root/main/udptl.c
AgeCommit message (Collapse)Author
2017-12-08utils: Add convenience function for setting fd flagsSean Bright
There are many places in the code base where we ignore the return value of fcntl() when getting/setting file descriptior flags. This patch introduces a convenience function that allows setting or clearing file descriptor flags and will also log an error on failure for later analysis. Change-Id: I8b81901e1b1bd537ca632567cdb408931c6eded7
2016-10-27Remove ASTERISK_REGISTER_FILE.Corey Farrell
ASTERISK_REGISTER_FILE no longer has any purpose so this commit removes all traces of it. Previously exported symbols removed: * __ast_register_file * __ast_unregister_file * ast_complete_source_filename This also removes the mtx_prof static variable that was declared when MTX_PROFILE was enabled. This variable was only used in lock.c so it is now initialized in that file only. ASTERISK-26480 #close Change-Id: I1074af07d71f9e159c48ef36631aa432c86f9966
2016-05-18udptl: Don't eat sequence numbers until OK is receivedGeorge Joseph
Scenario: Local fax -> Asterisk w/ firewall -> Provider -> Remote fax * Local fax starts rtp call to remote fax * Remote fax starts t38 call back to local fax. * Local fax sends t38 no-signal to Asterisk before sending an OK. * udptl processes the frame and increments the expected sequence number. * chan_sip drops the frame because the call isn't up so nothing goes out the external interface to open the port for incoming packets. * Local fax sends OK and Asterisk sends OK to the remote fax. * Remote fax sends t38 packets which are dropped by the firewall. * Local fax re-sends t38 no-signal with the same sequence number. * udptl drops the frame because it thinks it's a dup. * Still no outgoing packets to open the firewall. * t38 negotiation fails. The patch drops frames t38 received before udptl sequence processing when the call hasn't been answered yet. The second no-signal frame is then seen as new and is relayed out the external interface which opens the port and allows negotiation to continue. ASTERISK-26034 #close Change-Id: I11744b39748bd2ecbbe8ea84cdb4f3c5943c5af9
2016-02-03AST-2016-003 udptl.c: Fix uninitialized values.Richard Mudgett
Sending UDPTL packets to Asterisk with the right amount of missing sequence numbers and enough redundant 0-length IFP packets, can make Asterisk crash. ASTERISK-25603 #close Reported by: Walter Doekes ASTERISK-25742 #close Reported by: Torrey Searle Change-Id: I97df8375041be986f3f266ac1946a538023a5255
2015-04-13git migration: Refactor the ASTERISK_FILE_VERSION macroMatt Jordan
Git does not support the ability to replace a token with a version string during check-in. While it does have support for replacing a token on clone, this is somewhat sub-optimal: the token is replaced with the object hash, which is not particularly easy for human consumption. What's more, in practice, the source file version was often not terribly useful. Generally, when triaging bugs, the overall version of Asterisk is far more useful than an individual SVN version of a file. As a result, this patch removes Asterisk's support for showing source file versions. Specifically, it does the following: * Rename ASTERISK_FILE_VERSION macro to ASTERISK_REGISTER_FILE, and remove passing the version in with the macro. Other facilities than 'core show file version' make use of the file names, such as setting a debug level only on a specific file. As such, the act of registering source files with the Asterisk core still has use. The macro rename now reflects the new macro purpose. * main/asterisk: - Refactor the file_version structure to reflect that it no longer tracks a version field. - Remove the "core show file version" CLI command. Without the file version, it is no longer useful. - Remove the ast_file_version_find function. The file version is no longer tracked. - Rename ast_register_file_version/ast_unregister_file_version to ast_register_file/ast_unregister_file, respectively. * main/manager: Remove value from the Version key of the ModuleCheck Action. The actual key itself has not been removed, as doing so would absolutely constitute a backwards incompatible change. However, since the file version is no longer tracked, there is no need to attempt to include it in the Version key. * UPGRADE: Add notes for: - Modification to the ModuleCheck AMI Action - Removal of the "core show file version" CLI command Change-Id: I6cf0ff280e1668bf4957dc21f32a5ff43444a40e
2015-04-09clang compiler warnings: Fix autological comparisonsMatthew Jordan
This fixes autological comparison warnings in the following: * chan_skinny: letohl may return a signed or unsigned value, depending on the macro chosen * func_curl: Provide a specific cast to CURLoption to prevent mismatch * cel: Fix enum comparisons where the enum can never be negative * enum: Fix comparison of return result of dn_expand, which returns a signed int value * event: Fix enum comparisons where the enum can never be negative * indications: tone_data.freq1 and freq2 are unsigned, and hence can never be negative * presencestate: Use the actual enum value for INVALID state * security_events: Fix enum comparisons where the enum can never be negative * udptl: Don't bother to check if the return value from encode_length is less than 0, as it returns an unsigned int * translate: Since the parameters are unsigned int, don't bother checking to see if they are negative. The cast to unsigned int would already blow past the matrix bounds. * res_pjsip_exten_state: Use a temporary value to cache the return of ast_hint_presence_state * res_stasis_playback: Fix enum comparisons where the enum can never be negative * res_stasis_recording: Add an enum value for the case where the recording operation is in error; fix enum comparisons * resource_bridges: Use enum value as opposed to -1 * resource_channels: Use enum value as opposed to -1 Review: https://reviewboard.asterisk.org/r/4533 ASTERISK-24917 Reported by: dkdegroot patches: rb4533.patch submitted by dkdegroot (License 6600) ........ Merged revisions 434469 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 434470 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@434471 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2015-03-26Replace most uses of ast_register_atexit with ast_register_cleanup.Corey Farrell
Since 'core stop now' and 'core restart now' do not stop modules, it is unsafe for most of the core to run cleanups. Originally all cleanups used ast_register_atexit, and were only changed when it was shown to be unsafe. ast_register_atexit is now used only when absolutely required to prevent corruption and close child processes. Exceptions that need to use ast_register_atexit: * CDR: Flush records. * res_musiconhold: Kill external applications. * AstDB: Close the DB. * canary_exit: Kill canary process. ASTERISK-24142 #close Reported by: David Brillert ASTERISK-24683 #close Reported by: Peter Katzmann ASTERISK-24805 #close Reported by: Badalian Vyacheslav ASTERISK-24881 #close Reported by: Corey Farrell Review: https://reviewboard.asterisk.org/r/4500/ Review: https://reviewboard.asterisk.org/r/4501/ ........ Merged revisions 433495 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 433497 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@433498 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-12-17Fix printf problems with high ascii characters after r413586 (1.8).Walter Doekes
In r413586 (1.8) various casts were added to silence gcc 4.10 warnings. Those fixes included things like: -out += sprintf(out, "%%%02X", (unsigned char) *ptr); +out += sprintf(out, "%%%02X", (unsigned) *ptr); That works for low ascii characters, but for the high range that yields e.g. FFFFFFC3 when C3 is expected. This changeset: - fixes those casts to use the 'hh' unsigned char modifier instead - consistently uses %02x instead of %2.2x (or other non-standard usage) - adds a few 'h' modifiers in various places - fixes a 'replcaes' typo - dev/urandon typo (in 13+ patch) Review: https://reviewboard.asterisk.org/r/4263/ ASTERISK-24619 #close Reported by: Stefan27 (on IRC) ........ Merged revisions 429673 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 429674 from http://svn.asterisk.org/svn/asterisk/branches/12 ........ Merged revisions 429675 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@429683 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-06-26udptl: Correct FEC to not consider negative sequence numbers as missingMatthew Jordan
When using FEC, with span=3 and entries=4 Asterisk will attempt to repair the packet with sequence number 5, as it will see that packet -4 is missing. The result is Asterisk sending garbage packets that can kill a fax. This patch adds a check to see if the sequence number is valid before checking if the packet is missing. Review: https://reviewboard.asterisk.org/r/3657/ #ASTERISK-23908 #close Reported by: Torrey Searle patches: udptl_fec.patch uploaded by Torrey Searle (License 5334) ........ Merged revisions 417318 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 417320 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 417324 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@417327 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-05-09Allow Asterisk to compile under GCC 4.10Kinsey Moore
This resolves a large number of compiler warnings from GCC 4.10 which cause the build to fail under dev mode. The vast majority are signed/unsigned mismatches in printf-style format strings. ........ Merged revisions 413586 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 413587 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 413588 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@413589 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-30res_rtp_asterisk & udptl: fix port selection to work with SELinux restrictionsCorey Farrell
ast_bind to a port reserved for another program by SELinux causes errno == EACCES. This caused random failures when binding rtp or udptl sockets. Treat EACCES as a non-fatal error, try next port. (closes issue ASTERISK-23134) Reported by: Corey Farrell ........ Merged revisions 406933 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 406934 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 406935 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@406936 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-19udptl: Dead code elimination. ast_udptl_bridge was not used.Richard Mudgett
Removing dead code starting with ast_udptl_bridge() eliminated the code in this change. Note: This code has actually been dead since Asterisk v1.4 when it was first put in. Review: https://reviewboard.asterisk.org/r/3079/ ........ Merged revisions 404354 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@404355 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-06astobj2: Add warn unused attribute to some functions.Richard Mudgett
* Fixed resulting warnings with improper use of ao2_global_obj_replace(). * Made a couple uses of ao2_global_obj_replace_unref(x, NULL) into the equivalent and more appropriate ao2_global_obj_release() call. ........ Merged revisions 398533 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@398557 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-30features_config: Don't require features.conf to be present for Asterisk to loadJonathan Rose
(closes issue ASTERISK-22426) Reported by: Matt Jordan Review: https://reviewboard.asterisk.org/r/2806/ ........ Merged revisions 398020 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@398064 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-21UDPTL: Fix a regression where UDPTL won't load default settingsJonathan Rose
If the file udptl.conf is unavailable at startup, UDPTL will fail to initialize and while it makes some noise, it isn't immediately obvious why consumers start to fail when using it. This patch makes UDPTL load as though an empty config was provided when udptl is unavailable at startup. (closes issue ASTERISK-22349) Reported by: Jonathan Rose Review: https://reviewboard.asterisk.org/r/2773/ ........ Merged revisions 397365 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397366 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-15Add CLI configuration documentationMatthew Jordan
This patch allows a module to define its configuration in XML in source, such that it can be parsed by the XML documentation engine. Documentation is generated in a two-pass approach: 1. The documentation is first generated from the XML pulled from the source 2. The documentation is then enhanced by the registration of configuration options that use the configuration framework This patch include configuration documentation for the following modules: * chan_motif * res_xmpp * app_confbridge * app_skel * udptl Two new CLI commands have been added: * config show help - show configuration help by module, category, and item * xmldoc dump - dump the in-memory representation of the XML documentation to a new XML file. Review: https://reviewboard.asterisk.org/r/2278 Review: https://reviewboard.asterisk.org/r/2058 patches: on review 2058 uploaded by twilson git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@381527 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-09* Found some more places to use ast_channel_lock_both().Richard Mudgett
* Minor optimization in ast_rtp_instance_early_bridge(). git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@378789 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-11Cleanup udptl on exit.Richard Mudgett
* Cleanup CLI commands on exit. (issue ASTERISK-20649) Reported by: Corey Farrell Patches: udptl-shutdown-1_8-10.patch (license #5909) patch uploaded by Corey Farrell udptl-shutdown-11-trunk.patch (license #5909) patch uploaded by Corey Farrell Modified ........ Merged revisions 377847 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 377848 from http://svn.asterisk.org/svn/asterisk/branches/10 ........ Merged revisions 377849 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@377867 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-18Doxygen Updates - Title updateAndrew Latham
Update and extend the configuration_file group and enable linking. Commit other cleanups from multi-version Doxygen testing. Update title that was left behind many years ago. (issue ASTERISK-20259) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@375182 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-02Fix a variety of ref counting issuesMatthew Jordan
This patch resolves a number of ref leaks that occur primarily on Asterisk shutdown. It adds a variety of shutdown routines to core portions of Asterisk such that they can reclaim resources allocate duringd initialization. Review: https://reviewboard.asterisk.org/r/2137 ........ Merged revisions 374177 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 374178 from http://svn.asterisk.org/svn/asterisk/branches/10 ........ Merged revisions 374196 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@374197 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-08-20Ignore recovered zero-length secondary UDPTL packetsKinsey Moore
In some cases, recovering lost packets using the secondary packet recovery mechanism with UDPTL/T.38 can result in the recovery of zero-length packets. These must be ignored or the frame generated from them can cause segfaults and allocation failures. (closes issue ASTERISK-19762) (closes issue ASTERISK-19373) Reported-by: Benjamin (bulkorok) Reported-by: Rob Gagnon (rgagnon) ........ Merged revisions 371544 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 371545 from http://svn.asterisk.org/svn/asterisk/branches/10 ........ Merged revisions 371546 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@371547 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-06-15Multiple revisions 369001-369002Kevin P. Fleming
........ r369001 | kpfleming | 2012-06-15 10:56:08 -0500 (Fri, 15 Jun 2012) | 11 lines Add support-level indications to many more source files. Since we now have tools that scan through the source tree looking for files with specific support levels, we need to ensure that every file that is a component of a 'core' or 'extended' module (or the main Asterisk binary) is explicitly marked with its support level. This patch adds support-level indications to many more source files in tree, but avoids adding them to third-party libraries that are included in the tree and to source files that don't end up involved in Asterisk itself. ........ r369002 | kpfleming | 2012-06-15 10:57:14 -0500 (Fri, 15 Jun 2012) | 3 lines Add a script to enable finding source files without support-levels defined. ........ Merged revisions 369001-369002 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 369005 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@369013 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-06-07Fix reloading an unchanged file with the Config Options APITerry Wilson
Adding multiple file support broke reloading an unchanged file. This adds an enum for return values for the aco_process_* functions and ensures that the config is not applied if res is not ACO_PROCESS_OK. Review: https://reviewboard.asterisk.org/r/1979/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@368673 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-06-01Add new config-parsing frameworkTerry Wilson
This framework adds a way to register the various options in a config file with Asterisk and to handle loading and reloading of that config in a consistent and atomic manner. Review: https://reviewboard.asterisk.org/r/1873/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@368181 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-22Kill off red blobs in most of main/*Kinsey Moore
Everything still compiled after making these changes, so I assume these whitespace-only changes didn't break anything (and shouldn't have). git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@360190 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-14udptl: Ensure fec[] in udptl_build_packet() is initialized.Russell Bryant
Scan results indicated that this array could be used uninitialized. At a quick look, it looks correct. In any case, initializing it is a Good Thing (tm). ........ Merged revisions 359457 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 359458 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@359459 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-27Prefer ast_set_qos() over ast_netsock_set_qos()Sean Bright
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@356882 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-08Avoid cppcheck warnings; removing unused vars and a bit of cleanup.Walter Doekes
Patch by: Clod Patry Review: https://reviewboard.asterisk.org/r/1651 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@354429 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-07Correct the default udptl port range.Walter Doekes
The udptl port range was defined as 4000-4999 in the udptl.conf.sample, as 4500-4599 if you didn't have a config and 4500-4999 if your config was broken. Default is now 4000-4999. (closes issue ASTERISK-16250) Reviewed by: Tilghman Lesher Review: https://reviewboard.asterisk.org/r/1565 ........ Merged revisions 343580 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@343581 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-10-06Merged revisions 339626 via svnmerge from Richard Mudgett
https://origsvn.digium.com/svn/asterisk/branches/10 ................ r339626 | rmudgett | 2011-10-06 12:53:00 -0500 (Thu, 06 Oct 2011) | 25 lines Merged revisions 339625 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r339625 | rmudgett | 2011-10-06 12:49:38 -0500 (Thu, 06 Oct 2011) | 18 lines Fix debugging messages generated by 'udptl debug'. * Makes chan_sip set the tag to the channel name. * Fixes received debug message sequence number. * Removed tx/rx debug message type since it was hard coded to 0. * Made udptl.c logged message header consistent if possible: "UDPTL (%s): ". * Removed unused rx_expected_seq_no from struct ast_udptl. (closes issue ASTERISK-18401) Reported by: Kevin P. Fleming Patches: jira_asterisk_18401_v1.8.patch (license #5621) patch uploaded by rmudgett Tested by: Matthew Nicholson ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@339627 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-03Merged revisions 316265 via svnmerge from Russell Bryant
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r316265 | russell | 2011-05-03 14:55:49 -0500 (Tue, 03 May 2011) | 5 lines Fix a bunch of compiler warnings generated by gcc 4.6.0. Most of these are -Wunused-but-set-variable, but there were a few others mixed in here, as well. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@316293 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-02-24Merged revisions 308723 via svnmerge from Matthew Nicholson
https://origsvn.digium.com/svn/asterisk/branches/1.8 ................ r308723 | mnicholson | 2011-02-24 09:06:14 -0600 (Thu, 24 Feb 2011) | 16 lines Merged revisions 308722 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.6.2 ................ r308722 | mnicholson | 2011-02-24 08:59:41 -0600 (Thu, 24 Feb 2011) | 9 lines Merged revisions 308721 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r308721 | mnicholson | 2011-02-24 08:54:56 -0600 (Thu, 24 Feb 2011) | 2 lines silence gcc 4.2 compiler warning ........ ................ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@308724 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-02-21Merged revisions 308416 via svnmerge from Matthew Nicholson
https://origsvn.digium.com/svn/asterisk/branches/1.8 ................ r308416 | mnicholson | 2011-02-21 09:02:20 -0600 (Mon, 21 Feb 2011) | 19 lines Merged revisions 308414 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.6.2 ................ r308414 | mnicholson | 2011-02-21 09:00:22 -0600 (Mon, 21 Feb 2011) | 12 lines Merged revisions 308413 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r308413 | mnicholson | 2011-02-21 08:57:15 -0600 (Mon, 21 Feb 2011) | 5 lines Properly check the bounds of arrays when decoding UDPTL packets. Also, remove broken support for receiving UDPTL packets larger than 16k. That shouldn't ever happen anyway. AST-2011-002 FAX-281 ........ ................ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@308417 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
2011-01-26Merged revisions 304250 via svnmerge from Mark Michelson
https://origsvn.digium.com/svn/asterisk/branches/1.6.2 ................ r304250 | mmichelson | 2011-01-26 15:02:10 -0600 (Wed, 26 Jan 2011) | 9 lines Merged revisions 304242 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r304242 | mmichelson | 2011-01-26 14:38:37 -0600 (Wed, 26 Jan 2011) | 3 lines Get rid of unused 'verbose' field in ast_udptl ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@304252 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-07-23Allow IPv6 addresses for UDPTL streams.Mark Michelson
Review: https://reviewboard.asterisk.org/r/795 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@278908 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-05-19fixes infinite loop during udptl.c's decode_open_typeDavid Vossel
When decode_length returns the length there is a check to see if that length is negative, if so the decode loop breaks as this means the limit has been reached. The problem here is that length is an unsigned int, so length can never be negative. This resulted in an infinite loop. (issue #17352) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@264400 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-05-19Cast an unsigned int to a signed int when comparing it with 0.Matthew Nicholson
(AST-377) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@264379 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-02-02fixes crash during T.38 negotiation caused by invalid or missing ↵David Vossel
FaxMaxDatagram field AST-2010-001 (closes issue #16634) Reported by: krn (closes issue #16724) Reported by: barthpbx (closes issue #16517) Reported by: bklang (closes issue #16485) Reported by: elsto git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@244443 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-01-14This change fixes a few bugs in the way the far max IFP was calculated that ↵Matthew Nicholson
were introduced in r231692. (closes issue #16497) Reported by: globalnetinc Patches: udptl-max-ifp-fix1.diff uploaded by mnicholson (license 96) Tested by: globalnetinc git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@240078 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-11-30Another round of UDPTL stack fixes/improvements:Kevin P. Fleming
1) Allow users of UDPTL stack to associate a character-string tag with a UDPTL session, so that log/error/debug messages generated by the UDPTL stack can be 'connected' to the endpoint that caused them to be generated. 2) Improve comments (and process) of calculating the far end's maximum IFP size when redundancy mode is in use for error correction. 3) When an IFP larger than the calculated 'far max IFP' size is presented for writing, truncate it rather than putting in the buffer and allowing the buffer to overflow; this will cause the ends to retrain to a lower bit rate that produces IFPs of an appropriate size if possible, and if not possible, the FAX transfer will fail completely. In these cases, it is due to the one endpoint supplying a T38FaxMaxDatagram value that is improperly calculated and is too low to be of use; we have configuration options available to override this behavior. 4) Eliminate use of T38FaxMaxDatagram value in udptl.conf; it is no longer needed. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@231692 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-10-05Allow non-compliant T.38 endpoints to be supportable via configuration option.Kevin P. Fleming
Many T.38 endpoints incorrectly send the maximum IFP frame size they can accept as the T38FaxMaxDatagram value in their SDP, when in fact this value is supposed to be the maximum UDPTL payload size (datagram size) they can accept. If the value they supply is small enough (a commonly supplied value is '72'), T.38 UDPTL transmissions will likely fail completely because the UDPTL packets will not have enough room for a primary IFP frame and the redundancy used for error correction. If this occurs, the Asterisk UDPTL stack will emit log messages warning that data loss may occur, and that the value may need to be overridden. This patch extends the 't38pt_udptl' configuration option in sip.conf to allow the administrator to override the value supplied by the remote endpoint and supply a value that allows T.38 FAX transmissions to be successful with that endpoint. In addition, in any SIP call where the override takes effect, a debug message will be printed to that effect. This patch also removes the T38FaxMaxDatagram configuration option from udptl.conf.sample, since it has not actually had any effect for a number of releases. In addition, this patch cleans up the T.38 documentation in sip.conf.sample (which incorrectly documented that T.38 support was passthrough only). (issue #15586) Reported by: globalnetinc git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@222110 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-10-01Remove ability to control T.38 FAX error correction from udptl.conf.Kevin P. Fleming
chan_sip has had the ability to control T.38 FAX error correction mode on a per-peer (or global) basis for a couple of releases now, which is where it should have been all along. This patch removes the ability to configure it in udptl.conf, but issues a warning if the user tries to do, telling them to look at sip.conf.sample for how to configure it now. For any SIP peers that are T.38 enabled in sip.conf, there is already a default for FEC error correction even if the user does not specify any mode, so this change will not turn off error correction by default, it will have the same default value that has been in the udptl.conf sample file. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@221592 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-08-07Workaround broken T.38 endpoints that offer tiny MaxDatagram sizes.Kevin P. Fleming
Some T.38 endpoints treat T38FaxMaxDatagram as the maximum IFP size that should be sent to them, rather than the maximum packet payload size. If such an endpoint also requests UDPRedundancy as the error correction mode, we'll end up calculating a tiny maximum IFP size, so small as to be unusable. This patch sets a lower bound on what we'll consider the remote's maximum IFP size to be, assuming that endpoints that do this really can accept larger packets than they've offered to accept. (closes issue #15649) Reported by: dazza76 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@210992 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-07-27Merged revisions 209131 via svnmerge from Mark Michelson
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r209131 | mmichelson | 2009-07-27 12:44:06 -0500 (Mon, 27 Jul 2009) | 18 lines Allow for UDPTL to use only even-numbered ports if desired. There are some VoIP providers out there that will not accept SDP offers with odd numbered UDPTL ports. While it is my personal opinion that these VoIP providers are misinterpreting RFC 2327, it really is not a big deal to play along with their silly little games. Of course, since restricting UDPTL ports to only even numbers reduces the range of available ports by half, so the option to use only even port numbers is off by default. A user can enable the behavior by setting use_even_ports=yes in udptl.conf. (closes issue #15182) Reported by: CGMChris Patches: 15182.patch uploaded by mmichelson (license 60) Tested by: CGMChris ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@209132 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-07-24Resolve a T.38 negotiation issue left over from the udptl-updates merge.Kevin P. Fleming
The udptl-updates branch that was merged yesterday failed to properly send back T.38 SDP responses with the correct error correction mode, if the incoming SDP from the other end caused us to change error correction modes. This patch corrects that situation. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@208548 65c4cc65-6c06-0410-ace0-fbb531ad65f3