4

I have 2 DAHDI card and 2 pri in my centos 6 system.

I am not able to set callerid in .call file for second pri. Means for pri attached to the upper card I am able to set its caller id on forwarding but not the lower one it shows upper card pri pilot DID number(it should show the lower pri number as I am setting it on CallerId varible in call file) .if I flip the pri it does the same set caller id for upper pri so it seems the problem is in some configuration.

I cant seem to figure out what is the configuration mistake I am doing.

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

chan_dahdi.conf

[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

My call file

Channel: DAHDI/g0/09*********
MaxRetries: 0
WaitTime: 30
Context: outgoing 
Extension: *******              //my did
Callerid: 0**********          //my did with area code

My extensions.conf is too long so I posting the relevant part

  same => n,Set(CALLERID(all)=0**0${DID})
  same => n,dial(DAHDI/g0/0${NUMBER},20,mtM(ANSWEREDED))

where ${DID} and ${NUMBER} are dynamic variable . Any help would be appreciated.

Thanks

codegasmer
  • 1,462
  • 1
  • 15
  • 47

1 Answers1

1

Ok, let's start with the first thing - you have multiple errors in your chan_dahdi.conf file. For example:

hanguponpolarityswitch=yes
answeronpolarityswitch=yes
cidstart=polarity_IN
cidsignalling=dtmf

Are not required when working with PRI circuits. PRI circuits are completely digital, polarity changes are used for FXO/FXS signalling.

Now, regarding your question, I would assume that your call file looks like this:

Channel: SIP/g1/some_number
Extension: Number_B
Priority: Your Priority
Conext: Some_Context
CallerID: Some_CallerID

Now, the trick here is to set the caller ID for Number_B via the dialplan, as the CallerID in the Call file is for the "Channel" argument. Once the call is inside the Asterisk server, the Number_B will recevie the number in the Channel as the caller ID, and it make perfect sense. If you want to set a different number, you will need to use the following:

exten => _X.,n,Set(CALLERID(num)=some_callerid)

In order to change the caller ID on the Number_B leg.

*** New addition:

Remove the following lines from dahdi.conf:

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

Reload Asterisk and try again.

  • thanks for the reply but I am setting the callerid from dialplan and in the call file also but it dint work – codegasmer May 12 '15 at 15:42
  • Can you please upload your configuration to pastebin.com or put them in here, so I can go over these? Btw, in order to set the CallerID on an outbound call from a PRI circuit, you need your carrier to allow you to do that. For example, in Israel and the UK, that is not allowed. Have you checked the issue with your carrier ? – Nir Simionovich May 13 '15 at 10:59
  • what file should I post did you mean `extension.conf`.I am able to set the caller id if I flip the pri to the first card as I said in my question so I think I can set the callerid.This problem ocuurs only for lower card pri – codegasmer May 13 '15 at 13:03
  • Check out the new addition to the answer provided above, try it. – Nir Simionovich May 14 '15 at 07:04
  • I tried you solution but it dint work.Changed my file ,restarted asterisk ,reloaded chan_dahdi but stilll the same – codegasmer May 14 '15 at 08:59
  • Can you please post your extensions.conf and the .call file you are using? – Nir Simionovich May 14 '15 at 12:35
  • I have edited my question ,my extensions file is too long so I am posting the relevant part where I am setting the callerid – codegasmer May 14 '15 at 12:52
  • Can you please post a sample of the Asterisk console, running this dialplan? – Nir Simionovich May 14 '15 at 15:11
  • How about you change your setup so that you originate the call on one PRI circuit and dialout on the other. Currently, everything is configured as group 0, which makes your problem somewhat confusing. – Nir Simionovich May 14 '15 at 15:40
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/77821/discussion-between-nirs-and-codegasmer). – Nir Simionovich May 14 '15 at 15:42