.localprefix = "",
.privateprefix = "",
.unknownprefix = "",
+ .colp_send = SIG_PRI_COLP_UPDATE,
.resetinterval = -1,
},
#endif
#if defined(HAVE_PRI_L2_PERSISTENCE)
pris[span].pri.l2_persistence = conf->pri.pri.l2_persistence;
#endif /* defined(HAVE_PRI_L2_PERSISTENCE) */
+ pris[span].pri.colp_send = conf->pri.pri.colp_send;
#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;
confp->pri.pri.l2_persistence = PRI_L2_PERSISTENCE_DEFAULT;
}
#endif /* defined(HAVE_PRI_L2_PERSISTENCE) */
+ } else if (!strcasecmp(v->name, "colp_send")) {
+ if (!strcasecmp(v->value, "block")) {
+ confp->pri.pri.colp_send = SIG_PRI_COLP_BLOCK;
+ } else if (!strcasecmp(v->value, "connect")) {
+ confp->pri.pri.colp_send = SIG_PRI_COLP_CONNECT;
+ } else if (!strcasecmp(v->value, "update")) {
+ confp->pri.pri.colp_send = SIG_PRI_COLP_UPDATE;
+ } else {
+ confp->pri.pri.colp_send = SIG_PRI_COLP_UPDATE;
+ }
#endif /* HAVE_PRI */
#if defined(HAVE_SS7)
} else if (!strcasecmp(v->name, "ss7type")) {
struct pri_party_connected_line connected;
int dialplan;
int prefix_strip;
+ int colp_allowed = 0;
pri_grab(p, p->pri);
+
+ /* Check if a connected line update is allowed at this time. */
+ switch (p->pri->colp_send) {
+ case SIG_PRI_COLP_BLOCK:
+ break;
+ case SIG_PRI_COLP_CONNECT:
+ /*
+ * Outgoing calls receive CONNECT and act like an update before
+ * the call is connected.
+ */
+ if (p->call_level <= SIG_PRI_CALL_LEVEL_ALERTING && !p->outgoing) {
+ colp_allowed = 1;
+ }
+ break;
+ case SIG_PRI_COLP_UPDATE:
+ colp_allowed = 1;
+ break;
+ }
+ if (!colp_allowed) {
+ pri_rel(p->pri);
+ ast_debug(1, "Blocked AST_CONTROL_CONNECTED_LINE on %s\n",
+ ast_channel_name(chan));
+ break;
+ }
+
memset(&connected, 0, sizeof(connected));
sig_pri_party_id_from_ast(&connected.id, &ast_channel_connected(chan)->id);
};
#endif /* defined(HAVE_PRI_MWI) */
+enum sig_pri_colp_signaling {
+ /*! Block all connected line updates. */
+ SIG_PRI_COLP_BLOCK,
+ /*! Only send connected line information with the CONNECT message. */
+ SIG_PRI_COLP_CONNECT,
+ /*! Allow all connected line updates. */
+ SIG_PRI_COLP_UPDATE,
+};
+
struct sig_pri_span {
/* Should be set by user */
struct ast_cc_config_params *cc_params; /*!< CC config parameters for each new call. */
char privateprefix[20]; /*!< for private dialplans */
char unknownprefix[20]; /*!< for unknown dialplans */
enum sig_pri_moh_signaling moh_signaling;
+ /*! Send connected line signaling to peer option. */
+ enum sig_pri_colp_signaling colp_send;
long resetinterval; /*!< Interval (in seconds) for resetting unused channels */
#if defined(HAVE_PRI_DISPLAY_TEXT)
unsigned long display_flags_send; /*!< PRI_DISPLAY_OPTION_xxx flags for display text sending */
;
;datetime_send=
+; Send ISDN conected line information.
+;
+; block: Do not send any connected line information.
+; connect: Send connected line information on initial connect.
+; update: Same as connect but also send any updates during a call.
+; Updates happen if the call is transferred. (Default)
+;
+;colp_send=update
+
; Allow inband audio (progress) when a call is DISCONNECTed by the far end of a PRI
;
;inbanddisconnect=yes