centrex
Member
- Joined
- Aug 7, 2016
- Messages
- 34
- Reaction score
- 5
Incredible PBX 12.0.74 on CentOS Linux release 7.3.1611 with Asterisk 13.13.1.
OpenCNAM wasn't working for me. When using the GUI module to set up OpenCNAM I noticed it uses a deprecated API call.
Example: Let's say my OpenCNAM SID is AAAAAAAAAA and my AuthToken is X0X0X0X0X0.
If I enter this into the GUI and apply, the pertinent /etc/asterisk/extensions_additional.conf entry where we construct the URL for curl is going to be:
exten => cidlookup_2,n,Set(CALLERID(name)=${CURL(AAAAAAAAAA:X0X0X0X0X0@https://api.opencnam.com/v2/phone/${CALLERID(num)}?format=pbx&ref=freepbx)})
What it needs to be in order to make it work today is more something like:
exten => cidlookup_2,n,Set(CALLERID(name)=${CURL(https://api.opencnam.com/v3/phone/${CALLERID(num)}?account_sid=AAAAAAAAAA&auth_token=X0X0X0X0X0&service-level=plus)})
I edited it manually and no longer had curl timeouts.
But my question now is... How do I prevent the GUI to overwrite it back with bad stuff if I make any kind of changes in the GUI ? Do I need to deactivate the OpenCNAM provider in the GUI, reload, and then manually edit my /etc/asterisk/extensions_additional.conf ?
Or is there a newer version of this module ? Whenever I go "check modules online" it says I am all up to date.
OpenCNAM wasn't working for me. When using the GUI module to set up OpenCNAM I noticed it uses a deprecated API call.
Example: Let's say my OpenCNAM SID is AAAAAAAAAA and my AuthToken is X0X0X0X0X0.
If I enter this into the GUI and apply, the pertinent /etc/asterisk/extensions_additional.conf entry where we construct the URL for curl is going to be:
exten => cidlookup_2,n,Set(CALLERID(name)=${CURL(AAAAAAAAAA:X0X0X0X0X0@https://api.opencnam.com/v2/phone/${CALLERID(num)}?format=pbx&ref=freepbx)})
What it needs to be in order to make it work today is more something like:
exten => cidlookup_2,n,Set(CALLERID(name)=${CURL(https://api.opencnam.com/v3/phone/${CALLERID(num)}?account_sid=AAAAAAAAAA&auth_token=X0X0X0X0X0&service-level=plus)})
I edited it manually and no longer had curl timeouts.
But my question now is... How do I prevent the GUI to overwrite it back with bad stuff if I make any kind of changes in the GUI ? Do I need to deactivate the OpenCNAM provider in the GUI, reload, and then manually edit my /etc/asterisk/extensions_additional.conf ?
Or is there a newer version of this module ? Whenever I go "check modules online" it says I am all up to date.
Last edited: