简体   繁体   English

使用 Originate 和 Asterisk 上的自定义 callerid 开始通话

[英]Start call using Originate with a custom callerid on Asterisk

Try to making a simple dialer with NodeJS.尝试使用 NodeJS 制作一个简单的拨号器。 Want to start a call with originate command using AMI, then move this call to a queue.想要使用 AMI 使用发起命令启动呼叫,然后将此呼叫移至队列。 Asterisk takes care of the rest. Asterisk 负责 rest。 With the following command, i can do what i want but problem is CallerID parameter is not working.使用以下命令,我可以做我想做的,但问题是 CallerID 参数不起作用。

I set trunk's callerid, when i try to make a manuel outbound call.当我尝试拨打手动外呼时,我设置了中继的主叫号码。 Its working but not working originate command.它的工作但不工作起源命令。 How can i make this work?我怎样才能使这项工作? It is not preferred to play with config files, but we can edit them if necessary.不喜欢使用配置文件,但我们可以根据需要编辑它们。

ami.action('Originate',{
Channel: 'PJSIP/'+req.params.callee+'@'+req.params.caller,
Exten: req.params.ext,
Context: 'ext-queues',
Priority: 1,
Async: 'false',
Variable: req.params.actid,
ActionID:req.params.actid,
CallerID:req.params.callee+' <'+req.params.callee+'>'}

Channel: 'PJSIP/number@trunkname', Exten: 1099, Context: 'ext-queues', Priority: 1, Async: 'false' ActionID: '123', CallerID: 9876543210频道:'PJSIP/number@trunkname',分机:1099,上下文:'ext-queues',优先级:1,异步:'false' ActionID:'123',CallerID:9876543210

Asterisk action Originate have CallerID field like described in docs Asterisk action Originate 具有 CallerID 字段,如文档中所述

https://wiki.asterisk.org/wiki/display/AST/Asterisk+11+ManagerAction_Originate https://wiki.asterisk.org/wiki/display/AST/Asterisk+11+ManagerAction_Originate

Note, that the library you are using can use other notation of variable, consult with source code.请注意,您正在使用的库可以使用其他变量表示法,请参阅源代码。

However it is highly NOT recommended to write your own dialler core, there will be many other issues under load.但是强烈不建议编写自己的拨号器核心,负载下会有许多其他问题。 Check already created variants.检查已创建的变体。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM