Voicemail data not insert into postgres database using odbc

hi…i am trying to insert the voicemail data into postgres using odbc but cli show the following error [code] Called SIP/4000
– SIP/4000-00000035 is ringing
– Nobody picked up in 10000 ms
– Executing [500@voicemail:2] Set(“SIP/7000-00000034”, “caller_id=7000”) in new stack
– Executing [500@voicemail:3] System(“SIP/7000-00000034”, "psql -U asterisk --dbname=asterisk --command=“update test set test_id=test_id+1"”) in new stack
– Executing [500@voicemail:4] VoiceMail(“SIP/7000-00000034”, “500@MyVoiceMail,u”) in new stack
> 0x7f166c024be0 – Probation passed - setting RTP source address to 202.141.151.100:8000
– <SIP/7000-00000034> Playing ‘vm-theperson.gsm’ (language ‘en’)
> 0x7f166c024be0 – Probation passed - setting RTP source address to 202.141.151.100:8000
– <SIP/7000-00000034> Playing ‘digits/5.gsm’ (language ‘en’)
– <SIP/7000-00000034> Playing ‘digits/0.gsm’ (language ‘en’)
– <SIP/7000-00000034> Playing ‘digits/0.gsm’ (language ‘en’)
– <SIP/7000-00000034> Playing ‘vm-isunavail.gsm’ (language ‘en’)
– <SIP/7000-00000034> Playing ‘vm-intro.gsm’ (language ‘en’)
– <SIP/7000-00000034> Playing ‘beep.gsm’ (language ‘en’)
– Recording the message
– x=0, open writing: /var/spool/asterisk/voicemail/MyVoiceMail/500/tmp/Acs39Y format: wav49, 0x7f1678002138
– User hung up
== Parsing ‘/var/spool/asterisk/voicemail/MyVoiceMail/500/INBOX/msg0000.txt’: Found
[Aug 5 18:31:49] WARNING[22449][C-0000001a]: app_voicemail.c:4086 insert_data_cb: SQL Direct Execute failed!
[Aug 5 18:31:49] WARNING[22449][C-0000001a]: res_odbc.c:608 ast_odbc_direct_execute: SQL Execute error! Verifying connection to asterisk [asterisk-connector]…
[Aug 5 18:31:49] WARNING[22449][C-0000001a]: res_odbc.c:761 ast_odbc_sanity_check: Connection is down attempting to reconnect…
[Aug 5 18:31:49] NOTICE[22449][C-0000001a]: res_odbc.c:1527 odbc_obj_connect: Connecting asterisk
[Aug 5 18:31:49] NOTICE[22449][C-0000001a]: res_odbc.c:1559 odbc_obj_connect: res_odbc: Connected to asterisk [asterisk-connector]
[Aug 5 18:31:49] WARNING[22449][C-0000001a]: app_voicemail.c:4086 insert_data_cb: SQL Direct Execute failed!
[Aug 5 18:31:49] WARNING[22449][C-0000001a]: res_odbc.c:761 ast_odbc_sanity_check: Connection is down attempting to reconnect…
[Aug 5 18:31:49] NOTICE[22449][C-0000001a]: res_odbc.c:1527 odbc_obj_connect: Connecting asterisk
[Aug 5 18:31:49] NOTICE[22449][C-0000001a]: res_odbc.c:1559 odbc_obj_connect: res_odbc: Connected to asterisk [asterisk-connector]
[Aug 5 18:31:49] WARNING[22449][C-0000001a]: app_voicemail.c:4202 store_file: SQL Execute error!
[INSERT INTO voicemessages (dir,msgnum,recording,context,macrocontext,callerid,origtime,duration,mailboxuser,mailboxcontext,flag,msg_id) VALUES (?,?,?,?,?,?,?,?,?,?,?,?)]

== Spawn extension (voicemail, 500, 4) exited non-zero on ‘SIP/7000-00000034’
[/code]

also i am attaching some configuration file and additional debug info pls guide to troubleshoot the issue thank you.
1.voicemail.conf

2.odbc show

[quote]otrs*CLI> odbc show

ODBC DSN Settings

Name: asterisk
DSN: asterisk-connector
Last connection attempt: 1970-01-01 05:30:00
Pooled: No
Connected: Yes
[/quote]3.[quote]odbcinst -q -d
[PostgreSQL]
[/quote]4.[quote]echo “select 1” | isql -v asterisk-connector
±--------------------------------------+
| Connected! |
| |
| sql-statement |
| help [tablename] |
| quit |
| |
±--------------------------------------+
SQL> select 1
±-----------+
| ?column? |
±-----------+
| 1 |
±-----------+
SQLRowCount returns 1
1 rows fetched
SQL> [root@otrs asterisk]#
[/quote]
5.[quote]otrs*CLI> voicemail show users for MyVoiceMail
Command 'voicemail show users for MyVoiceMail ’ failed.
[/quote]