summaryrefslogtreecommitdiff
path: root/channels/misdn
AgeCommit message (Collapse)Author
2017-12-22Remove as much trailing whitespace as possible.Sean Bright
Change-Id: I873c1c6d00f447269bd841494459efccdd2c19c0
2015-07-04Makefile: Remove coverage files on 'make clean'Matt Jordan
This patch updates a variety of Makefiles in Asterisk's build system to remove .gcda and .gcno files when 'make clean' is executed. These files are generated when '--enable-coverage' is passed to the Asterisk configure script. Change-Id: Ib70b41eea2ee2908885bff02e80faf9f40c84602
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
2013-05-10Allow mISDN to send PROGRESS messsage.Richard Mudgett
* Made isdn_msg_parser.c build a progress message with the mandatory progress indicator IE. (The mISDNuser NT state machine rejected sending the incomplete message.) Note: The associated mISDN and mISDNuser patches respectively are viewable here: http://svnview.digium.com/svn/thirdparty?view=rev&rev=200 http://svnview.digium.com/svn/thirdparty?view=rev&rev=201 (closes issue AST-1153) Reported by: Guenther Kelleter Patches: progress-chan_misdn.diff (license #6372) patch uploaded by Guenther Kelleter progress-misdn.diff (license #6372) mISDN patch uploaded by Guenther Kelleter progress-misdnuser.diff (license #6372) mISDNuser patch uploaded by Guenther Kelleter ........ Merged revisions 388425 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 388426 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@388427 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-11-30chan_misdn: Fix sending RELEASE_COMPLETE in response to SETUP.Richard Mudgett
Fix sending a RELEASE_COMPLETE in response to a SETUP if chan_misdn does not have a B channel available to assign to the call. (closes issue ABE-2869) Reported by: Guenther Kelleter Patches: setup-reject_2.diff (license #6372) patch uploaded by Guenther Kelleter Modified ........ Merged revision 376949 from https://origsvn.digium.com/svn/asterisk/be/branches/C.3-bier ........ Merged revisions 376950 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 376951 from http://svn.asterisk.org/svn/asterisk/branches/10 ........ Merged revisions 376952 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@376953 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-11-02Multiple revisions 375519-375524Richard Mudgett
........ r375519 | rmudgett | 2012-10-30 16:06:15 -0500 (Tue, 30 Oct 2012) | 11 lines chan_misdn: Timer primitives must be handled first. The frm->addr is a different "address space" than the stack/instance address of other Lx primitives. The test for B channel instance address could fail. Patches: patch01_timers.diff (license #6372) patch uploaded by Guenther Kelleter JIRA ABE-2888 ........ r375520 | rmudgett | 2012-10-30 16:14:58 -0500 (Tue, 30 Oct 2012) | 10 lines chan_misdn: Free memory in error paths and other memory leaks. The one line commented with BUG is not easily fixable because there is no de-init function one can call. Patches: patch02_memory.diff (license #6372) patch uploaded by Guenther Kelleter JIRA ABE-2888 ........ r375521 | rmudgett | 2012-10-30 16:38:41 -0500 (Tue, 30 Oct 2012) | 14 lines chan_misdn: ISDN NT L2 de-establish/establish * An NT-PTMP cannot de/establish L2 since it doesn't know the TEIs. * On NT-PTP L2 is started when L1 is finally active in handle_l1. * L2 deactivation logging cleanup. * L2 aggregate link status is unknown for NT-PTMP, show as "UNKN". * Removed unused functions and code for L2 handling. Patches: patch03_L2estab.diff (license #6372) patch uploaded by Guenther Kelleter Modified JIRA ABE-2888 ........ r375522 | rmudgett | 2012-10-30 16:56:14 -0500 (Tue, 30 Oct 2012) | 22 lines chan_misdn: Fix broken upper_id/lower_id usage. Sending PH prim via lower_id layer (3 or 1) simply does not work. For TE (3) it returns an error (len=-6) which is not evaluated by handle_l1(), so the L1 layer status ends up wrong. Instead PH must be sent via L4, only then does it reach L1 without an error message. And NT PH prims only reach L1 when they are sent to layer 2 id. --> use upper_id to send PH primitives. * Check for errors in PH_(DE)ACTIVATE | CONFIRM. * Debug messages are improved. * The lower_id is now not used for anything, except: Why is lower_id layer deleted when it wasn't created? I removed this code since it looks very wrong. Patches: patch04_l1activation.diff (license #6372) patch uploaded by Guenther Kelleter JIRA ABE-2888 ........ r375523 | rmudgett | 2012-10-30 17:29:15 -0500 (Tue, 30 Oct 2012) | 31 lines chan_misdn: Fix loss of B channels if L1 is down. If you make 2 calls out an NT PTMP port which is not connected to any phone, the B channel associated with that call becomes unusable until Asterisk is restarted. The problem is the EVENT_SETUP is queued when L1 is not up in misdn_lib_send_event(). If L1 cannot be activated the event won't be dequeued. It gets even worse when the call is hung up. The queued EVENT_SETUP will be overwritten by an EVENT_DISCONNECT. The reserved B channel then will never be freed. If later someone connects a phone to the port, L1 will eventually activate and the queued EVENT_DISCONNECT is sent down the stack. However, it is ignored because it is the wrong call state. The real fix would be that activation and queueing for a new SETUP is done by the NT stack. But since it doesn't, the workaround must be removed because it doesn't always work. Fix: The event is no longer queued but immediately sent to the stack. If L1 cannot be activated, the L3 state machine that was started by the EVENT_SETUP will do its work, i.e. a timeout will release the B channel properly. The SETUP possibly cannot be sent the first time but is resent by T303 in case L1 could be activated. Patches: patch05_bchan-loss.diff (license #6372) patch uploaded by Guenther Kelleter Modified JIRA ABE-2888 ........ r375524 | rmudgett | 2012-10-30 18:26:05 -0500 (Tue, 30 Oct 2012) | 13 lines chan_misdn: Remove some calls to exit(). Try proper cleanup when something goes wrong in misdn_lib_init(). Especially do not call exit()! * Fix memory leak because stack_destroy() does not free the stack struct. Patches: patch06_cleanup-init.diff (license #6372) patch uploaded by Guenther Kelleter Modified JIRA ABE-2888 ........ Merged revisions 375519-375524 from https://origsvn.digium.com/svn/asterisk/be/branches/C.3-bier ........ Merged revisions 375625 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 375626 from http://svn.asterisk.org/svn/asterisk/branches/10 ........ Merged revisions 375627 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@375628 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-05Merged revisions 374515-374535 fromRichard Mudgett
https://origsvn.digium.com/svn/asterisk/be/branches/C.3-bier ................ r374515 | rmudgett | 2012-10-04 17:52:36 -0500 (Thu, 04 Oct 2012) | 10 lines chan_misdn: Remove some deadcode * Made setup_bc() static. Patches: patch1_unused-code.diff (license #6372) patch uploaded by Guenther Kelleter Modified JIRA ABE-2882 ................ r374516 | rmudgett | 2012-10-04 18:01:01 -0500 (Thu, 04 Oct 2012) | 7 lines chan_misdn: Remove unused bchan states Patches: patch2_unused-states.diff (license #6372) patch uploaded by Guenther Kelleter JIRA ABE-2882 ................ r374517 | rmudgett | 2012-10-04 18:17:51 -0500 (Thu, 04 Oct 2012) | 16 lines chan_misdn: Remove unnecessary null pointer checks and checks for stack->nt * cleanup_bc() is always called with valid bc (or it would've crashed before). * Value of stack->nt is known in advance at some places. * Rename handle_event() to handle_event_te(), handle_frm() to handle_frm_te(). Patches: patch3_checks.diff (license #6372) patch uploaded by Guenther Kelleter Modified JIRA ABE-2882 ................ r374518 | rmudgett | 2012-10-04 18:21:59 -0500 (Thu, 04 Oct 2012) | 7 lines chan_misdn: Fix spelling in log messages Patches: patch4_spelling.diff (license #6372) patch uploaded by Guenther Kelleter JIRA ABE-2882 ................ r374519 | rmudgett | 2012-10-04 18:31:59 -0500 (Thu, 04 Oct 2012) | 15 lines chan_misdn: Don't cleanup a bc twice. In handle_frm_te() after calling misdn_lib_send_event(bc, EVENT_RELEASE_COMPLETE) bc is emptied, cleaned and set not in use, although misdn_lib_send_event() already did the same. This is bad. When it's not in use we are not allowed to touch it. * Moved log message in front of the resulting actions and fixed it to match the case. Patches: patch5_bccleanup.diff (license #6372) patch uploaded by Guenther Kelleter JIRA ABE-2882 ................ r374520 | rmudgett | 2012-10-04 18:43:56 -0500 (Thu, 04 Oct 2012) | 12 lines chan_misdn: Fix memory leaks, bc, chan not cleaned up etc., really bad stuff. * Fix return codes of cb_events() for EVENT_SETUP to use caller's cleanup mechanisms. * Move cl_queue_chan() call after bearer check. Patches: patch6_leaks.diff (license #6372) patch uploaded by Guenther Kelleter JIRA ABE-2882 ................ r374521 | rmudgett | 2012-10-04 18:48:38 -0500 (Thu, 04 Oct 2012) | 11 lines chan_misdn: We must initialize cause on sending a DISCONNECT. We must initialize cause on sending a DISCONNECT, so it is later correctly indicated to ast_channel in case the answer (RELEASE/RELEASE_COMPLETE) does not include one. Patches: patch7_hangupcause.diff (license #6372) patch uploaded by Guenther Kelleter JIRA ABE-2882 ................ r374522 | rmudgett | 2012-10-04 19:03:56 -0500 (Thu, 04 Oct 2012) | 7 lines chan_misdn: Remove unused code for upqueue Patches: patch8_unused-upqueue.diff (license #6372) patch uploaded by Guenther Kelleter JIRA ABE-2882 ................ r374523 | rmudgett | 2012-10-04 19:11:50 -0500 (Thu, 04 Oct 2012) | 7 lines chan_misdn: Improve debugging (port number, messages fixed, dups removed) Patches: patch9_debug.diff (license #6372) patch uploaded by Guenther Kelleter JIRA ABE-2882 ................ r374533 | rmudgett | 2012-10-05 12:17:18 -0500 (Fri, 05 Oct 2012) | 8 lines chan_misdn: Better debug: we can print_bc_info even if there's no ast leg. Patches: patch10_debug-bc-2.diff (license #6372) patch uploaded by Guenther Kelleter Modified. JIRA ABE-2882 ................ r374534 | rmudgett | 2012-10-05 12:34:10 -0500 (Fri, 05 Oct 2012) | 16 lines chan_misdn: setup_bc() is called too early for an incoming SETUP on TE. This prevents the B channel from being setup for HDLC mode when requested by the bearer capability and config option hdlc=yes. It violates ETS300102 Ch.5.2.3.2: "The user, in any case, must not connect to the channel until a CONNECT ACKNOWLEDGE message has been received." * Call setup_bc() on receipt of CONNECT_ACKNOWLEGDE for PTMP, and on first response to SETUP for PTP. Patches: abe-2881-2.diff (license #6372) patch uploaded by Guenther Kelleter Modified. JIRA ABE-2881 ................ r374535 | rmudgett | 2012-10-05 12:41:05 -0500 (Fri, 05 Oct 2012) | 2 lines chan_misdn: Remove some more deadcode. ................ ........ Merged revisions 374536 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 374537 from http://svn.asterisk.org/svn/asterisk/branches/10 ........ Merged revisions 374538 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@374539 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-08-07Add named callgroups/pickupgroupsMatthew Jordan
This patch adds named calledgroups/pickupgroups to Asterisk. Named groups are implemented in parallel to the existing numbered callgroup/pickupgroup implementation. However, unlike the existing implementation, which is limited to a maximum of 64 defined groups, the number of defined groups allowed for named callgroups/pickupgroups is effectively unlimited. Named groups are configured with the keywords "namedcallgroup" and "namedpickupgroup". This corresponds to the numbered group definitions of "callgroup" and "pickupgroup". Note that as the implementation of named groups coexists with the existing numbered implementation, a defined named group of "4" does not equate to numbered group 4. Support for the named groups has been added to the SIP, DAHDI, and mISDN channel drivers. Review: https://reviewboard.asterisk.org/r/2043 Uploaded by: Guenther Kelleter(license #6372) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@370831 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-02-22Correct some set-but-unused variable warnings in the mISDN library.Kevin P. Fleming
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@356292 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-17Merged revisions 319469 via svnmerge from Richard Mudgett
https://origsvn.digium.com/svn/asterisk/branches/1.8 ................ r319469 | rmudgett | 2011-05-17 16:57:56 -0500 (Tue, 17 May 2011) | 22 lines Merged revision 319468 from https://origsvn.digium.com/svn/asterisk/be/branches/C.3-bier .......... r319468 | rmudgett | 2011-05-17 16:49:31 -0500 (Tue, 17 May 2011) | 15 lines The mISDN HDLC mode is prevented on dialed channels. The use of mISDN HDLC mode is prevented if the mISDN dial technology option 'h1' is used when config option astdtmf=yes. There is a bug in channels/misdn/isdn_lib.c which prevents the use of HDLC mode. Instead of setting the channel to HDLC mode it is set to transparent(no dsp, no hdlc), although hdlc is not "no hdlc". I.e the logging message is correct, but the if condition is not. Make check the nodsp and hdlc flags. JIRA ABE-2787 JIRA SWP-3437 .......... ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@319471 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-11-29Merged revisions 296582 via svnmerge from Richard Mudgett
https://origsvn.digium.com/svn/asterisk/branches/1.8 ................ r296582 | rmudgett | 2010-11-29 14:46:03 -0600 (Mon, 29 Nov 2010) | 24 lines Merged revision 296575 from https://origsvn.digium.com/svn/asterisk/be/branches/C.3-bier .......... r296575 | rmudgett | 2010-11-29 14:27:37 -0600 (Mon, 29 Nov 2010) | 13 lines Invalid mISDN PTMP redirecting signaling as TE towards NT. The mISDN PTMP redirection signaling (NOTIFY redirecting number and notification code, SETUP redirecting number) is also sent in PTMP/TE mode. It should only apply in PTMP/NT mode. The call setup proceeds but the network (Deutsche Telekom) reacts with ugly ISDN STATUS messages. Also don't send the redirecting number ie when PTP is also sending the DivertingLegInformation2 facility. The redirecting number ie is redundant and the network (Deutsche Telekom) complains about it. Patches: abe_2651_v4.patch uploaded by rmudgett (license 664) JIRA ABE-2651 JIRA SWP-2537 .......... ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@296585 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-10-21Merged revisions 292667 via svnmerge from Tilghman Lesher
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r292667 | tilghman | 2010-10-21 17:09:25 -0500 (Thu, 21 Oct 2010) | 2 lines Compile correctly on Linux (asterisk/localtime.h depends upon asterisk/autoconfig.h loading first). ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@292668 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-09-15Merged revisions 287017 via svnmerge from Richard Mudgett
https://origsvn.digium.com/svn/asterisk/branches/1.8 ................ r287017 | rmudgett | 2010-09-15 15:53:38 -0500 (Wed, 15 Sep 2010) | 65 lines Merged revision 287014 from https://origsvn.digium.com/svn/asterisk/be/branches/C.3-bier .......... r287014 | rmudgett | 2010-09-15 15:32:24 -0500 (Wed, 15 Sep 2010) | 58 lines The handling of call transfer signaling for mISDN PTMP is not fully implemented. The handling of call transfer signaling for mISDN PTMP is not fully implemented. The signaling of number updates with ISDN/DSS1 ECT supplementary services (ETS 300 369-1) comes along with a notification indicator IE and redirection number IE for PTMP. The implementation in the current Asterisk mISDN channel unfortunately can handle these information elements only in a NOTIFY message. These information elements are also signaled in a FACILTY message with a RequestSubaddress facility, when the subscriber is already in the active state (see 9.2.4 and 9.2.5 of ETS 300 369-1). ********** abe_2526_ast.patch * Added support to handle the notification indicator IE and redirection number IE with the RequestSubaddress facility. * Made misdn_update_connected_line() send a NOTIFY message if Asterisk originated the call and it is not connected yet. * Made misdn_update_connected_line() send a FACILITY message if the call is already connected. This patch requires the presence of the associated mISDN patches to compile. I had to enhance mISDN to allow the notification indicator IE and the redirection number IE to be used with a FACILITY message. Earlier versions of the Digium enhanced mISDN are no longer going to work. ********** abe_2526_misdn.patch * Made an incoming FACILITY message allow the presence of the notification indicator IE and the redirection number IE. ********** abe_2526_misdnuser_v3.patch * Added support to send and receive a FACILITY message with the notification indicator IE and the redirection number IE. * Added the ability to send a NOTIFY message in PTMP/NT mode to all responding subcalls in Q.931 states 6, 7, 8, 9, and 25. ********** Patches: abe_2526_ast.patch uploaded by rmudgett (license 664) abe_2526_misdn.patch uploaded by rmudgett (license 664) abe_2526_misdnuser_v3.patch uploaded by rmudgett (license 664) Tested by: rmudgett and reporter JIRA SWP-2146 JIRA ABE-2526 .......... ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@287018 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-05-17Enhancements to connected line and redirecting work.Mark Michelson
From reviewboard: Digium has a commercial customer who has made extensive use of the connected party and redirecting information present in later versions of Asterisk Business Edition and which is to be in the upcoming 1.8 release. Through their use of the feature, new problems and solutions have come about. This patch adds several enhancements to maximize usage of the connected party and redirecting information functionality. First, Asterisk trunk already had connected line interception macros. These macros allow you to manipulate connected line information before it was sent out to its target. This patch adds the same feature except for redirecting information instead. Second, the ast_callerid and ast_party_id structures have been enhanced to provide a "tag." This tag can be set with func_callerid, func_connectedline, func_redirecting, and in the case of DAHDI, mISDN, and SIP channels, can be set in a configuration file. The idea behind the callerid tag is that it can be set to whatever value the administrator likes. Later, when running connected line and redirecting macros, the admin can read the tag off the appropriate structure to determine what action to take. You can think of this sort of like a channel variable, except that instead of having the variable associated with a channel, the variable is associated with a specific identity within Asterisk. Third, app_dial has two new options, s and u. The s option lets a dialplan writer force a specific caller ID tag to be placed on the outgoing channel. The u option allows the dialplan writer to force a specific calling presentation value on the outgoing channel. Fourth, there is a new control frame subclass called AST_CONTROL_READ_ACTION added. This was added to correct a very specific situation. In the case of SIP semi-attended (blond) transfers, the party being transferred would not have the opportunity to run a connected line interception macro to possibly alter the transfer target's connected line information. The issue here was that during a blond transfer, the SIP transfer code has no bridged channel on which to queue the connected line update. The way this was corrected was to add this new control frame subclass. Now, we queue an AST_CONTROL_READ_ACTION frame on the channel on which the connected line interception macro should be run. When ast_read is called to read the frame, ast_read responds by calling a callback function associated with the specific read action the control frame describes. In this case, the action taken is to run the connected line interception macro on the transferee's channel. Review: https://reviewboard.asterisk.org/r/652/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@263541 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-10-02Whitespace change.Richard Mudgett
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@221881 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-10-02Whitespace change.Richard Mudgett
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@221880 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-10-02Merged revisions 221769 via svnmerge from Richard Mudgett
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r221769 | rmudgett | 2009-10-01 18:18:28 -0500 (Thu, 01 Oct 2009) | 26 lines Occasionally losing use of B channels in chan_misdn. I have not been able to reproduce the problem of losing channels. However, I have seen in the code a reentrancy problem that might give these symptoms. The reentrancy patch does several things: 1) Guards B channel and B channel structure allocation. 2) Makes the B channel structure find routines more precise in locating records. 3) Never leave a B channel allocated if we received cause 44. The last item may cause temporary outgoing call problems, but they should clear when the line becomes idle. (closes issue #15490) Reported by: slutec18 Patches: issue15490_channel_alloc_reentrancy.patch uploaded by rmudgett (license 664) Tested by: rmudgett, slutec18 (closes issue #15458) Reported by: FabienToune Patches: issue15458_channel_alloc_reentrancy.patch uploaded by rmudgett (license 664) Tested by: FabienToune, rmudgett, slutec18 ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@221844 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-08-18Merged revisions 212727 via svnmerge from Richard Mudgett
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r212727 | rmudgett | 2009-08-18 11:00:56 -0500 (Tue, 18 Aug 2009) | 1 line Removed some deadwood and added some doxygen comments. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@212758 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-08-01Merged revisions 209759 via svnmerge from Kevin P. Fleming
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r209759 | kpfleming | 2009-07-31 19:52:00 -0500 (Fri, 31 Jul 2009) | 7 lines Minor changes inspired by testing with latest GCC. The latest GCC (what will become 4.5.x) has a few new warnings, that in these cases found some either downright buggy code, or at least seriously poorly designed code that could be improved. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@209760 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-07-15Merged revisions 206706 via svnmerge from Richard Mudgett
https://origsvn.digium.com/svn/asterisk/branches/1.4 ................ r206706 | rmudgett | 2009-07-15 15:44:55 -0500 (Wed, 15 Jul 2009) | 26 lines Merged revision 206700 from https://origsvn.digium.com/svn/asterisk/be/branches/C.2-... .......... Fixed chan_misdn crash because mISDNuser library is not thread safe. With Asterisk the mISDNuser library is driven by two threads concurrently: 1. channels/misdn/isdn_lib.c::manager_event_handler() 2. channels/misdn/isdn_lib.c::misdn_lib_isdn_event_catcher() Calls into the library are done concurrently and recursively from isdn_lib.c. Both threads can fiddle with the master/child layer3_proc_t lists. One thread may traverse the list when the other interrupts it and then removes the list element which the first thread was currently handling. This is exactly what caused the crash. About 60 calls were needed to a Gigaset CX475 before it occurred once. This patch adds locking when calling into the mISDNuser library. This also fixes some cb_log calls with wrong port parameter. JIRA ABE-1913 Patches: misdn-locking.patch (Modified with mostly cosmetic changes) .......... ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@206707 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-07-14Merged revisions 206487 via svnmerge from Richard Mudgett
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r206487 | rmudgett | 2009-07-14 11:44:47 -0500 (Tue, 14 Jul 2009) | 28 lines Fixes several call transfer issues with chan_misdn. * issue #14355 - Crash if attempt to transfer a call to an application. Masquerade the other pair of the four asterisk channels involved in the two calls. The held call already must be a bridged call (not an applicaton) or it would have been rejected. * issue #14692 - Held calls are not automatically cleared after transfer. Allow the core to initate disconnect of held calls to the ISDN port. This also fixes a similar case where the party on hold hangs up before being transferred or taken off hold. * JIRA ABE-1903 - Orphaned held calls left in music-on-hold. Do not simply block passing the hangup event on held calls to asterisk core. * Fixed to allow held calls to be transferred to ringing calls. Previously, held calls could only be transferred to connected calls. * Eliminated unused call states to simplify hangup code. * Eliminated most uses of "holded" because it is not a word. (closes issue #14355) (closes issue #14692) Reported by: sodom Patches: misdn_xfer_v14_r205839.patch uploaded by rmudgett (license 664) Tested by: rmudgett ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@206489 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-07-14Merged revisions 206284 via svnmerge from Richard Mudgett
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r206284 | rmudgett | 2009-07-13 19:17:28 -0500 (Mon, 13 Jul 2009) | 4 lines Fix some memory leaks in chan_misdn. JIRA ABE-1911 ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@206341 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-06-18fixes some memory leaks and redundant conditionsDavid Vossel
(closes issue #15269) Reported by: contactmayankjain Patches: patch.txt uploaded by contactmayankjain (license 740) memory_leak_stuff.trunk.diff uploaded by dvossel (license 671) Tested by: contactmayankjain, dvossel git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@201678 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-21Const-ify the world (or at least a good part of it)Kevin P. Fleming
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: https://origsvn.digium.com/svn/asterisk/trunk@196072 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-14Add outgoing_colp misdn.conf port parameter.Richard Mudgett
Select what to do with outgoing COLP information on this port. 0 - Send out COLP information unaltered. (default) 1 - Force COLP to restricted on all outgoing COLP information. 2 - Do not send COLP information. outgoing_colp=0 Also fixed sending the EctInform message so it always has the required redirectionNumber parameter when the status is active. JIRA ABE-1853 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@194479 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-27Make PTP DivertingLegInformation3 message behavior closer to the specifications.Richard Mudgett
* Wait for a DivertingLegInformation3 message after receiving a DivertingLegInformation1 message to complete the redirecting-to information before queuing a redirecting update to the other channel. * A DivertingLegInformation2 message should be responded to with a DivertingLegInformation3 when the COLR is determined. If the call could or does experience another redirection, you should manually determine the COLR to send to the switch by setting REDIRECTING(to-pres) to the COLR and setting REDIRECTING(to-num) = ${EXTEN}. * A DivertingLegInformation2 message must have an original called number if the redirection count is greater than one. Since Asterisk does not keep track of this information, we can only indicate that the number is not available due to interworking. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@190735 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-21Added CCBS/CCNR Party A support and enhanced COLP support.Richard Mudgett
This change adds the following features to chan_misdn: * CCBS/CCNR Party A support for PTMP and PTP modes. * Enhances COLP support for call diversion and explicit call transfer. These enhanced features require a modified version of mISDN. The latest modified mISDN v1.1.x based version is available at: http://svn.digium.com/svn/thirdparty/mISDN/trunk http://svn.digium.com/svn/thirdparty/mISDNuser/trunk Taged versions of the modified mISDN code are available under: http://svn.digium.com/svn/thirdparty/mISDN/tags http://svn.digium.com/svn/thirdparty/mISDNuser/tags Review: http://reviewboard.digium.com/r/218/ Merged from team/rmudgett/misdn_facility branch. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@189735 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-17Merged revisions 188833,189134 via svnmerge from Richard Mudgett
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r188833 | rmudgett | 2009-04-16 16:37:58 -0500 (Thu, 16 Apr 2009) | 4 lines Only disable mISDN DSP if Asterisk DSP is enabled. Leave jitter setting alone. JIRA ABE-1835 ........ r189134 | rmudgett | 2009-04-17 16:27:55 -0500 (Fri, 17 Apr 2009) | 4 lines Modifed/added some debug messages. JIRA ABE-1835 ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@189137 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-10Miscellaneous minor changes to chan_misdn.Richard Mudgett
* Miscellaneous spacing and comment changes. * Minor code rearangements. * Miscellaneous doxygen comments. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@187635 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-03This commit introduces COLP/CONP and Redirecting party information into ↵Mark Michelson
Asterisk. The channel drivers which have been most heavily tested with these enhancements are chan_sip and chan_misdn. Further work is being done to add Q.SIG support and will be introduced in a later commit. chan_skinny has code added to it here, but according to user pj, the support on chan_skinny is not working as of now. This will be fixed in a later commit. A special thanks goes out to bugtracker user gareth for getting the ball rolling and providing the initial support for this work. Without his initial work on this, this would not have been nearly as painless as it was. This functionality has been tested by Digium's product quality department, as well as a customer site running thousands of calls every day. In addition, many many many many bugtracker users have tested this, too. (closes issue #8824) Reported by: gareth Review: http://reviewboard.digium.com/r/201 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@186525 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-30Merged revisions 185120 via svnmerge from Richard Mudgett
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r185120 | rmudgett | 2009-03-30 15:38:11 -0500 (Mon, 30 Mar 2009) | 19 lines Make chan_misdn BRI TE side normally defer channel selection to the NT side. Channel allocation collisions are not handled by chan_misdn very well. This patch simply avoids the problem for BRI only. For PRI, allocation collisions are still possible but less likely since there are simply more channels available and each end could use a different allocation strategy. misdn.conf options available: te_choose_channel - Use to force the TE side to allocate channels. method - Specify the channel allocation strategy. (closes issue #13488) Reported by: Christian_Pinedo Patches: isdn_lib.patch.txt uploaded by crich Tested by: crich, siepkes, festr ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@185122 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-23Removed trailing whitespace in chan_misdn files.Richard Mudgett
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@183831 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-14Merged revisions 168622 via svnmerge from Richard Mudgett
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r168622 | rmudgett | 2009-01-14 15:48:22 -0600 (Wed, 14 Jan 2009) | 4 lines * Fixed create_process() allocation of process ID values. The allocated process IDs could overflow their respective NT and TE fields. Affects outgoing calls. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@168623 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-29we can now build with -Wformat=2, which found a couple of real bugsKevin P. Fleming
because SPRINTF() use non-literal format strings (which cannot be checked), move it into its own module so the rest of func_strings can benefit from format string checking git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@159774 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-20Merged revisions 157859 via svnmerge from Kevin P. Fleming
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r157859 | kpfleming | 2008-11-19 15:34:47 -0600 (Wed, 19 Nov 2008) | 7 lines the gcc optimizer frequently finds broken code (use of uninitalized variables, unreachable code, etc.), which is good. however, developers usually compile with the optimizer turned off, because if they need to debug the resulting code, optimized code makes that process very difficult. this means that we get code changes committed that weren't adequately checked over for these sorts of problems. with this build system change, if (and only if) --enable-dev-mode was used and DONT_OPTIMIZE is turned on, when a source file is compiled it will actually be preprocessed (into a .i or .ii file), then compiled once with optimization (with the result sent to /dev/null) and again without optimization (but only if the first compile succeeded, of course). while making these changes, i did some cleanup work in Makefile.rules to move commonly-used combinations of flag variables into their own variables, to make the file easier to read and maintain ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@157974 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-30fix a few small things found by using sparseKevin P. Fleming
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@152809 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-09-30* Miscellaneous formatting changes to make v1.4 and trunkRichard Mudgett
more merge compatible in the mISDN area. channels/chan_misdn.c * Eliminated redundant code in cb_events() EVENT_SETUP git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@145200 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-18channels/chan_misdn.cRichard Mudgett
* Made bearer2str() use allowed_bearers_array[] * Made use the causes.h defines instead of hardcoded numbers. * Made use Asterisk presentation indicator values if either of the mISDN presentation or screen options are negative. * Updated the misdn_set_opt application option descriptions. * Renamed the awkward Caller ID presentation misdn_set_opt application option value not_screened to restricted. Deprecated the not_screened option value. channels/misdn/isdn_lib.c * Made use the causes.h defines instead of hardcoded numbers. * Fixed some spelling errors and typos. * Added all defined facility code strings to fac2str(). channels/misdn/isdn_lib.h * Added doxygen comments to struct misdn_bchannel. channels/misdn/isdn_lib_intern.h * Added doxygen comments to struct misdn_stack. channels/misdn_config.c configs/misdn.conf.sample * Updated the mISDN presentation and screen parameter descriptions. doc/tex/misdn.tex * Updated the misdn_set_opt application option descriptions. * Fixed some spelling errors and typos. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@138738 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-23use correct function name... please compile with --enable-dev-modeKevin P. Fleming
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@132966 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-23Merged revisions 132826 via svnmerge from Christian Richter
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r132826 | crichter | 2008-07-23 13:37:50 +0200 (Mi, 23 Jul 2008) | 1 line another Fix because of r119585, this commit has broken high frequented BRI Ports, there was a possibility that a channel, that was marked as in_use would be reused later, the corresponding port could got stuck then. So it is recommended to upgrade for chan_misdn users. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@132883 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-14Swap "static" and "const", so that "static" appears at the beginning of eachTilghman Lesher
declaration (suppresses a warning). (closes issue #13070) Reported by: gknispel_proformatique Patches: asterisk_trunk_const_static.patch uploaded by gknispel (license 261) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@130697 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-12Make this build under dev modeRussell Bryant
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@122232 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-11Merged revisions 121751 via svnmerge from Christian Richter
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r121751 | crichter | 2008-06-11 11:28:04 +0200 (Mi, 11 Jun 2008) | 1 line fixed issue with previous commit, the find_free_channel test for channels which where inuse was broken. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@121770 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-02Merged revisions 119636 via svnmerge from Christian Richter
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r119636 | crichter | 2008-06-02 11:29:21 +0200 (Mo, 02 Jun 2008) | 1 line fixed compile issue when dev-mode is enabled ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@119637 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-02Merged revisions 119585 via svnmerge from Christian Richter
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r119585 | crichter | 2008-06-02 10:35:28 +0200 (Mo, 02 Jun 2008) | 1 line Added counter for unhandled_bmsg Print, this prevents the logs to be flooded to fast and save CPU in this error scenario. Added 'last_used' element to bc structure, when a bchannel changes from used to free this exact time will be marked in last_used. When a new channel is requested the find_free_chan function will check if the new empty channel was used within the last second, if yes it will search for the next channel, if no it will return this channel. This simple mechanism has prooven to prevent race conditions where the NT and TE tried to allocate the exact same channel at the same time (RELEASE cause: 44). ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@119586 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-18fix up various warnings found via the addition of format string checking... ↵Kevin P. Fleming
some of these were really, really bad code git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@109475 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-11Merged revisions 107464 via svnmerge from Kevin P. Fleming
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r107464 | kpfleming | 2008-03-11 09:53:03 -0500 (Tue, 11 Mar 2008) | 2 lines fix various other problems found by gcc 4.3 ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@107466 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-15Fix up some doxygen issues.Jason Parker
(closes issue #11996) Patches: bug_11996_doxygen.diff uploaded by snuffy (license 35) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@103723 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-11Doxygen updates, formatting. Olle Johansson
misdn stuff needs a lot of doxygenification (Hello, Qwell :-) ) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@92423 65c4cc65-6c06-0410-ace0-fbb531ad65f3