Author Topic: Asterisk CDR registering error.  (Read 7270 times)

pw44

  • Addicted
  • *
  • Posts: 666
    • View Profile
Asterisk CDR registering error.
« on: February 26, 2013, 12:23:34 am »
Hya,
browsing the Asterisk CDR table, i did note the it registers wrong. Incoming calls coming via my SPA3102 is registered as caller id "Unknown Caller" <2122498618>, which is my POTS number.
Code: [Select]
calldate clid src dst dcontext channel dstchannel lastapp lastdata duration billsec disposition amaflags accountcode userfield uniqueid
2013-02-24 20:46:54 "Unknown Caller" <2122498618> 2122498618 2122498618 from-trunk SIP/2122498618-00000009 Local/204@trusted-cac0;1 Set TIMEOUT(response)=20 41 11 ANSWERED 3     1361749614.37
Is this error known?
TIA





« Last Edit: February 26, 2013, 12:25:11 am by pw44 »

cfernandes

  • Guru
  • ****
  • Posts: 359
    • View Profile
    • my company web site
Re: Asterisk CDR registering error.
« Reply #1 on: February 26, 2013, 11:43:15 am »
my cdr is correct   check   on  db_phone_config.sh   

if look like that
  LINESSQL="$LINESSQL INSERT INTO $DB_Extensions_Table (context,exten,priority,app,appdata) VALUES
        ('$context','$phonenumber','1','Set','__FROM_DID=\${EXTEN}'),
        ('$context','$phonenumber','2','Set','PAI=\${SIP_HEADER(P-Asserted-Identity)}'),
        ('$context','$phonenumber','3','Set','PAF=\${SIP_HEADER(FROM)}'),
        ('$context','$phonenumber','4','Set','CURRENT_PAI_LENGTH=\${LEN(\${PAI})}'),
        ('$context','$phonenumber','5','Set','CURRENT_PAF_LENGTH=\${LEN(\${PAF})}'),
        ('$context','$phonenumber','6','gotoif','\$[\${CURRENT_PAI_LENGTH} > 0] ? 11'),
        ('$context','$phonenumber','7','gotoif','\$[\${CURRENT_PAF_LENGTH} > 0] ? 19'),
        ('$context','$phonenumber','8','Noop','Incoming call from \${CALLERID(num)}'),
        ('$context','$phonenumber','9','Set','FAX_RX='),
        ('$context','$phonenumber','10','Goto','custom-linuxmce,$line,1'),
        ('$context','$phonenumber','11','noop','config p asserted id ${PAI}'),
        ('$context','$phonenumber','12','set','tmpcid=\${CUT(PAI,:,2)}'),
        ('$context','$phonenumber','13','Set','tmpcid=\${CUT(tmpcid,@,1)}'),
        ('$context','$phonenumber','14','Set','CALLERID(num)=\${tmpcid}'),
        ('$context','$phonenumber','15','Noop','Incoming call from \${CALLERID(num)}'),
        ('$context','$phonenumber','16','Set','FAX_RX='),
        ('$context','$phonenumber','17','Set','CALLERID(ani)='),
        ('$context','$phonenumber','18','Goto','custom-linuxmce,$line,1'),
        ('$context','$phonenumber','19','noop','config SIP Header From ${PAF}'),
        ('$context','$phonenumber','20','set','tmpcid=\${CUT(PAF,:,2)}'),
        ('$context','$phonenumber','21','Set','tmpcid=\${CUT(tmpcid,@,1)}'),
        ('$context','$phonenumber','22','Set','CALLERID(num)=\${tmpcid}'),
        ('$context','$phonenumber','23','Noop','Incoming call from \${CALLERID(num)}'),
        ('$context','$phonenumber','24','Set','FAX_RX='),
        ('$context','$phonenumber','25','Set','CALLERID(ani)='),
        ('$context','$phonenumber','26','Goto','custom-linuxmce,$line,1');"

Code: [Select]
| calldate            | clid           | src            | dst | dcontext          | channel              | dstchannel | lastapp    | lastdata | duration | billsec | disposition | amaflags | accountcode | userfield | uniqueid       |
+---------------------+----------------+----------------+-----+-------------------+----------------------+------------+------------+----------+----------+---------+-------------+----------+-------------+-----------+----------------+
| 2013-02-25 12:28:52 | 18021382320001 | 18021382320001 | s   | from-sip-external | SIP/0.0.0.0-00000060 |            | Congestion | 5        |       13 |      13 | ANSWERED    |        3 |             |           | 1361806132.367 |
| 2013-02-25 12:18:53 | 13021382320001 | 13021382320001 | s   | from-sip-external | SIP/0.0.0.0-0000005f |            | Congestion | 5        |       13 |      13 | ANSWERED    |        3 |             |           | 1361805533.366 |
| 2013-02-25 12:08:54 | 15021382320001 | 15021382320001 | s   | from-sip-external | SIP/0.0.0.0-0000005e |            | Congestion | 5        |       13 |      13 | ANSWERED    |        3 |             |           | 1361804934.365 |
+---------------------+----------------+----------------+-----+-------------------+----------------------+------------+------------+----------+----------+---------+-------------+----------+-------------+-----------+----------------+

