Skip to content

Instantly share code, notes, and snippets.

@cloudvoxcode
cloudvoxcode / cloudvox-example-call-in.php
Created August 6, 2009 21:47
Receive phone call with PHP
#!/usr/bin/php -q
<?php
# Cloudvox - answer and control a phone call using PHP
# Place and receive phone calls via open API: http://cloudvox.com/
# Learn about call scripting, Asterisk/AGI, voice apps: http://help.cloudvox.com/
require('phpagi.php');
set_time_limit(30);
$AGI = new AGI();
@cloudvoxcode
cloudvoxcode / ExampleCallOut.java
Created August 6, 2009 21:46
Place phone call with Java
/* Cloudvox - place an outgoing call with Java
Place and receive phone calls via open API: http://cloudvox.com/
Learn about call scripting, Asterisk/AGI, voice apps: http://help.cloudvox.com/ */
import java.io.IOException;
import org.asteriskjava.manager.AuthenticationFailedException;
import org.asteriskjava.manager.ManagerConnection;
import org.asteriskjava.manager.ManagerConnectionFactory;
import org.asteriskjava.manager.TimeoutException;
import org.asteriskjava.manager.action.OriginateAction;
@cloudvoxcode
cloudvoxcode / ExampleCallIn.java
Created August 6, 2009 21:45
Receive phone call with Java
/* Cloudvox - answer and control a phone call with Java
Place and receive phone calls via open API: http://cloudvox.com/
Learn about call scripting, Asterisk/AGI, voice apps: http://help.cloudvox.com/ */
import org.asteriskjava.fastagi.AgiChannel;
import org.asteriskjava.fastagi.AgiException;
import org.asteriskjava.fastagi.AgiRequest;
import org.asteriskjava.fastagi.BaseAgiScript;
/* Example incoming call handler
@cloudvoxcode
cloudvoxcode / cloudvox-example-call-out.pl
Created August 6, 2009 21:44
Place phone call with Perl
#!/usr/bin/perl
# Cloudvox - place an outgoing call using Perl
# Place and receive phone calls via open API: http://cloudvox.com/
# Learn about call scripting, Asterisk/AGI, voice apps: http://help.cloudvox.com/
use Asterisk::Manager;
# Number to call (10 digits, no leading 1 or 9)
my $call = '12065551234';
# Cloudvox outgoing settings. If you don't have these, create a free account
@cloudvoxcode
cloudvoxcode / cloudvox-example-call-in.pl
Created August 6, 2009 21:42
Receive phone call with Perl
#!/usr/bin/perl
use Cloudvox;
# start Asterisk Gateway Interface (AGI) server on port 4573
Cloudvox->run(port => 4573);