Index: main/channel.c =================================================================== --- main/channel.c (revision 320171) +++ main/channel.c (working copy) @@ -4444,7 +4444,25 @@ if (ast_test_flag(chan, AST_FLAG_ZOMBIE) || ast_check_hangup(chan)) return -1; CHECK_BLOCKING(chan); - if (chan->tech->send_text) + if (text == NULL || strlen(text) == 0 ) + return 0; + + if (chan->tech->write_text && (chan->nativeformats & AST_FORMAT_TEXT_MASK) ) + { + struct ast_frame f; + + f.frametype = AST_FRAME_TEXT; + f.subclass.codec == AST_FORMAT_T140; + f.src = "DIALPLAN"; + f.mallocd = AST_MALLOCD_DATA; + f.datalen = strlen(text); + f.data.ptr = ast_strdup(text); + f.offset = 0; + f.seqno = 0; + + res = chan->tech->write_text(chan, &f); + } + else if (chan->tech->send_text) res = chan->tech->send_text(chan, text); ast_clear_flag(chan, AST_FLAG_BLOCKING); return res;