mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-02 11:58:40 +00:00
Add ISDN display ie text handling options to chan_dahdi.conf.
The display ie handling can be controlled independently in the send and receive directions with the following options: * Block display text data. * Use display text in SETUP/CONNECT messages for name. * Use display text for COLP name updates (FACILITY/NOTIFY as appropriate). * Pass arbitrary display text during a call. Sent in INFORMATION messages. Received from any message that the display text was not used as a name. If the display options are not set then the options default to legacy behavior. The arbitrary display text is exchanged between bridged channels using the AST_FRAME_TEXT frame type. To send display text from the dialplan use the SendText() application when the arbitrary display text option is enabled. JIRA SWP-2688 JIRA ABE-2693 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@306396 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -1402,30 +1402,50 @@ static struct ast_channel *wait_for_answer(struct ast_channel *in,
|
||||
}
|
||||
}
|
||||
|
||||
/* Forward HTML stuff */
|
||||
if (single && (f->frametype == AST_FRAME_HTML) && !ast_test_flag64(outgoing, DIAL_NOFORWARDHTML))
|
||||
if (ast_channel_sendhtml(outgoing->chan, f->subclass.integer, f->data.ptr, f->datalen) == -1)
|
||||
ast_log(LOG_WARNING, "Unable to send URL\n");
|
||||
|
||||
if (single && ((f->frametype == AST_FRAME_VOICE) || (f->frametype == AST_FRAME_DTMF_BEGIN) || (f->frametype == AST_FRAME_DTMF_END))) {
|
||||
if (ast_write(outgoing->chan, f))
|
||||
ast_log(LOG_WARNING, "Unable to forward voice or dtmf\n");
|
||||
}
|
||||
if (single && (f->frametype == AST_FRAME_CONTROL)) {
|
||||
if ((f->subclass.integer == AST_CONTROL_HOLD) ||
|
||||
(f->subclass.integer == AST_CONTROL_UNHOLD) ||
|
||||
(f->subclass.integer == AST_CONTROL_VIDUPDATE) ||
|
||||
(f->subclass.integer == AST_CONTROL_SRCUPDATE)) {
|
||||
ast_verb(3, "%s requested special control %d, passing it to %s\n", in->name, f->subclass.integer, outgoing->chan->name);
|
||||
ast_indicate_data(outgoing->chan, f->subclass.integer, f->data.ptr, f->datalen);
|
||||
} else if (f->subclass.integer == AST_CONTROL_CONNECTED_LINE) {
|
||||
if (ast_channel_connected_line_macro(in, outgoing->chan, f, 0, 1)) {
|
||||
ast_indicate_data(outgoing->chan, f->subclass.integer, f->data.ptr, f->datalen);
|
||||
if (single) {
|
||||
switch (f->frametype) {
|
||||
case AST_FRAME_HTML:
|
||||
/* Forward HTML stuff */
|
||||
if (!ast_test_flag64(outgoing, DIAL_NOFORWARDHTML)
|
||||
&& ast_channel_sendhtml(outgoing->chan, f->subclass.integer, f->data.ptr, f->datalen) == -1) {
|
||||
ast_log(LOG_WARNING, "Unable to send URL\n");
|
||||
}
|
||||
} else if (f->subclass.integer == AST_CONTROL_REDIRECTING) {
|
||||
if (ast_channel_redirecting_macro(in, outgoing->chan, f, 0, 1)) {
|
||||
ast_indicate_data(outgoing->chan, f->subclass.integer, f->data.ptr, f->datalen);
|
||||
break;
|
||||
case AST_FRAME_VOICE:
|
||||
case AST_FRAME_IMAGE:
|
||||
case AST_FRAME_TEXT:
|
||||
case AST_FRAME_DTMF_BEGIN:
|
||||
case AST_FRAME_DTMF_END:
|
||||
if (ast_write(outgoing->chan, f)) {
|
||||
ast_log(LOG_WARNING, "Unable to forward frametype: %d\n",
|
||||
f->frametype);
|
||||
}
|
||||
break;
|
||||
case AST_FRAME_CONTROL:
|
||||
switch (f->subclass.integer) {
|
||||
case AST_CONTROL_HOLD:
|
||||
case AST_CONTROL_UNHOLD:
|
||||
case AST_CONTROL_VIDUPDATE:
|
||||
case AST_CONTROL_SRCUPDATE:
|
||||
ast_verb(3, "%s requested special control %d, passing it to %s\n", in->name, f->subclass.integer, outgoing->chan->name);
|
||||
ast_indicate_data(outgoing->chan, f->subclass.integer, f->data.ptr, f->datalen);
|
||||
break;
|
||||
case AST_CONTROL_CONNECTED_LINE:
|
||||
if (ast_channel_connected_line_macro(in, outgoing->chan, f, 0, 1)) {
|
||||
ast_indicate_data(outgoing->chan, f->subclass.integer, f->data.ptr, f->datalen);
|
||||
}
|
||||
break;
|
||||
case AST_CONTROL_REDIRECTING:
|
||||
if (ast_channel_redirecting_macro(in, outgoing->chan, f, 0, 1)) {
|
||||
ast_indicate_data(outgoing->chan, f->subclass.integer, f->data.ptr, f->datalen);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
ast_frfree(f);
|
||||
|
||||
Reference in New Issue
Block a user