From 245c5d9eb8a3742b31fe08e4d674100fe8292cc0 Mon Sep 17 00:00:00 2001 From: rmudgett Date: Wed, 2 Jun 2010 18:10:15 +0000 Subject: Generic Advice of Charge. Asterisk Generic AOC Representation - Generic AOC encode/decode routines. (Generic AOC must be encoded to be passed on the wire in the AST_CONTROL_AOC frame) - AST_CONTROL_AOC frame type to represent generic encoded AOC data - Manager events for AOC-S, AOC-D, and AOC-E messages Asterisk App Support - app_dial AOC-S pass-through support on call setup - app_queue AOC-S pass-through support on call setup AOC Unit Tests - AOC Unit Tests for encode/decode routines - AOC Unit Test for manager event representation. SIP AOC Support - Pass-through of generic AOC-D and AOC-E messages to snom phones via the snom AOC specification. - Creation of chan_sip page3 flags for the addition of the new 'snom_aoc_enabled' sip.conf option. IAX AOC Support - Natively supports AOC pass-through through the use of the new AST_CONTROL_AOC frame type DAHDI AOC Support - ETSI PRI full AOC Pass-through support - 'aoc_enable' chan_dahdi.conf option for independently enabling pass-through of AOC-S, AOC-D, AOC-E. - 'aoce_delayhangup' option for retrieving AOC-E on disconnect. - DAHDI A() dial string option for requesting AOC services. example usage: ;requests AOC-S, AOC-D, and AOC-E on call setup exten=>1111,1,Dial(DAHDI/g1/1112/A(s,d,e)) Review: https://reviewboard.asterisk.org/r/552/ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@267096 f38db490-d61c-443f-a65b-d21fe96a405b --- channels/chan_dahdi.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'channels/chan_dahdi.c') diff --git a/channels/chan_dahdi.c b/channels/chan_dahdi.c index 2d28c6fb0..926daff73 100644 --- a/channels/chan_dahdi.c +++ b/channels/chan_dahdi.c @@ -11779,6 +11779,10 @@ static struct dahdi_pvt *mkintf(int channel, const struct dahdi_chan_conf *conf, #endif /* defined(HAVE_PRI_CCSS) */ pris[span].pri.transfer = conf->chan.transfer; pris[span].pri.facilityenable = conf->pri.pri.facilityenable; +#if defined(HAVE_PRI_AOC_EVENTS) + pris[span].pri.aoc_passthrough_flag = conf->pri.pri.aoc_passthrough_flag; + pris[span].pri.aoce_delayhangup = conf->pri.pri.aoce_delayhangup; +#endif /* defined(HAVE_PRI_AOC_EVENTS) */ ast_copy_string(pris[span].pri.msn_list, conf->pri.pri.msn_list, sizeof(pris[span].pri.msn_list)); ast_copy_string(pris[span].pri.idledial, conf->pri.pri.idledial, sizeof(pris[span].pri.idledial)); ast_copy_string(pris[span].pri.idleext, conf->pri.pri.idleext, sizeof(pris[span].pri.idleext)); @@ -17195,6 +17199,21 @@ static int process_dahdi(struct dahdi_chan_conf *confp, const char *cat, struct #endif /* PRI_GETSET_TIMERS */ } else if (!strcasecmp(v->name, "facilityenable")) { confp->pri.pri.facilityenable = ast_true(v->value); +#if defined(HAVE_PRI_AOC_EVENTS) + } else if (!strcasecmp(v->name, "aoc_enable")) { + confp->pri.pri.aoc_passthrough_flag = 0; + if (strchr(v->value, 's') || strchr(v->value, 'S')) { + confp->pri.pri.aoc_passthrough_flag |= SIG_PRI_AOC_GRANT_S; + } + if (strchr(v->value, 'd') || strchr(v->value, 'D')) { + confp->pri.pri.aoc_passthrough_flag |= SIG_PRI_AOC_GRANT_D; + } + if (strchr(v->value, 'e') || strchr(v->value, 'E')) { + confp->pri.pri.aoc_passthrough_flag |= SIG_PRI_AOC_GRANT_E; + } + } else if (!strcasecmp(v->name, "aoce_delayhangup")) { + confp->pri.pri.aoce_delayhangup = ast_true(v->value); +#endif /* defined(HAVE_PRI_AOC_EVENTS) */ #if defined(HAVE_PRI_CALL_HOLD) } else if (!strcasecmp(v->name, "hold_disconnect_transfer")) { confp->pri.pri.hold_disconnect_transfer = ast_true(v->value); -- cgit v1.2.3