应答呼叫后无法获取通道变量.(星号)



我正在使用Asterisk和dot net发送将播放预先录制的消息的呼叫。 有人建议我在拨号计划中使用拨号命令。我的拨号计划

[cpc_sendcall]
exten => _X.,1,Set(CHANNEL(userfield)=${actionid})
same => n,NoOp(RecordCall: ${dorec})
same => n,GotoIf($[${dorec}=1]?record:norecord)
same => n(record),mixmonitor(${recfile}.gsm)
same => n(norecord),dial(SIP/${EXTEN}@${carrier},45,G(cpc_doamd,s,1))
same => n,hangup
same => n,CELGenUserEvent(CPC-Failed,${myactionid},HC:${HANGUPCAUSE},DS:${DIALSTATUS})
[cpc_doamd]
exten => s,1,answer
same => n,AMD
same => n,GotoIf($[${AMDSTATUS}=HUMAN]?humn:mach)
same => n(humn),CELGenUserEvent(CPC-LiveAnswer,${myactionid})
same => n,WaitForSilence(500)
same => n,NoOp(ProductLA: ${myproductla})
same => n,goto(${myproductla},s,1)
same => n,Hangup
same => n(mach),CELGenUserEvent(CPC-AnsweringMachine,${myactionid})
same => n,NoOp(ToneDigit: ${mytonedigit})
same => n,goto(cpc_tonevmdigit,${mytonedigit},1)
same => n,NoOp(ProductAM: ${myproductam})
same => n,goto(${myproductam},s,1)
same => n,Hangup
[cpc_tonevmdigit]
exten => _X,1,senddtmf(${EXTEN})
same => n,return
exten => 10,1,senddtmf(*)
same => n,return
exten => 11,1,senddtmf(#)
same => n,return
exten => 12,1,WaitForSilence(2000,1,120)
same => n,WaitForSilence(200,2,1)
same => n,return

和原始命令

Action: Originate
Channel: local/7062675733@cpc_sendcall
Exten: 7062675733
Context: gp_playintro
Async: 1
Priority: 1
Timeout: 60000
ActionID: GNE-1-1-1-0-0-1-7062675733-40304
Variable: assignmentid=ff830065-2419-4134-be89-36873d99e7c3,dorec=0,tonedigit=12,predigits=-1,postdigits=-1,playcompanygreeting=0,pin=-1,dosvr=0,playSurveyNotice=0,dolat=0,playlatnotice=0,playcompanytrailer=0,productam=gpstart,productla=gpstart,actionid=GNE-1-1-1-0-0-1-7062675733-40304,carrier=excel
CallerId: 4053084474
Account: G1

我想知道这是拨打此电话的正确方法吗?应答呼叫后,如何访问我设置的通道变量?

谢谢

使用

sip 呼叫时,必须使用本地频道。一旦频道被挂断,vars就消失了。您可以使用本地频道解决此问题。

这是一个很好的资源:

https://blogs.reucon.com/asterisk-java/originate-using-asterisk-local-channels-566/

相关内容

  • 没有找到相关文章

最新更新