Dialler
From SoftIVR
Triggering an outbound call
SoftIVR can trigger an outbound call, and, on connection, will run a specified service. To trigger a call, make an HTTP request to
https://www.softivr.com/trigger.php?email=<mail>&softivr_id=<x>&ntd=<ntd>&service=<service>&hash=<md5>
where:
- <mail> is replaced by the e-mail address used to log in to the SoftIVR portal
- <x> is the numeric ID of the SoftIVR instance that should make the call
- <ntd> is the number to dial, formatted as per the dial command - make sure any leading '+' is urlencoded
- <service> is the number to bridge the call to on the IVR
- <md5> is an MD5 hash of the querystring excluding &hash= + the password used to log in to the portal
Note that this is an HTTPS call for security.
The service will be called at the point that the outbound call starts ringing. For calls initiated in this way, the functionality of the answer() function is modified to wait for the outbound leg to be answered.
Sample Perl code which will trigger an outbound call:
#!/usr/bin/perl -w use strict; use LWP::Simple; use URI::Escape; use Digest::MD5 qw (md5_hex); my $email = "support\@softivr.com"; my $password = "xxxxxx"; my $softivr_id = 1; my $ntd = "+44800500005"; my $service = "1001"; my $url = "https://www.softivr.com/trigger.php"; # Build querystring my $qstr = "email=" . uri_escape($email) . "&softivr_id=" . uri_escape($softivr_id) . "&ntd=" . uri_escape($ntd) . "&service=" . uri_escape($service); # Add hash $qstr .= "&hash=" . md5_hex($qstr . $password); # Trigger call my $res = get($url . "?" . $qstr); print $res;