Asterisk 无法使用带2张卡的2 pri in为星号中的第二张dahdi卡设置呼叫者Id

Asterisk 无法使用带2张卡的2 pri in为星号中的第二张dahdi卡设置呼叫者Id,asterisk,configure,ivr,Asterisk,Configure,Ivr,我的centos 6系统中有2张DAHDI卡和2张pri 我无法在文件中为第二个pri设置callerid。对于连接到上层卡的pri,我可以在转发时设置其呼叫者id,但不能设置显示上层卡pri pilot DID号码的下层卡(当我在呼叫文件中的CallerId变量上设置时,它应该显示下层pri号码)。如果我翻转pri,它会为高pri设置相同的呼叫者id,因此问题似乎出在某些配置中 我似乎无法找出我正在做的配置错误 system.conf # Span 1: WCT1/0 "Wildcard TE

我的centos 6系统中有2张DAHDI卡和2张pri

我无法在文件中为第二个pri设置callerid。对于连接到上层卡的pri,我可以在转发时设置其呼叫者id,但不能设置显示上层卡pri pilot DID号码的下层卡(当我在呼叫文件中的CallerId变量上设置时,它应该显示下层pri号码)。如果我翻转pri,它会为高pri设置相同的呼叫者id,因此问题似乎出在某些配置中

我似乎无法找出我正在做的配置错误

system.conf

# Span 1: WCT1/0 "Wildcard TE121 Card 0" (MASTER) CCS/HDB3/CRC4 ClockSource 
span=1,1,0,ccs,hdb3,crc4
# termtype: te
bchan=1-15,17-31
dchan=16
echocanceller=mg2,1-15,17-31

# Span 2: WCT1/1 "Wildcard TE121 Card 1" 
span=2,2,0,ccs,hdb3,crc4
# termtype: te
bchan=32-46,48-62
dchan=47
echocanceller=mg2,32-46,48-62

# Global data

loadzone    = us
defaultzone = us
[channels]
context=from-pstn-old
usecallerid=yes
callwaiting=yes
echocancel=yes
echocancelwhenbridged=yes
rxgain=0.0
txgain=0.0
pridialplan=unknown
prilocaldialplan=unknown
switchtype=euroisdn
language = yes
relaxdtmf = yes
dtmfmode=auto
transfer=yes

;Span 1:
context=from-pstn
group=0
callgroup=1
pickupgroup=1
echocancel=yes
signalling=pri_cpe
channel => 1-15,17-31,32-46,48-62
context=default
usecallerid=yes
callerid=asreceived
hanguponpolarityswitch=yes
answeronpolarityswitch=yes
cidstart=polarity_IN
cidsignalling=dtmf
hidecallerid=no
callwaiting=yes
usecallingpres=yes
callwaitingcallerid=yes
threewaycalling=yes
transfer=yes
canpark=yes
cancallforward=yes
callreturn=yes
echocancel=yes
echocancelwhenbridged=yes
relaxdtmf=yes
rxgain=0.0
txgain=0.0
group=1
callgroup=1
pickupgroup=1
immediate=no
useincomingcalleridondahditransfer=yes
busydetect=yes
busycount=2
chan_dahdi.conf

# Span 1: WCT1/0 "Wildcard TE121 Card 0" (MASTER) CCS/HDB3/CRC4 ClockSource 
span=1,1,0,ccs,hdb3,crc4
# termtype: te
bchan=1-15,17-31
dchan=16
echocanceller=mg2,1-15,17-31

# Span 2: WCT1/1 "Wildcard TE121 Card 1" 
span=2,2,0,ccs,hdb3,crc4
# termtype: te
bchan=32-46,48-62
dchan=47
echocanceller=mg2,32-46,48-62

# Global data

loadzone    = us
defaultzone = us
[channels]
context=from-pstn-old
usecallerid=yes
callwaiting=yes
echocancel=yes
echocancelwhenbridged=yes
rxgain=0.0
txgain=0.0
pridialplan=unknown
prilocaldialplan=unknown
switchtype=euroisdn
language = yes
relaxdtmf = yes
dtmfmode=auto
transfer=yes

;Span 1:
context=from-pstn
group=0
callgroup=1
pickupgroup=1
echocancel=yes
signalling=pri_cpe
channel => 1-15,17-31,32-46,48-62
context=default
usecallerid=yes
callerid=asreceived
hanguponpolarityswitch=yes
answeronpolarityswitch=yes
cidstart=polarity_IN
cidsignalling=dtmf
hidecallerid=no
callwaiting=yes
usecallingpres=yes
callwaitingcallerid=yes
threewaycalling=yes
transfer=yes
canpark=yes
cancallforward=yes
callreturn=yes
echocancel=yes
echocancelwhenbridged=yes
relaxdtmf=yes
rxgain=0.0
txgain=0.0
group=1
callgroup=1
pickupgroup=1
immediate=no
useincomingcalleridondahditransfer=yes
busydetect=yes
busycount=2
我的通话文件

Channel: DAHDI/g0/09*********
MaxRetries: 0
WaitTime: 30
Context: outgoing 
Extension: *******              //my did
Callerid: 0**********          //my did with area code
我的
extensions.conf
太长,因此我发布了相关部分

  same => n,Set(CALLERID(all)=0**0${DID})
  same => n,dial(DAHDI/g0/0${NUMBER},20,mtM(ANSWEREDED))
其中,
${DID}
和${NUMBER}是动态变量。 任何帮助都将不胜感激


谢谢

好的,让我们从第一件事开始——您的chan_dahdi.conf文件中有多个错误。例如:

hanguponpolarityswitch=yes
answeronpolarityswitch=yes
cidstart=polarity_IN
cidsignalling=dtmf
使用PRI电路时不需要。PRI电路是完全数字的,极性变化用于FXO/FXS信号

现在,关于你的问题,我假设你的通话文件如下:

Channel: SIP/g1/some_number
Extension: Number_B
Priority: Your Priority
Conext: Some_Context
CallerID: Some_CallerID
现在,这里的诀窍是通过dialplan为Number_B设置呼叫者ID,因为调用文件中的CallerID用于“Channel”参数。一旦呼叫进入星号服务器,号码_B将接收频道中的号码作为呼叫者ID,这非常有意义。如果要设置不同的号码,则需要使用以下选项:

exten => _X.,n,Set(CALLERID(num)=some_callerid)
以更改号码腿上的来电显示

***新增内容:

从dahdi.conf中删除以下行:

useincomingcalleridondahditransfer=yes
transfer=yes
canpark=yes
cancallforward=yes
callreturn=yes

重新加载星号并重试。

谢谢您的回复,但我正在从拨号计划和呼叫文件中设置callerid,但也无法正常工作。请将您的配置上载到pastebin.com或放在这里,以便我检查这些配置?顺便说一句,为了在PRI线路的出站呼叫上设置CallerID,您需要您的运营商允许您这样做。例如,在以色列和英国,这是不允许的。你和你的运营商检查过这个问题了吗?我应该发布什么文件?你的意思是
extension.conf
。如果我像我在问题中所说的那样将pri翻转到第一张卡上,我可以设置呼叫者id,所以我想我可以设置呼叫者id。这个问题只针对较低的卡优先级。请查看上面提供的答案的新添加内容,试试看。我试过你的解决方案,但没用。更改了我的文件,重新启动了asterisk,重新加载了chan_dahdi,但仍然一样