如何在 Asterisk 通话文件中设置拨号选项

问题描述 投票:0回答:1

我已经从文件中拨打电话,但我想添加

TtM(MyMacro)
拨号选项。调用文件具有以下属性:

$callFileOptions = "Channel: SIP/Algar_AMD/$phoneNumber
            \nCallerid: $phoneNumber
            \nMaxRetries: 0
            \nRetryTime: 1
            \nWaitTime: 30
            \nContext: from-internal
            \nExtension: $internalExtension
            \nPriority: 1";

此配置将先拨打外部电话,接听后将转接至内部分机。

我尝试将

Channel
属性更改为
SIP/Algar_AMD/$phoneNumber,300,TtM(MyMacro)
SIP/Algar_AMD/$phoneNumber,,TtM(MyMacro)
SIP/Algar_AMD/$phoneNumber|TtM(MyMacro)
,但无济于事。

MyMacro 将执行 AMD 应用程序来检测机器/人类答案。

asterisk
1个回答
0
投票

明白了!

我在extensions_custom.conf中的宏是这样的

[macro-AsteriskMachineDetection]
exten => s,1,BackGround(en/silence/05);
same => n,AMD(3500,630,600,5000,110,50,5,750,5000);
same => n,NoOp(AMDSTATUS = ${AMDSTATUS} - NUMBER = ${CALLERID(number)} - CAUSE = ${AMDCAUSE});
same => n,GotoIf($[${AMDSTATUS}=MACHINE]?machine:human);
same => n(machine),Macro(hangupcall,);
same => n(human),Dial(Local/${EXT_DEST});

我已将调用文件配置更改为:

$callFileOptions = "Channel: SIP/Algar_AMD/$phoneNumber
            \nCallerid: $phoneNumber
            \nMaxRetries: 0
            \nRetryTime: 1
            \nWaitTime: 30
            \nContext: from-internal
            \nExtension: $internalExtension
            \nSetvar: EXT_DEST=$internalExtension
            \nApplication: Macro
            \nData: AsteriskMachineDetection
            \nPriority: 1";

编辑:

$callFileOptions = "Channel: SIP/Algar_AMD/$phoneNumber
            \nCallerid: $phoneNumber
            \nMaxRetries: 0
            \nRetryTime: 1
            \nWaitTime: 30
            \nSetvar: EXT_DEST=$internalExtension
            \nApplication: Macro
            \nData: AsteriskMachineDetection
            \nPriority: 1";
© www.soinside.com 2019 - 2024. All rights reserved.