instedd / verboice

Open source toolkit for voice services; with special focus to the needs of medium- and low-income countries, scalable services, and interacting with vulnerable populations
http://verboice.instedd.org/
GNU General Public License v3.0
45 stars 18 forks source link

Call log detail fails to open when failure error is 'Unallocated (unassigned) number' #829

Closed pmallol closed 5 years ago

pmallol commented 5 years ago

Version 3.3-dev-f78948c

It was working ok in Version 3.1.4

Preconditions: There is a call flow 'Foo'. 'Foo' has some steps. There is channel 'Bar' with a Callcentric number

1 - Open project On the right panel: 2 - Select Call flow 'Foo' 3 - Select the Channel 'Bar' 8 - Provide a fake phone number 9 - Press "Enqueue calls" button

Obtained: The call fails. Accessing the call details through the Calls tab redirects the user to a 500 error page. Call ID > https://verboice-stg.instedd.org/calls/87691 or /87690

The web-2 container in Rancher shows the following information:

1/25/2019 4:53:11 PM[2019-01-25 19:53:11.497]  INFO    Parameters: {"id"=>"87690"}
1/25/2019 4:53:11 PM[2019-01-25 19:53:11.507]  INFO  Completed 500 Internal Server Error in 10.5ms
1/25/2019 4:53:11 PM
1/25/2019 4:53:11 PM[2019-01-25 19:53:11.510] FATAL  NoMethodError (undefined method `has_key?' for nil:NilClass):
1/25/2019 4:53:11 PM  app/models/call_log.rb:128:in `block in poirot_activities'
1/25/2019 4:53:11 PM  app/models/call_log.rb:128:in `poirot_activities'
1/25/2019 4:53:11 PM  app/controllers/call_logs_controller.rb:54:in `prepare_log_detail'

When accessing the rails console, the CallLogEntry details for call id: 87691 only shows the description key.

#<CallLogEntry id: 87691, call_id: 33294, severity: "error", created_at: "2016-05-17 21:30:58", updated_at: "2016-05-17 21:30:58", details: {:description=>"Call was rejected. (Reason: failed)"}>

waj commented 5 years ago

This was due to a corruption on BLOBs in the database. It happens when the NO_BACKSLASH_ESCAPES mode is enabled in MySQL.

pmallol commented 5 years ago

Ok in Version 3.3-dev-69e2aac