[asterisk-commits] rmudgett: branch rmudgett/misdn_facility r174038 - in /team/rmudgett/misdn_fa...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Fri Feb 6 12:28:35 CST 2009
Author: rmudgett
Date: Fri Feb 6 12:28:35 2009
New Revision: 174038
URL: http://svn.digium.com/svn-view/asterisk?view=rev&rev=174038
Log:
Merged from
https://origsvn.digium.com/svn/asterisk/be/branches/C.2...
..........
r174037 | rmudgett | 2009-02-06 12:21:58 -0600 (Fri, 06 Feb 2009) | 4 lines
* Added the cc_request_retention option to misdn.conf to allow the
point-to-point call-completion request retention support to be user
configurable.
Modified:
team/rmudgett/misdn_facility/channels/chan_misdn.c
team/rmudgett/misdn_facility/channels/misdn/chan_misdn_config.h
team/rmudgett/misdn_facility/channels/misdn_config.c
team/rmudgett/misdn_facility/configs/misdn.conf.sample
Modified: team/rmudgett/misdn_facility/channels/chan_misdn.c
URL: http://svn.digium.com/svn-view/asterisk/team/rmudgett/misdn_facility/channels/chan_misdn.c?view=diff&rev=174038&r1=174037&r2=174038
==============================================================================
--- team/rmudgett/misdn_facility/channels/chan_misdn.c (original)
+++ team/rmudgett/misdn_facility/channels/chan_misdn.c Fri Feb 6 12:28:35 2009
@@ -33,7 +33,7 @@
* \note
* To use the CCBS/CCNR supplementary service feature and other
* supplementary services using FACILITY messages requires a
- * modified version of mISDN v1.1.8 from:
+ * modified version of mISDN from:
* http://svn.digium.com/svn/thirdparty/mISDN/trunk
* http://svn.digium.com/svn/thirdparty/mISDNuser/trunk
*/
@@ -190,6 +190,12 @@
* NULL if signaling link not established.
*/
struct misdn_bchannel *bc;
+
+ /*!
+ * \brief Nonzero if we requested the request retention option
+ * to be enabled.
+ */
+ int requested_retention;
/*!
* \brief TRUE if the request retention option is enabled.
@@ -9399,8 +9405,10 @@
cc_record->outstanding_message = 0;
cc_record->activated = 1;
cc_record->mode.ptp.retention_enabled =
- bc->fac_in.u.CCBS_T_Request.Component.Result.RetentionSupported
- ? 1 : 0;
+ cc_record->mode.ptp.requested_retention
+ ? bc->fac_in.u.CCBS_T_Request.Component.Result.RetentionSupported
+ ? 1 : 0
+ : 0;
}
ast_mutex_unlock(&misdn_cc_record_lock);
break;
@@ -11208,6 +11216,7 @@
static int misdn_command_cc_request(struct ast_channel *chan, struct misdn_command_args *subcommand, const struct misdn_cc_request *request)
{
unsigned index;
+ int request_retention;
long record_id;
int priority;
char *context;
@@ -11260,6 +11269,10 @@
cc_record->invoke_id = ++misdn_invoke_id;
cc_record->outstanding_message = 1;
cc_record->activation_requested = 1;
+
+ misdn_cfg_get(bc->port, MISDN_CFG_CC_REQUEST_RETENTION,
+ &request_retention, sizeof(request_retention));
+ cc_record->mode.ptp.requested_retention = request_retention;
/* Build message */
bc->fac_out.Function = request->ptp;
@@ -11281,7 +11294,8 @@
bc->fac_out.u.CCBS_T_Request.Component.Invoke.PresentationAllowedIndicatorPresent = 1;
bc->fac_out.u.CCBS_T_Request.Component.Invoke.PresentationAllowedIndicator =
(cc_record->redial.caller.presentation != 0) ? 0 : 1;
- bc->fac_out.u.CCBS_T_Request.Component.Invoke.RetentionSupported = 1;
+ bc->fac_out.u.CCBS_T_Request.Component.Invoke.RetentionSupported =
+ request_retention ? 1 : 0;
/* Send message */
print_facility(&bc->fac_out, bc);
Modified: team/rmudgett/misdn_facility/channels/misdn/chan_misdn_config.h
URL: http://svn.digium.com/svn-view/asterisk/team/rmudgett/misdn_facility/channels/misdn/chan_misdn_config.h?view=diff&rev=174038&r1=174037&r2=174038
==============================================================================
--- team/rmudgett/misdn_facility/channels/misdn/chan_misdn_config.h (original)
+++ team/rmudgett/misdn_facility/channels/misdn/chan_misdn_config.h Fri Feb 6 12:28:35 2009
@@ -65,6 +65,7 @@
MISDN_CFG_EARLY_BCONNECT, /* int (bool) */
MISDN_CFG_INCOMING_EARLY_AUDIO, /* int (bool) */
MISDN_CFG_ECHOCANCEL, /* int */
+ MISDN_CFG_CC_REQUEST_RETENTION,/* bool */
#ifdef MISDN_1_2
MISDN_CFG_PIPELINE, /* char[] */
#endif
Modified: team/rmudgett/misdn_facility/channels/misdn_config.c
URL: http://svn.digium.com/svn-view/asterisk/team/rmudgett/misdn_facility/channels/misdn_config.c?view=diff&rev=174038&r1=174037&r2=174038
==============================================================================
--- team/rmudgett/misdn_facility/channels/misdn_config.c (original)
+++ team/rmudgett/misdn_facility/channels/misdn_config.c Fri Feb 6 12:28:35 2009
@@ -360,6 +360,8 @@
"MSN's for TE ports, listen on those numbers on the above ports, and\n"
"\tindicate the incoming calls to Asterisk.\n"
"\tHere you can give a comma separated list, or simply an '*' for any msn." },
+ { "cc_request_retention", MISDN_CFG_CC_REQUEST_RETENTION, MISDN_CTYPE_BOOL, "yes", NONE,
+ "Enable/Disable call-completion request retention support (ptp)." },
};
static const struct misdn_cfg_spec gen_spec[] = {
Modified: team/rmudgett/misdn_facility/configs/misdn.conf.sample
URL: http://svn.digium.com/svn-view/asterisk/team/rmudgett/misdn_facility/configs/misdn.conf.sample?view=diff&rev=174038&r1=174037&r2=174038
==============================================================================
--- team/rmudgett/misdn_facility/configs/misdn.conf.sample (original)
+++ team/rmudgett/misdn_facility/configs/misdn.conf.sample Fri Feb 6 12:28:35 2009
@@ -458,6 +458,17 @@
;
max_outgoing=-1
+;
+; Enable/disable the call-completion retention option support (ptp only).
+;
+; Note: To use the CCBS/CCNR supplementary service feature and other
+; supplementary services using FACILITY messages requires a
+; modified version of mISDN from:
+; http://svn.digium.com/svn/thirdparty/mISDN/trunk
+; http://svn.digium.com/svn/thirdparty/mISDNuser/trunk
+;
+cc_request_retention=yes
+
[intern]
; define your ports, e.g. 1,2 (depends on mISDN-driver loading order)
ports=1,2
More information about the asterisk-commits
mailing list