Unable to set callerid

Hi All,

I am using asterisk box with digium PRI card in it. I have installed the following softwares.

  1. Asterisk 1.4.44
  2. Libpri
  3. Dahdi 2.5

I have set up the network as follows:

PBX ------(PRI)---------> Asterisk/Dahdi box-------(SIP)------------Asterisk box

I want to reset incoming callerid from PBX to my custom caller id. I have overlapdial=yes in chan_dahdi.conf. I am having following message in asterisk console.

localhost*CLI> – Accepting overlap call from ’ ’ to ‘’ on channel 0/2, span 1
– Starting simple switch on ‘DAHDI/2-1’

Any one having idea why I am receiving above message and why caller ID is not being changed.

Are you aware that 1.4.44 is obsolete, and no longer supported?

What did you expect to see on the CLI? (The message looks correct for overlap dialing with no initial digits and no incoming caller ID.)

How are you overriding the CLI.?

Hi David,

Yes, I am aware that 1.4 is obsolete.
What happens is PBX is setting some CLI on outgoing call to asterisk box. I am checking in dialplan, if the CLI is valid as per my requirements and ammends it if required. Otherwise, it simply resets it with some master number. Here is the sample dialplan:

[cli-checker]
exten => _X.,1,GotoIf($[(${CALLERID(num)} >="" )]?88881:2)
exten => _X.,2,GotoIf($[(${CALLERID(num)} >=000 ) & (${CALLERID(num)} <= 029 )]?88881:99991)

exten => _X.,88881,Set(CALLERID(NUM)=8466${CALLERID(NUM)})
exten => _X.,88882,Set(CALLERID(NAME)=${CALLERID(NUM)})
exten => _X.,88883,NoOp(>>>>> Caller ID After Changing = ${CALLERID(NUM)} <<<<)
exten => _X.,88884,Goto(from-pbx,${EXTEN},3)

exten => _X.,99991,set(CALLERID(NUM)=8466000)
exten => _X.,99992,set(CALLERID(NAME)=8466000)
exten => _X.,99993,NoOp(>>>>> Caller ID After Changing = ${CALLERID(NUM)} <<<<)
exten => _X.,99994,Goto(from-pbx,${EXTEN},3)

I expect to see 8466000 as CLID on second asterisk box. I can see “8466000” on asterisk/PRI box but can’t see any CLID on second asterisk box.

I think that there was a change in the handling of quotes between 1.4 and 1.6, but, I would be consistent in the use of quotes. The first comparison would always succeed on 1.6.

What do verbose CLI logs show? If they are OK, what is in the SIP INVITE request between the two machines?

The result of first condition doesn’t matter to me. Because, in any case, CLI will be reset to some other CLI.

I can see CLI set to 8466000 on verbose. This means that first box is setting it correctly.

One more important thing to see is the configurations of chan_dahdi.conf. Can it have any effect on resetting CLI.

Following is the invite message on receiving Asterisk machine.

INVITE sip:0321944@101.50.64.12 SIP/2.0
Via: SIP/2.0/UDP 172.21.2.106:5060;branch=z9hG4bK49624fd1;rport
From: “Anonymous” sip:Anonymous@anonymous.invalid;tag=as53aae330
To: sip:0321944@101.50.64.12
Contact: sip:Anonymous@172.21.2.106
Call-ID: 0aaf98ca4fda6c875a4118d67c229972@172.21.2.106
CSeq: 102 INVITE
User-Agent: Asterisk PBX
Max-Forwards: 70
Date: Tue, 10 Jul 2012 16:39:49 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces
Content-Type: application/sdp
Content-Length: 235

v=0
o=root 3070 3070 IN IP4 172.21.2.106
s=session
c=IN IP4 172.21.2.106
t=0 0
m=audio 10666 RTP/AVP 8 0 101
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=sendrecv

I wonder if you have presentation allowed turned off on the incoming call?

It looks like manipulating the presentation status may be new with 1.6, so I am not sure how 1.4 handles it.