The commaman3000 service, which prepares the CDRs for collection on port 8989 limits the pin codes to 5 digits. So if you have a pin set that you set to be recorded in the CDR, and any of the pins are longer than 5 digits, then when exporting via telnet on port 8989, the pins are then capped at 5 digits.
Though the full digits set does appear in the CDR database, but not on the telnet output.
You can increase the number of digits sent in the following manner:
1. Edit the file /usr/bin/commanman3000srv using jed or nano
sudo jed /usr/bin/commanman3000srv
2. Search forward for the word 'ACC' , and find the bold line below:
{ DSTCHAN=$(echo $g | cut -d"," -f7 | cut -c1-16)
ACC=$(echo $g | cut -d"," -f2 | cut -c1-5)
if [ "$ACC" = "" ]; then
ACC="0000" }
That final digit, '5', before the closing bracket is what sets the length of the pins parsed. To increase this length, simply replace that digit 5 with the length of your pin code.
For example, if your pin code is 6 digits the above line would look like:
ACC=$(echo $g | cut -d"," -f2 | cut -c1-6)
3. Save the /usr/bin/commamand3000srv file and exit.
4. Restart the commaman3000 service:
sudo /etc/init.d/commaman3000 restart