nethesis / dev

Nethesis issue tracker
http://www.nethesis.it
4 stars 1 forks source link

NethVoice integration with custom APIs #6173

Closed Stell0 closed 2 years ago

Stell0 commented 2 years ago

There is the need to integrate NethVoice with external products and interact using REST APIs

  1. Resolve name of incoming/outgoing calls using a custom REST API instead of the default mysql

    • search for custom scripts in /usr/src/nethvoice/lookup.d
    • if a custom scrip is found, call it with the number to resolve as parameter
    • custom script should output a JSON with this format {"company"=>"foo","name"=>"bar","number"=>"123456789"}
    • if no custom script exists, or if scripts doesn't return company and name, mysql should be used as before
  2. Add more variables to Parameterized URLs calling an external API

    • create a sample PHP page that takes Parameterized URL parameters ($CALLER_NUMBER, $CALLER_NAME, $CALLED, $UNIQUEID) and use those to retrieve the "customer code" using a REST API and then does a redirect to another page with customer code as argument
  3. call a POST at the end of a call with CDR data

    • create a custom CTI CdrScript that makes a POST sending its parameters
  4. Documentation:

    1. Create a sample script that uses an external API (this can be delayed to use the first real world case as example)
    2. Create a sample page with comments and instructions
    3. Create a sample script with comments and instructions
Stell0 commented 2 years ago

Test case:

nethbot commented 2 years ago

in 7.9.2009/nethesis-testing:

nethbot commented 2 years ago

in 7.9.2009/nethesis-testing:

nethbot commented 2 years ago

in 7.9.2009/nethesis-testing:

nethbot commented 2 years ago

in 7.9.2009/nethesis-updates: