Non-Agent API - Some custom fields not inserting

All installation and configuration problems and questions

Moderators: gerski, enjay, williamconley, Op3r, Staydog, gardo, mflorell, MJCoate, mcargile, Kumba, Michael_N

Non-Agent API - Some custom fields not inserting

Postby rhonautics » Fri Jan 08, 2021 11:46 am

I've been using non-agent api for some time now, and it works fine with the default fields. However, when I tried to use custom fields, some of the fields are not inserted into the custom_<list_id> table.

http://www.vicidial.org/docs/NON-AGENT_API.txt

My query string are as shown below:
Code: Select all
custom_fields=Y&ip_address=www.xxx.yyy.zzz&subid=qwerty&subsubid=zxcvb&insertdate=2021-01-08&inserttime=1000H&pain_location=joint

Only ip_address, subid, subsubid & insertdate are stored. inserttime & pain_location is not inserted into the custom_<list_id> table. I've checked the column name on the custom fields table, it matches the query string parameters.

Is there something that I've missed out, or limitations of non-agent api that I'm not aware of perhaps?
Vicibox 8.0.1 ISO Install | Cluster Database | VERSION: 2.14-897a BUILD: 230927-0857 | Intel Xeon E5-2630v4 2.2GHz | 32GB RAM | 6x600GB SAS
Vicibox 8.0.1 ISO Install | Cluster Web Server, Telephony Servers | VERSION: 2.14-897a BUILD: 230927-0857
rhonautics
 
Posts: 25
Joined: Wed Nov 05, 2014 5:57 am
Location: Legazpi City, Philippines

Re: Non-Agent API - Some custom fields not inserting

Postby carpenox » Fri Jan 08, 2021 12:03 pm

which function are you trying to use?
Alma Linux 9.3 | SVN Version: 3822 | DB Schema Version: 1711 | Asterisk 18.18.1
www.dialer.one -:- 1-833-DIALER-1 -:- https://linktr.ee/CyburDial -:- WhatsApp: +19549477572 -:- Skype: live:carpenox_3 | Discord: https://discord.gg/DVktk6smbh
carpenox
 
Posts: 2247
Joined: Wed Apr 08, 2020 2:02 am
Location: St Petersburg, FL

Re: Non-Agent API - Some custom fields not inserting

Postby rhonautics » Fri Jan 08, 2021 12:15 pm

I'm trying to add lead using add_lead function. Default fields works but custom fields are picky.
Vicibox 8.0.1 ISO Install | Cluster Database | VERSION: 2.14-897a BUILD: 230927-0857 | Intel Xeon E5-2630v4 2.2GHz | 32GB RAM | 6x600GB SAS
Vicibox 8.0.1 ISO Install | Cluster Web Server, Telephony Servers | VERSION: 2.14-897a BUILD: 230927-0857
rhonautics
 
Posts: 25
Joined: Wed Nov 05, 2014 5:57 am
Location: Legazpi City, Philippines

Re: Non-Agent API - Some custom fields not inserting

Postby carpenox » Fri Jan 08, 2021 12:32 pm

does the api user have this enabled? Custom Fields Modify = 1

Image
Alma Linux 9.3 | SVN Version: 3822 | DB Schema Version: 1711 | Asterisk 18.18.1
www.dialer.one -:- 1-833-DIALER-1 -:- https://linktr.ee/CyburDial -:- WhatsApp: +19549477572 -:- Skype: live:carpenox_3 | Discord: https://discord.gg/DVktk6smbh
carpenox
 
Posts: 2247
Joined: Wed Apr 08, 2020 2:02 am
Location: St Petersburg, FL

Re: Non-Agent API - Some custom fields not inserting

Postby rhonautics » Fri Jan 08, 2021 12:59 pm

Yes, also these options.

Modify Leads - 1
Custom Fields Modify - 1
Agent API Access -1
API Allowed Functions - All Functions

Still the same.
Vicibox 8.0.1 ISO Install | Cluster Database | VERSION: 2.14-897a BUILD: 230927-0857 | Intel Xeon E5-2630v4 2.2GHz | 32GB RAM | 6x600GB SAS
Vicibox 8.0.1 ISO Install | Cluster Web Server, Telephony Servers | VERSION: 2.14-897a BUILD: 230927-0857
rhonautics
 
