mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-24 14:56:58 +00:00
T38 faxdetect should jump to the 'fax' extension for incoming calls only
The previous implementation of T38 faxdetect resulted in both sides of the call jumping to a fax extension when both sides had 't38pt_udptl=yes' and 'faxdetect=yes' in sip.conf and a 'fax' extension in the current context. This revision will jump to a 'fax' extension on incoming calls only. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@176869 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -4617,8 +4617,8 @@ static void change_t38_state(struct sip_pvt *p, int state)
|
|||||||
if (message)
|
if (message)
|
||||||
ast_queue_control_data(chan, AST_CONTROL_T38, &message, sizeof(message));
|
ast_queue_control_data(chan, AST_CONTROL_T38, &message, sizeof(message));
|
||||||
|
|
||||||
if (ast_test_flag(&p->flags[1], SIP_PAGE2_FAX_DETECT)) {
|
if (ast_test_flag(&p->flags[1], SIP_PAGE2_FAX_DETECT) && !p->outgoing_call) {
|
||||||
/* fax detection is enabled */
|
/* fax detection is enabled and this is an incoming call */
|
||||||
ast_channel_lock(chan);
|
ast_channel_lock(chan);
|
||||||
if (strcmp(chan->exten, "fax") && state == T38_ENABLED) {
|
if (strcmp(chan->exten, "fax") && state == T38_ENABLED) {
|
||||||
const char *target_context = S_OR(chan->macrocontext, chan->context);
|
const char *target_context = S_OR(chan->macrocontext, chan->context);
|
||||||
|
Reference in New Issue
Block a user