[asterisk-commits] rmudgett: branch rmudgett/display_text r306671 - in /team/rmudgett/display_te...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Mon Feb 7 16:33:01 CST 2011
Author: rmudgett
Date: Mon Feb 7 16:32:56 2011
New Revision: 306671
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=306671
Log:
Initial MCID pass request to peer.
Modified:
team/rmudgett/display_text/CHANGES
team/rmudgett/display_text/channels/chan_dahdi.c
team/rmudgett/display_text/channels/sig_pri.c
team/rmudgett/display_text/channels/sig_pri.h
team/rmudgett/display_text/configs/chan_dahdi.conf.sample
team/rmudgett/display_text/funcs/func_frame_trace.c
team/rmudgett/display_text/include/asterisk/frame.h
team/rmudgett/display_text/main/channel.c
team/rmudgett/display_text/main/features.c
Modified: team/rmudgett/display_text/CHANGES
URL: http://svnview.digium.com/svn/asterisk/team/rmudgett/display_text/CHANGES?view=diff&rev=306671&r1=306670&r2=306671
==============================================================================
--- team/rmudgett/display_text/CHANGES (original)
+++ team/rmudgett/display_text/CHANGES Mon Feb 7 16:32:56 2011
@@ -52,6 +52,7 @@
* Added display_send and display_receive options to control how the display ie
is handled. To send display text from the dialplan use the SendText()
application when the option is enabled.
+ * Added mcid_send option to allow sending a MCID request on a span.
------------------------------------------------------------------------------
--- Functionality changes from Asterisk 1.6.2 to Asterisk 1.8 ----------------
Modified: team/rmudgett/display_text/channels/chan_dahdi.c
URL: http://svnview.digium.com/svn/asterisk/team/rmudgett/display_text/channels/chan_dahdi.c?view=diff&rev=306671&r1=306670&r2=306671
==============================================================================
--- team/rmudgett/display_text/channels/chan_dahdi.c (original)
+++ team/rmudgett/display_text/channels/chan_dahdi.c Mon Feb 7 16:32:56 2011
@@ -12353,6 +12353,9 @@
pris[span].pri.display_flags_send = conf->pri.pri.display_flags_send;
pris[span].pri.display_flags_receive = conf->pri.pri.display_flags_receive;
#endif /* defined(HAVE_PRI_DISPLAY_TEXT) */
+#if defined(HAVE_PRI_MCID)
+ pris[span].pri.mcid_send = conf->pri.pri.mcid_send;
+#endif /* defined(HAVE_PRI_MCID) */
for (x = 0; x < PRI_MAX_TIMERS; x++) {
pris[span].pri.pritimers[x] = conf->pri.pri.pritimers[x];
@@ -17307,6 +17310,10 @@
} else if (!strcasecmp(v->name, "display_receive")) {
confp->pri.pri.display_flags_receive = dahdi_display_text_option(v->value);
#endif /* defined(HAVE_PRI_DISPLAY_TEXT) */
+#if defined(HAVE_PRI_MCID)
+ } else if (!strcasecmp(v->name, "mcid_send")) {
+ confp->pri.pri.mcid_send = ast_true(v->value);
+#endif /* defined(HAVE_PRI_MCID) */
#endif /* HAVE_PRI */
#if defined(HAVE_SS7)
} else if (!strcasecmp(v->name, "ss7type")) {
Modified: team/rmudgett/display_text/channels/sig_pri.c
URL: http://svnview.digium.com/svn/asterisk/team/rmudgett/display_text/channels/sig_pri.c?view=diff&rev=306671&r1=306670&r2=306671
==============================================================================
--- team/rmudgett/display_text/channels/sig_pri.c (original)
+++ team/rmudgett/display_text/channels/sig_pri.c Mon Feb 7 16:32:56 2011
@@ -1917,7 +1917,12 @@
}
if (owner) {
- /* The owner channel is present. */
+ /*
+ * The owner channel is present.
+ * Pass the event to the peer as well.
+ */
+ ast_queue_control(owner, AST_CONTROL_MCID);
+
ast_str_append(&msg, 0, "Channel: %s\r\n", owner->name);
ast_str_append(&msg, 0, "UniqueID: %s\r\n", owner->uniqueid);
@@ -7687,6 +7692,15 @@
}
#endif /* defined(HAVE_PRI_AOC_EVENTS) */
break;
+#if defined(HAVE_PRI_MCID)
+ case AST_CONTROL_MCID:
+ if (p->pri && p->pri->pri && p->pri->mcid_send) {
+ pri_grab(p, p->pri);
+ pri_mcid_req_send(p->pri->pri, p->call);
+ pri_rel(p->pri);
+ }
+ break;
+#endif /* defined(HAVE_PRI_MCID) */
}
return res;
Modified: team/rmudgett/display_text/channels/sig_pri.h
URL: http://svnview.digium.com/svn/asterisk/team/rmudgett/display_text/channels/sig_pri.h?view=diff&rev=306671&r1=306670&r2=306671
==============================================================================
--- team/rmudgett/display_text/channels/sig_pri.h (original)
+++ team/rmudgett/display_text/channels/sig_pri.h Mon Feb 7 16:32:56 2011
@@ -402,6 +402,10 @@
* appended to the initial_user_tag[].
*/
unsigned int append_msn_to_user_tag:1;
+#if defined(HAVE_PRI_CALL_WAITING)
+ /*! \brief TRUE if allow sending MCID request on this span. */
+ unsigned int mcid_send:1;
+#endif /* defined(HAVE_PRI_CALL_WAITING) */
int dialplan; /*!< Dialing plan */
int localdialplan; /*!< Local dialing plan */
int cpndialplan; /*!< Connected party dialing plan */
Modified: team/rmudgett/display_text/configs/chan_dahdi.conf.sample
URL: http://svnview.digium.com/svn/asterisk/team/rmudgett/display_text/configs/chan_dahdi.conf.sample?view=diff&rev=306671&r1=306670&r2=306671
==============================================================================
--- team/rmudgett/display_text/configs/chan_dahdi.conf.sample (original)
+++ team/rmudgett/display_text/configs/chan_dahdi.conf.sample Mon Feb 7 16:32:56 2011
@@ -230,6 +230,11 @@
;
;display_send=
;display_receive=
+
+; Allow sending an ISDN MCID request on this span.
+; Default disabled
+;
+;mcid_send=yes
; Allow inband audio (progress) when a call is DISCONNECTed by the far end of a PRI
;
Modified: team/rmudgett/display_text/funcs/func_frame_trace.c
URL: http://svnview.digium.com/svn/asterisk/team/rmudgett/display_text/funcs/func_frame_trace.c?view=diff&rev=306671&r1=306670&r2=306671
==============================================================================
--- team/rmudgett/display_text/funcs/func_frame_trace.c (original)
+++ team/rmudgett/display_text/funcs/func_frame_trace.c Mon Feb 7 16:32:56 2011
@@ -308,6 +308,9 @@
case AST_CONTROL_AOC:
ast_verbose("SubClass: AOC\n");
break;
+ case AST_CONTROL_MCID:
+ ast_verbose("SubClass: MCID\n");
+ break;
}
if (frame->subclass.integer == -1) {
ast_verbose("SubClass: %d\n", frame->subclass.integer);
Modified: team/rmudgett/display_text/include/asterisk/frame.h
URL: http://svnview.digium.com/svn/asterisk/team/rmudgett/display_text/include/asterisk/frame.h?view=diff&rev=306671&r1=306670&r2=306671
==============================================================================
--- team/rmudgett/display_text/include/asterisk/frame.h (original)
+++ team/rmudgett/display_text/include/asterisk/frame.h Mon Feb 7 16:32:56 2011
@@ -263,6 +263,7 @@
AST_CONTROL_READ_ACTION = 27, /*!< Tell ast_read to take a specific action */
AST_CONTROL_AOC = 28, /*!< Advice of Charge with encoded generic AOC payload */
AST_CONTROL_END_OF_Q = 29, /*!< Indicate that this position was the end of the channel queue for a softhangup. */
+ AST_CONTROL_MCID = 30, /*!< Indicate that the caller is being malicious. */
};
enum ast_frame_read_action {
Modified: team/rmudgett/display_text/main/channel.c
URL: http://svnview.digium.com/svn/asterisk/team/rmudgett/display_text/main/channel.c?view=diff&rev=306671&r1=306670&r2=306671
==============================================================================
--- team/rmudgett/display_text/main/channel.c (original)
+++ team/rmudgett/display_text/main/channel.c Mon Feb 7 16:32:56 2011
@@ -4229,6 +4229,7 @@
case AST_CONTROL_READ_ACTION:
case AST_CONTROL_AOC:
case AST_CONTROL_END_OF_Q:
+ case AST_CONTROL_MCID:
break;
case AST_CONTROL_CONGESTION:
@@ -4412,6 +4413,7 @@
case AST_CONTROL_READ_ACTION:
case AST_CONTROL_AOC:
case AST_CONTROL_END_OF_Q:
+ case AST_CONTROL_MCID:
/* Nothing left to do for these. */
res = 0;
break;
@@ -7013,6 +7015,7 @@
switch (f->subclass.integer) {
case AST_CONTROL_AOC:
+ case AST_CONTROL_MCID:
ast_indicate_data(other, f->subclass.integer, f->data.ptr, f->datalen);
break;
case AST_CONTROL_REDIRECTING:
Modified: team/rmudgett/display_text/main/features.c
URL: http://svnview.digium.com/svn/asterisk/team/rmudgett/display_text/main/features.c?view=diff&rev=306671&r1=306670&r2=306671
==============================================================================
--- team/rmudgett/display_text/main/features.c (original)
+++ team/rmudgett/display_text/main/features.c Mon Feb 7 16:32:56 2011
@@ -3662,6 +3662,7 @@
switch (f->subclass.integer) {
case AST_CONTROL_RINGING:
case AST_CONTROL_FLASH:
+ case AST_CONTROL_MCID:
case -1:
ast_indicate(other, f->subclass.integer);
break;
More information about the asterisk-commits
mailing list