pw44

  • Addicted
  • *
  • Posts: 666
    • View Profile
Re: Asterisk CDR registering error.
« Reply #2 on: February 27, 2013, 08:45:01 pm »
This is what i have in my db_phone_config.sh. The last apt-get update && upgrade is three days ago.

LINESSQL="$LINESSQL INSERT INTO $DB_Extensions_Table (context,exten,priority,app,appdata) VALUES \
        ('$context','$phonenumber','1','Set','__FROM_DID=\${EXTEN}'), \
        ('$context','$phonenumber','2','Set','PAI=\${SIP_HEADER(FROM)}'),\
        ('$context','$phonenumber','3','gotoif','\$[\"\${PAI}\" = \"\"] ? 4:8'), \
        ('$context','$phonenumber','4','Set','CALLERID(num)=\${CALLERID(ani)}'), \
        ('$context','$phonenumber','5','Noop','Incoming call from \${CALLERID(num)}'), \
        ('$context','$phonenumber','6','Set','FAX_RX='), \
        ('$context','$phonenumber','7','Goto','custom-linuxmce,$line,1'),\
        ('$context','$phonenumber','8','noop','Using p-asserted-id SIP header: ${PAI}'),\
        ('$context','$phonenumber','9','set','tmpcid=\${CUT(PAI,:,2)}'), \
        ('$context','$phonenumber','10','Set','tmpcid=\${CUT(tmpcid,@,1)}'), \
        ('$context','$phonenumber','11','Set','CALLERID(num)=\${tmpcid}'),\
        ('$context','$phonenumber','12','Noop','Incoming call from \${CALLERID(num)}'),\
        ('$context','$phonenumber','13','Set','FAX_RX='), \
        ('$context','$phonenumber','14','Goto','custom-linuxmce,$line,1');"
}

It's different from yours.

cfernandes

  • Guru
  • ****
  • Posts: 359
    • View Profile
    • my company web site
Re: Asterisk CDR registering error.
« Reply #3 on: February 27, 2013, 10:08:29 pm »
try  with  my   

phenigma

  • LinuxMCE God
  • ****
  • Posts: 1758
    • View Profile
Re: Asterisk CDR registering error.
« Reply #4 on: February 28, 2013, 04:53:47 am »
This is what i have in my db_phone_config.sh. The last apt-get update && upgrade is three days ago.
...
It's different from yours.

Your db_phone_config.sh is a 5 month old version.  Did apt-get report any packages held back?

J.


pw44

  • Addicted
  • *
  • Posts: 666
    • View Profile
Re: Asterisk CDR registering error.
« Reply #5 on: February 28, 2013, 10:47:39 am »
Your db_phone_config.sh is a 5 month old version.  Did apt-get report any packages held back?

J.



No, apt-get report did no report held back.

phenigma

  • LinuxMCE God
  • ****
  • Posts: 1758
    • View Profile
Re: Asterisk CDR registering error.
« Reply #6 on: February 28, 2013, 02:32:50 pm »
No, apt-get report did no report held back.

Try:

Code: [Select]
apt-get install --reinstall lmce-asterisk

J.

pw44

  • Addicted
  • *
  • Posts: 666
    • View Profile
Re: Asterisk CDR registering error.
« Reply #7 on: March 01, 2013, 12:35:39 am »
apt-get install --reinstall lmce-asterisk done. What's next?

phenigma

  • LinuxMCE God
  • ****
  • Posts: 1758
    • View Profile
Re: Asterisk CDR registering error.
« Reply #8 on: March 01, 2013, 12:52:39 am »
That should have installed a newer db_phone_config.sh script with the additional entries in the config.  If it did not you may need to clear your apt cache and try the reinstall again.

J.
« Last Edit: March 01, 2013, 01:42:44 am by phenigma »

pw44

  • Addicted
  • *
  • Posts: 666
    • View Profile
Re: Asterisk CDR registering error.
« Reply #9 on: March 01, 2013, 11:56:19 pm »
Thx J and Carlos,
worked like a charm. Now, registering the incoming calls correctly.
Thx again.

phenigma

  • LinuxMCE God
  • ****
  • Posts: 1758
    • View Profile
Re: Asterisk CDR registering error.
« Reply #10 on: March 02, 2013, 06:18:46 pm »
Your welcome.  Glad it's back up and working!

Jason.