Posts: 25
Joined: Wed Nov 05, 2014 5:57 am
Location: Legazpi City, Philippines

Re: Non-Agent API - Some custom fields not inserting

Postby carpenox » Fri Jan 08, 2021 1:04 pm

msg me on skype ill try to help you troubleshoot it and we can report back the fix afterwards
Alma Linux 9.3 | SVN Version: 3822 | DB Schema Version: 1711 | Asterisk 18.18.1
www.dialer.one -:- 1-833-DIALER-1 -:- https://linktr.ee/CyburDial -:- WhatsApp: +19549477572 -:- Skype: live:carpenox_3 | Discord: https://discord.gg/DVktk6smbh
carpenox
 
Posts: 2247
Joined: Wed Apr 08, 2020 2:02 am
Location: St Petersburg, FL

Re: Non-Agent API - Some custom fields not inserting

Postby rhonautics » Fri Jan 08, 2021 1:13 pm

sounds good. I just sent you a message on skype
Vicibox 8.0.1 ISO Install | Cluster Database | VERSION: 2.14-897a BUILD: 230927-0857 | Intel Xeon E5-2630v4 2.2GHz | 32GB RAM | 6x600GB SAS
Vicibox 8.0.1 ISO Install | Cluster Web Server, Telephony Servers | VERSION: 2.14-897a BUILD: 230927-0857
rhonautics
 
Posts: 25
Joined: Wed Nov 05, 2014 5:57 am
Location: Legazpi City, Philippines

Re: Non-Agent API - Some custom fields not inserting

Postby carpenox » Fri Jan 08, 2021 1:54 pm

wait i just realized that some fields were working and some were not, i didnt pay attention to that at first, im sorry. It has to perhaps be a limitation on the adds lead function
Alma Linux 9.3 | SVN Version: 3822 | DB Schema Version: 1711 | Asterisk 18.18.1
www.dialer.one -:- 1-833-DIALER-1 -:- https://linktr.ee/CyburDial -:- WhatsApp: +19549477572 -:- Skype: live:carpenox_3 | Discord: https://discord.gg/DVktk6smbh
carpenox
 
Posts: 2247
Joined: Wed Apr 08, 2020 2:02 am
Location: St Petersburg, FL

Re: Non-Agent API - Some custom fields not inserting

Postby rhonautics » Fri Jan 08, 2021 11:02 pm

I had to dig into the code of non-agent api. It is checking vicidial_lists_fields first before inserting custom fields to custom_<list_id> table.

This is not a limitation of add_lead function.

In my case, I was creating custom_<list_id> manually with a script that I created to make lead lists on a daily basis but unknowingly bypassed the vicidial_lists_fields.
Vicibox 8.0.1 ISO Install | Cluster Database | VERSION: 2.14-897a BUILD: 230927-0857 | Intel Xeon E5-2630v4 2.2GHz | 32GB RAM | 6x600GB SAS
Vicibox 8.0.1 ISO Install | Cluster Web Server, Telephony Servers | VERSION: 2.14-897a BUILD: 230927-0857
rhonautics
 
Posts: 25
Joined: Wed Nov 05, 2014 5:57 am
Location: Legazpi City, Philippines

Re: Non-Agent API - Some custom fields not inserting

Postby carpenox » Sat Jan 09, 2021 8:11 am

i messaged you back on skype
Alma Linux 9.3 | SVN Version: 3822 | DB Schema Version: 1711 | Asterisk 18.18.1
www.dialer.one -:- 1-833-DIALER-1 -:- https://linktr.ee/CyburDial -:- WhatsApp: +19549477572 -:- Skype: live:carpenox_3 | Discord: https://discord.gg/DVktk6smbh
carpenox
 
Posts: 2247
Joined: Wed Apr 08, 2020 2:02 am
Location: St Petersburg, FL


Return to Support

Who is online

Users browsing this forum: No registered users and 76 guests