machtudong / asterisk-chan-dongle

Automatically exported from code.google.com/p/asterisk-chan-dongle
Other
0 stars 0 forks source link

duplicate entries in the CDR when recieved ussd,sms #193

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

   ast-srv*CLI> dongle ussd dongle1 *100#

What is the expected output?

   One CDR record, 2st(in debug it's 1st) enties always empty and not needed.

What do you see instead?

   [dongle1] USSD queued for send with id 0x7f2728013860
      -- [dongle1] Successfully sent USSD 0x7f2728013860

   NOTICE[3134]: at_response.c:267 at_response_ok: [dongle1] Successfully sent USSD 0x7f2728013860

   [dongle1] Got USSD type 0 'USSD Notify': '6119.19'
      -- Executing [ussd@incoming:1] NoOp("Local/ussd@incoming-00000010;1", "6119.19") in new stack
      -- Auto fallthrough, channel 'Local/ussd@incoming-00000010;1' status is 'UNKNOWN'

   DEBUG[3364][C-00000044]: channel.c:2661 ast_softhangup_nolock: Soft-Hanging up channel 'Local/ussd@incoming-00000010;1'
   DEBUG[3364][C-00000044]: channel.c:2840 ast_hangup: Hanging up channel 'Local/ussd@incoming-00000010;1'
   DEBUG[3364][C-00000044]: channel.c:2840 ast_hangup: Hanging up channel 'Local/ussd@incoming-00000010;2'

   DEBUG[3364][C-00000044]: cdr_mysql.c:336 mysql_log: Inserting a CDR record.
   DEBUG[3364][C-00000044]: cdr_mysql.c:339 mysql_log: SQL command as follows: INSERT INTO cdr () VALUES ('ussd','incoming','Local/ussd@incoming-00000010;2','0','0','0','NO ANSWER','3','1418387550.94')
   DEBUG[3122]: chan_local.c:303 local_devicestate: Checking if extension ussd@incoming exists (devicestate)
   DEBUG[3122]: devicestate.c:467 do_state_change: Changing state for Local/ussd@incoming - state 1 (Not in use)
   DEBUG[3122]: devicestate.c:442 devstate_event: device 'Local/ussd@incoming' state '1'

   DEBUG[3364][C-00000044]: cdr_mysql.c:336 mysql_log: Inserting a CDR record.
   DEBUG[3364][C-00000044]: cdr_mysql.c:339 mysql_log: SQL command as follows: INSERT INTO cdr () VALUES ('ussd','incoming','Local/ussd@incoming-00000010;1','NoOp','6119.19','0','0','0','NO ANSWER','3','1418387550.93')
   DEBUG[3122]: chan_local.c:303 local_devicestate: Checking if extension ussd@incoming exists (devicestate)
   DEBUG[3122]: devicestate.c:467 do_state_change: Changing state for Local/ussd@incoming - state 1 (Not in use)
   DEBUG[3122]: devicestate.c:442 devstate_event: device 'Local/ussd@incoming' state '1'

What version of the product are you using? On what operating system?

   Asterisk 11.14.1 (asterisk.org repo)
   chan_dongle: Huawei 3G Dongle Channel Driver, Version 1.1, Revision 34
   Centos 6, kernel 3.10.61-1.el6.elrepo.x86_64

Original issue reported on code.google.com by roman.ginovich on 12 Dec 2014 at 12:59

GoogleCodeExporter commented 9 years ago
handle your @ussd exten correctly 

Original comment by bg_...@mail.ru on 27 Dec 2014 at 6:21

GoogleCodeExporter commented 9 years ago
[incoming]
exten => ussd,1,NoCDR
 same => n,System(echo '${STRFTIME(${EPOCH},,%Y-%m-%d %H:%M:%S)} - ${DONGLENAME}: ${BASE64_DECODE(${USSD_BASE64})}' >> /var/log/asterisk/ussd.txt)
 same => n,Hangup

Now this dialplan, but in the CDR one empty record (2st normal record disabled 
NoCDR() application).

Original comment by roman.ginovich on 27 Dec 2014 at 3:13