我的拨号方案(Ael)和ARI(C#)如下所示:
AEL
sys_call
{
Set(CALLERID(NUM)=${call_from});
Monitor(wav,${fname},mb);
Dial(SIP/${num_to_call},30,m);
UserEvent(Dropped);
goto system,sys_wait,1;
}
ARI
RedirectAction call = new RedirectAction(astChannel, "system", "sys_call", 1);
SetVarAction num_to_call = new SetVarAction();
num_to_call.Channel = astChannel;
num_to_call.Variable = "num_to_call";
num_to_call.Value = number;
SetVarAction call_from = new SetVarAction();
call_from.Channel = astChannel;
call_from.Variable = "call_from";
call_from.Value = caller_number;
astCon.SendAction(num_to_call);
astCon.SendAction(call_from);
//Thread.Sleep(1000);// Sadly, it makes no diffirence
astCon.SendAction(call);
理论上,一切都应该正常,但Asterisk"没有看到"那些变量:Here's a screensoot。
有趣的是,如果我打破"打破"我的拨号方案,就像这样
Dial(SIP/явандал${num_to_call}жаж,30,m);
Asterisk会突然收到所有变量:Here's a screenshoot