summaryrefslogtreecommitdiff
path: root/channels/sig_ss7.c
AgeCommit message (Collapse)Author
2014-06-16chan_dahdi: Adds support for major update to libss7.Richard Mudgett
* SS7 support now requires libss7 v2.0 or later. The new libss7 is not backwards compatible. * Added SS7 support for connected line and redirecting. * Most SS7 CLI commands are reworked as well as new SS7 commands added. See online CLI help. * Added several SS7 config option parameters described in chan_dahdi.conf.sample. * ISUP timer support reworked and now requires explicit configuration. See ss7.timers.sample. Special thanks to Kaloyan Kovachev for his support and persistence in getting the original patch by adomjan updated and ready for release. SS7-27 #close Reported by: adomjan git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@416416 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-07uniqueid: Fix chan_dahdi, sig_pri, sig_ss7, test_cdr, and test_cel compiler ↵Richard Mudgett
errors. (issue ASTERISK-23120) ........ Merged revisions 410171 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@410174 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-02sig_ss7: Fix compiler warnings.Richard Mudgett
........ Merged revisions 400268 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@400269 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-02Reduce channel snapshot creation and publishing by up to 50%.Joshua Colp
This change introduces the ability to stage channel snapshot creation and publishing by suppressing the implicit creation and publishing that some functions have. Once all operations are executed the staging is marked as done and a single snapshot is created and published. Review: https://reviewboard.asterisk.org/r/2889/ ........ Merged revisions 400265 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@400266 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-25chan_dahdi: CLI "core stop gracefully" has needless delay for PRI and SS7.Richard Mudgett
The PRI and SS7 link control threads are not stopped correctly when the chan_dahdi.so module is unloaded. The link control threads pri_dchannel() and ss7_linkset() are not awakened from a poll() to cancel the thread. * Added a SIGURG signal after requesting the thread cancel to break the link control thread poll() immediately. For SS7 it was slightly worse, the link poll() timeout would always be whatever was the last libss7 scheduled event time used. If no libss7 scheduled event was pending, the thread could run more often than necessary. * Set nextms to 60 seconds for the ss7_linkset() poll() if there is no other libss7 scheduled event. ........ Merged revisions 399818 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 399834 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 399842 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@399844 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-27Fix uninitialized value in struct ast_control_pvt_cause_code usage.Richard Mudgett
........ Merged revisions 397744 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 397745 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397746 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-11-08chan_dahdi/SS7: Made reject incoming call for an in-alarm or blocked channel.Richard Mudgett
If a SS7 call comes in requesting a CIC that is in-alarm, the call is accepted and connects if the extension exists in the dialplan. The call does not have any audio. * Made release the call immediately with circuit congestion cause. (closes issue ASTERISK-20204) Reported by: Tuan Le Patches: jira_asterisk_20204_v1.8.patch (license #5621) patch uploaded by rmudgett ........ Merged revisions 376058 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 376059 from http://svn.asterisk.org/svn/asterisk/branches/10 ........ Merged revisions 376060 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@376061 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-15Made companding law for SS7 calls only determined by SS7 signaling type.Richard Mudgett
For SS7, the companding law for a call was chosen inconsistently depending upon ss7type (ITU vs ANSI) and the DAHDI companding default (T1 vs E1). For incoming calls, the companding law was determined by ss7type. For outgoing calls, the companding law was determined by the DAHDI default. With the wrong combination you would get A-law/u-law conflicts. An A-law/u-law conflict sounds like bad static on the line. SS7 ITU signaling with E1 line: ok SS7 ITU signaling with T1 line: noise SS7 ANSI signaling with E1 line: noise SS7 ANSI signaling with T1 line: ok * Fix the companding law used to be determined by the SS7 signaling type only. ........ Merged revisions 373090 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 373101 from http://svn.asterisk.org/svn/asterisk/branches/10 ........ Merged revisions 373107 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@373108 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-08-15Add HANGUPCAUSE information to callee channelsKinsey Moore
This adds HANGUPCAUSE information to called channels so that hangup handlers can, in conjunction with predial dialplan execution, access the hangupcause information when the dialed channel hangs up on a one-to-one basis instead of a many-to-one basis as with HANGUPCAUSE usage on the caller channel. Review: https://reviewboard.asterisk.org/r/2069/ (closes issue ASTERISK-20198) ........ Merged revisions 371258 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@371259 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-08-09Use better libss7 detection test and move libpri compile test.Richard Mudgett
........ Merged revisions 371012 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 371013 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@371030 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-08-08Convert sig_ss7 to use a global callback table.Richard Mudgett
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@370887 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-07-31Clean up and ensure proper usage of alloca()Kinsey Moore
This replaces all calls to alloca() with ast_alloca() which calls gcc's __builtin_alloca() to avoid BSD semantics and removes all NULL checks on memory allocated via ast_alloca() and ast_strdupa(). (closes issue ASTERISK-20125) Review: https://reviewboard.asterisk.org/r/2032/ Patch-by: Walter Doekes (wdoekes) ........ Merged revisions 370642 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 370643 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@370655 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-07-20Add hangupcause translation supportKinsey Moore
The HANGUPCAUSE hash (trunk only) meant to replace SIP_CAUSE has now been replaced with the HANGUPCAUSE and HANGUPCAUSE_KEYS dialplan functions to better facilitate access to the AST_CAUSE translations for technology-specific cause codes. The HangupCauseClear application has also been added to remove this data from the channel. (closes issue SWP-4738) Review: https://reviewboard.asterisk.org/r/2025/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@370316 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-07-06Remove unnecessary generation of informational cause framesKinsey Moore
It is not necessary to generate information cause code frames on every protocol event that occurs. This removes all the instances where the frame was not conveying a cause code and was instead just conveying a protocol-specific message. This also corrects the generation of the message associated with disconnects for MFC/R2 to use the MFC/R2 specific text for the disconnect cause. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@369765 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-06-26Unique Call ID logging Phases III and IVJonathan Rose
Adds call ID logging changes to specific channel drivers that weren't handled handled in phase II of Call ID Logging. Also covers logging for threads for threads created by systems that may be involved with many different calls. Extra special thanks to Richard for rigorous review of chan_dahdi and its various signalling modules. review: https://reviewboard.asterisk.org/r/1927/ review: https://reviewboard.asterisk.org/r/1950/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@369414 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-06-22Add "Who Hung Up?" implementation for DAHDI SS7 subtechnologyKinsey Moore
Testing was done on a local machine to verify that protocol and cause information was being sent properly. Review: https://reviewboard.asterisk.org/r/1955/ (issue SWP-4222) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@369184 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-05-30Fix deadlock when executing CLI "pri show channels" and "ss7 show channels" ↵Richard Mudgett
commands. * Fix sig_pri_lock_owner() to avoid deadlock properly. * Code pri_grab() better. * Fix sig_ss7_lock_owner() to avoid deadlock properly. * Code ss7_grab() better. (closes issue ASTERISK-19854) Reported by: Jaxon Patches: jira_asterisk_19854_v1.8.6.patch (license #5621) patch uploaded by rmudgett (Modified to do the same thing to sig_ss7) Tested by: Jaxon ........ Merged revisions 367976 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 367978 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@367979 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-07Change directly setting _softhangup in sig_ss7.c to use ast_softhangup_nolock().Richard Mudgett
Update to: (issue ASTERISK-19372) ........ Merged revisions 358530 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 358531 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@358532 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-05Drop SS7 call if not connected yet when INCOMPLETE/BUSY/CONGESTION.Richard Mudgett
SS7 is a trunk protocol and should clear a failed call as soon as possible. * Made SS7 hangup a call immediately if it has not connected yet for INCOMPLETE/BUSY/CONGESTION causes. Otherwise, play an appropriate inband tone. (closes issue ASTERISK-19372) Reported by: Igor Nikolaev ........ Merged revisions 358278 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 358284 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@358307 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-05Setup DSP when SS7 call is connected or early media is available.Richard Mudgett
Outgoing SS7 calls fail to detect incoming DTMF so any bridged channel that requires out-of-band DTMF will not work. * Added sig_ss7_open_media() calls at appropriate places in sig_ss7.c. The new call converts conditionaled out unconverted code and shows that the code really did something useful. * Improved some chan_dahdi DTMF debug messages to help track DTMF handling. (closes issue ASTERISK-19312) Reported by: Igor Nikolaev ........ Merged revisions 358260 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 358261 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@358262 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-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-18push 'outgoing' flag from sig_XXX up to chan_dahdiAlec L Davis
'p->outgoing' in chan_dahdi and sig_analog wern't kept in sync, particulary FXS ast_hangup didn't clear the 'outgoing' flag. sig_pri and sig_ss7 were keeping 'outgoing' flag insync. Now provides a callback for all the low level sig_XXX modules. (issue ASTERISK-19316) alecdavis (license 585) Reported by: Jeremy Pepper Tested by: alecdavis Review: https://reviewboard.asterisk.org/r/1747/ ........ Merged revisions 355850 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 355851 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@355852 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-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-10-11Add protection for SS7 channel allocation and better glare handling.Richard Mudgett
* Added a CLI "ss7 show channels" command that might prove useful for future debugging. * Made the incoming SS7 channel event check and gripe message uniform. * Made sure that the DNID string for an incoming call is always initialized. (issue ASTERISK-17966) Reported by: Kenneth Van Velthoven Patches: jira_asterisk_17966_v1.8_glare.patch (license #5621) patch uploaded by rmudgett ........ Merged revisions 340365 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 340366 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@340367 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-09-20Merged revisions 337008 via svnmerge from Richard Mudgett
https://origsvn.digium.com/svn/asterisk/branches/10 ................ r337008 | rmudgett | 2011-09-20 14:12:24 -0500 (Tue, 20 Sep 2011) | 22 lines Merged revisions 337007 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r337007 | rmudgett | 2011-09-20 14:10:30 -0500 (Tue, 20 Sep 2011) | 15 lines Check if a channel was created before using the pointer in sig_ss7_new_ast_channel(). Fixes the crash in ASTERISK-17955 gdb-11918.txt backtrace. * Added some missing libss7 access lock protection. * Prevent cancelling the ss7_linkset() thread at inoportune times just like the pri_dchannel() thread. (issue ASTERISK-17955) Reported by: Ian M Sherman Patches: jira_asterisk_17955_v1.8.patch (license #5621) patch uploaded by rmudgett (attached to related ASTERISK-17966) ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@337009 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-09-20Merged revisions 336978 via svnmerge from Richard Mudgett
https://origsvn.digium.com/svn/asterisk/branches/10 ................ r336978 | rmudgett | 2011-09-20 13:14:40 -0500 (Tue, 20 Sep 2011) | 28 lines Merged revisions 336977 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r336977 | rmudgett | 2011-09-20 13:12:17 -0500 (Tue, 20 Sep 2011) | 21 lines Fix deadlock from not releasing SS7 linkset lock. sig_ss7_hangup() failed to release the SS7 linkset lock if the call had the alreadyhungup flag set. * Made unlock the SS7 linkset lock in sig_ss7_hangup() if the alreadyhungup flag is set. * Made ss7_start_call() not hold any locks while creating the channel for an incoming call to prevent deadlock. * Made ss7_grab() a void function, since it could never fail, to simplify calling code. * Made obtain the channel lock to do softhangup in some places. Patches: jira_ast_668_v1.8.patch (license #5621) patch uploaded by rmudgett JIRA AST-668 ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@336988 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-09-09Merged revisions 335078 via svnmerge from Matthew Jordan
https://origsvn.digium.com/svn/asterisk/branches/10 ................ r335078 | mjordan | 2011-09-09 11:27:01 -0500 (Fri, 09 Sep 2011) | 29 lines Merged revisions 335064 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r335064 | mjordan | 2011-09-09 11:09:09 -0500 (Fri, 09 Sep 2011) | 23 lines Updated SIP 484 handling; added Incomplete control frame When a SIP phone uses the dial application and receives a 484 Address Incomplete response, if overlapped dialing is enabled for SIP, then the 484 Address Incomplete is forwarded back to the SIP phone and the HANGUPCAUSE channel variable is set to 28. Previously, the Incomplete application dialplan logic was automatically triggered; now, explicit dialplan usage of the application is required. Additionally, this patch adds a new AST_CONTOL_FRAME type called AST_CONTROL_INCOMPLETE. If a channel driver receives this control frame, it is an indication that the dialplan expects more digits back from the device. If the device supports overlap dialing it should attempt to notify the device that the dialplan is waiting for more digits; otherwise, it can handle the frame in a manner appropriate to the channel driver. (closes issue ASTERISK-17288) Reported by: Mikael Carlsson Tested by: Matthew Jordan Review: https://reviewboard.asterisk.org/r/1416/ ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@335079 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-10Merged revisions 318499 via svnmerge from Richard Mudgett
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r318499 | rmudgett | 2011-05-10 18:41:08 -0500 (Tue, 10 May 2011) | 15 lines Unable to pickup DAHDI/PRI call because call state is reported as DIALING. The channel state is not updated to RINGING when an ALERTING message is received. Regression caused when sig_pri.c (also sig_ss7.c) extracted from chan_dahdi.c. * Added missing channel state update to RINGING when the AST_CONTROL_RINGING frame is queued for ISDN and SS7. (closes issue #19257) Reported by: alecdavis Patches: issue19257_v1.8_v2.patch uploaded by rmudgett (license 664) Tested by: alecdavis, rmudgett ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@318500 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-04-08Add private lock deadlock avoidance callback to PRI and SS7.Richard Mudgett
Factor out the equivalent function for analog. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@313100 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-01-25Merged revisions 303771 via svnmerge from Richard Mudgett
https://origsvn.digium.com/svn/asterisk/branches/1.8 ................ r303771 | rmudgett | 2011-01-25 11:49:20 -0600 (Tue, 25 Jan 2011) | 54 lines Merged revisions 303769 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.6.2 ................ r303769 | rmudgett | 2011-01-25 11:42:42 -0600 (Tue, 25 Jan 2011) | 47 lines Merged revisions 303765 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r303765 | rmudgett | 2011-01-25 11:36:50 -0600 (Tue, 25 Jan 2011) | 40 lines Sending out unnecessary PROCEEDING messages breaks overlap dialing. Issue #16789 was a good idea. Unfortunately, it breaks overlap dialing through Asterisk. There is not enough information available at this point to know if dialing is complete. The ast_exists_extension(), ast_matchmore_extension(), and ast_canmatch_extension() calls are not adequate to detect a dial through extension pattern of "_9!". Workaround is to use the dialplan Proceeding() application early in non-dial through extensions. * Effectively revert issue #16789. * Allow outgoing overlap dialing to hear dialtone and other early media. A PROGRESS "inband-information is now available" message is now sent after the SETUP_ACKNOWLEDGE message for non-digital calls. An AST_CONTROL_PROGRESS is now generated for incoming SETUP_ACKNOWLEDGE messages for non-digital calls. * Handling of the AST_CONTROL_CONGESTION in chan_dahdi/sig_pri was inconsistent with the cause codes. * Added better protection from sending out of sequence messages by combining several flags into a single enum value representing call progress level. * Added diagnostic messages for deferred overlap digits handling corner cases. (closes issue #17085) Reported by: shawkris (closes issue #18509) Reported by: wimpy Patches: issue18509_early_media_v1.8_v3.patch uploaded by rmudgett (license 664) Expanded upon issue18509_early_media_v1.8_v3.patch to include analog and SS7 because of backporting requirements. Tested by: wimpy, rmudgett ........ ................ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@303772 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-14Expand the caller ANI field to an ast_party_idRichard Mudgett
Expand the ani field in ast_party_caller and ast_party_connected_line to an ast_party_id. This is an extension to the ast_callerid restructuring patch in review: https://reviewboard.asterisk.org/r/702/ Review: https://reviewboard.asterisk.org/r/744/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@276393 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-06-14Extract sig_ss7_init_linkset() to sig_ss7.Richard Mudgett
Also found a place where sig_pri_init_pri() was inlined and called it instead. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@270298 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-06-09Add missing API function to sig_ss7: sig_ss7_fixup().Richard Mudgett
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@269308 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-06-07Extract sig_ss7 out of chan_dahdi.Richard Mudgett
Extract the SS7 specific code out of chan_dahdi like what was done to ISDN/PRI and analog signaling. The new SS7 structures were modeled on sig_pri. The changes to sig_pri are an enhancement and a bug fix made possible because SS7 was extracted. 1) The sig_pri TRANSFERCAPABILITY channel variable should have been set unconditionally in sig_pri_new_ast_channel(). 2) SS7/PRI transfer capability interaction in dahdi_new() fixed because of SS7 extraction. 3) Module ref count error in dahdi_new() if startpbx failed to start the PBX for some reason. Review: https://reviewboard.asterisk.org/r/661/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@268774 65c4cc65-6c06-0410-ace0-fbb531ad65f3