[Home]

Summary:ASTERISK-19291: Background in realtime
Reporter:Andrew Nowrot (andrutto)Labels:
Date Opened:2012-02-02 04:34:37.000-0600Date Closed:2017-06-05 07:36:57
Priority:MinorRegression?
Status:Closed/CompleteComponents:PBX/pbx_realtime
Versions:10.1.0 Frequency of
Occurrence
Constant
Related
Issues:
Environment:Debian wheezy with 3.1.0 custom kernelAttachments:( 0) dialplan_extensions_conf.txt
( 1) issue_19291_full_log
Description:When user hangs up during playing audio files in Background used in realtime extensions with postgres I am getting this log on the console:
[Feb  1 23:04:54] ERROR[4831]: res_config_pgsql.c:166 _pgsql_exec: PostgreSQL RealTime: Failed to query 'extensions_conf@asterisk'.
[Feb  1 23:04:54] ERROR[4831]: res_config_pgsql.c:167 _pgsql_exec: PostgreSQL RealTime: Query Failed: SELECT * FROM extensions_conf WHERE exten LIKE '�%' AND context = 'Ivr-main' AND priority = '1'
[Feb  1 23:04:54] ERROR[4831]: res_config_pgsql.c:168 _pgsql_exec: PostgreSQL RealTime: Query Failed because: ERROR:  postgres invalid byte sequence for encoding "UTF8": 0xff
 (PGRES_FATAL_ERROR)
In never happend during execution of other applications in realtime; always in Background.
Comments:By: Matt Jordan (mjordan) 2012-02-08 14:12:50.779-0600

We require a complete debug log to help triage the issue. This document will provide instructions on how to collect debugging logs from an Asterisk machine for the purpose of helping bug marshals troubleshoot an issue: https://wiki.asterisk.org/wiki/display/AST/Collecting+Debug+Information



By: Andrew Nowrot (andrutto) 2012-02-09 17:23:43.527-0600

Log file attached!

By: Matt Jordan (mjordan) 2012-02-20 09:48:45.494-0600

Andrew:

The error here appears to be that something is passing an escape sequence to the postgresql database.  From the logs:

[Feb  9 23:44:34] ERROR[13881] res_config_pgsql.c: PostgreSQL RealTime: Query Failed: SELECT * FROM extensions_conf WHERE exten LIKE '\FF%' AND context = 'Ivr-main' AND priority = '1'
[Feb  9 23:44:34] ERROR[13881] res_config_pgsql.c: PostgreSQL RealTime: Query Failed because: ERROR:   invalid byte sequence for encoding "UTF8": 0xff
(PGRES_FATAL_ERROR)

I'm guessing that '\FF%' isn't an extension you are trying to find, but rather 'FF%'.  As such, this looks to be a configuration error in the scripts driving your external IVR.

By: Andrew Nowrot (andrutto) 2012-02-21 04:30:27.322-0600

Hi Matt

Thanks for your answer.

The only action preformed by calling user is the call hangup. What kind of extensions is  asterisk  trying to find when user hangsup?
Like I wrote in the first report the error only occurs when user hangs up during listening to BackGround audio file.

By: Matt Jordan (mjordan) 2012-02-21 08:21:07.433-0600

Hanging up a call can call the 'h' extension.

I think in order to determine why it would attempt to jump to an unknown extension, we'd need to know your dialplan in extensions_conf.  The Background application has the capability to jump to a variety of extensions, depending on DTMF keypress, which can also complicate this.

By: Andrew Nowrot (andrutto) 2012-02-21 16:39:18.908-0600

I have attached another file with my dialplan and extensions_conf table.

I have tried also without h and _XX extension, but same error occur on hangup. I just want to stress that, I did not enter any digits only hang up the call while listening to audiofiles in Background app.

Best regards

By: Matt Jordan (mjordan) 2012-03-05 13:53:02.086-0600

I've acknowledged this as an issue to move this into the Open status.  Please keep in mind that realtime extensions is in extended support, which means that support for it primarily comes from the Asterisk Developer community.  Response times may reflect that.

https://wiki.asterisk.org/wiki/display/AST/Asterisk+Module+Support+States

By: Walter Doekes (wdoekes) 2012-04-17 15:38:21.777-0500

Andrew, if you add a #define NEED_DEBUG_HERE at the top of main/pbx.c, like this:
{noformat}
--- main/pbx.c (revision 362353)
+++ main/pbx.c (working copy)
@@ -1,3 +1,4 @@
+#define NEED_DEBUG_HERE
/*
 * Asterisk -- An open source telephony toolkit.
 *
{noformat}
and reupload a debug log with the new information, that might provide the needed clues for a quick fix.

By: Friendly Automation (friendly-automation) 2017-06-05 07:36:59.001-0500

Change 5746 merged by Jenkins2:
pbx_builtin: Properly handle hangup during Background

[https://gerrit.asterisk.org/5746|https://gerrit.asterisk.org/5746]

By: Friendly Automation (friendly-automation) 2017-06-05 08:09:13.243-0500

Change 5748 merged by Joshua Colp:
pbx_builtin: Properly handle hangup during Background

[https://gerrit.asterisk.org/5748|https://gerrit.asterisk.org/5748]

By: Friendly Automation (friendly-automation) 2017-06-05 08:46:27.489-0500

Change 5747 merged by Joshua Colp:
pbx_builtin: Properly handle hangup during Background

[https://gerrit.asterisk.org/5747|https://gerrit.asterisk.org/5747]