Hello, yesterday I got a call with identified 8xxxxxxxxx00=0=0=0=0= number. I looked up my cel and cdr tables. Detail about this call stored as below
in cel table:(cid_name,cid_num,cid_ani)=(8999,=0=0=0=0=,8xxxxxxxxx00=0=0=0=0=)
in cdr table:(clid,src)=(“8999” <8xxxxxxxxx00=0=0=0=0=>,8xxxxxxxxx00=0=0=0=0=)
In normal situation these tables content likes below:
in cel table:(cid_name,cid_num,cid_ani)=(8999,xxxxxxxxx,8xxxxxxxxx)
in cdr table:(clid,src)=(“8999” <8xxxxxxxxx>,8xxxxxxxxx)
My question does asterisk look only last 9 characters when writing to cel table? If yes can I configure this and change?
No, Asterisk doesn’t just look at some n characters when determining Caller ID. That’s for a lot of valid reasons, not the least of which that not everyone has the same n digits that make up their telephone numbers.
Looking at your example, it looks like someone provided a bad Caller ID to Asterisk, i.e., it included other characters that you didn’t want - 0=0=0=0=0=. Asterisk is going to look for the location between the brackets <> and - for the most part - leave what is in there alone.
If you want to massage/sanitize the Caller ID further, you can do that in the dialplan yourself using the CALLERID function.
thanks for your reply. But if does not take n characters why show only last 9 characters? in my example between brackets I have <8xxxxxxxxx00=0=0=0=0=> but asterisk shows only last 9 characters as caller id
Without seeing the full call log, dialplan, and message traffic, I’m not sure why things would be condensed down to that.
Looking at how Asterisk parses caller ID, it will shrink the location information between the brackets by stripping out some invalid characters and brackets, but generally it’s going to keep whatever is between the brackets. It doesn’t have a maximum length baked into it by default.
@mjordan thank for your help. I found the cause. The previous programmer takes last 9 characters when incoming call. He configured this in extensions.cnf file.