CID Superfecta - "Send to URL"-Option, additional parameters available?

Hi,

we are using the CID Superfecta Option to send Phonenumber and Name to a MS SQL Server.
Is it possible to send additional parameters (like DID) with this option? I could not find any information about it.

Beside this, I want to share my solution (Send information to MS SQL Server) with the community. Is there a prefered way to do this?

Thank you!

Not too difficult, it’s a nice beginner project. The code is in the file:

/var/www/html/admin/modules/superfecta/sources/source-Send_to_URL.module

In that same folder you will see other superfecta modules that do reference DID such as the Send to Email module. You can adapt the same technique used there.

Thank you.
A have some other things to do first, but I will insert my solution to this thread after finishing the task.

My solution
All custom changes are marked. You have to add ‘&DID=[DESTINATION]’ to your URL

function post_processing($cache_found, $winning_source, $first_caller_id, $run_param, $thenumber)
{
    /* Custom Change */
    $from_did = "";
    
    if(isset($this->trunk_info['dnid']))
    {
        $from_did = $this->trunk_info['dnid'];
    }
    else 
    {
        $from_did = "Unknown Destination";
    }
    /* End Custom Change */
   
    if (($run_param['URL_address'] != '') && ($first_caller_id != ''))
    {
        // replace [NAME] and [NUMBER] placeholders with actual urlencoded values
   $url = $run_param['URL_address'];
   $url = str_replace('[NAME]',  urlencode($first_caller_id), $url);
   $url = str_replace('[NUMBER]', urlencode($thenumber), $url);
   $url = str_replace('[name]',  urlencode($first_caller_id), $url);
       $url = str_replace('[number]', urlencode($thenumber), $url);

     /* Custom Change */
    $url = str_replace("[DESTINATION]", urlencode($from_did), $url);
     /* End Custom Change */

        $this->DebugPrint("Send to URL: {$url}");

        $value = $this->get_url_contents($url);
    }
}

}

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.