From 09191ac2701c977d10f6baee0517303fa4566018 Mon Sep 17 00:00:00 2001 From: Andrew Tomaka Date: Sun, 24 Feb 2013 14:16:57 -0500 Subject: [PATCH] Initial commit with simple call example --- .gitignore | 5 +++++ caller.php | 22 ++++++++++++++++++++++ composer.json | 6 ++++++ conf/settings.yaml.sample | 9 +++++++++ files/sample.xml.sample | 3 +++ 5 files changed, 45 insertions(+) create mode 100644 .gitignore create mode 100644 caller.php create mode 100644 composer.json create mode 100644 conf/settings.yaml.sample create mode 100644 files/sample.xml.sample diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..2b3e6dc --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +vendor/* +composer.lock +conf/*.yaml +files/*.mp3 +files/*.xml diff --git a/caller.php b/caller.php new file mode 100644 index 0000000..ebb7f90 --- /dev/null +++ b/caller.php @@ -0,0 +1,22 @@ +account->calls->create( + $settings['application']['from'], + $settings['application']['to'], + $settings['application']['xml'] + ); +} catch(Exception $e) { + echo 'Error: ' . $e->getMessage(); +} diff --git a/composer.json b/composer.json new file mode 100644 index 0000000..24a5ab7 --- /dev/null +++ b/composer.json @@ -0,0 +1,6 @@ +{ + "require": { + "twilio/sdk": "3.10.*", + "symfony/yaml": "2.1.*" + } +} \ No newline at end of file diff --git a/conf/settings.yaml.sample b/conf/settings.yaml.sample new file mode 100644 index 0000000..3cad406 --- /dev/null +++ b/conf/settings.yaml.sample @@ -0,0 +1,9 @@ +twilio: + sid: TWILIOKEY + token: SECRETTOKEN + +application: + mp3: http://www.domain.com/song-caller/file.xml + to: 15555555555 + from: 15555555555 + time: 1800 diff --git a/files/sample.xml.sample b/files/sample.xml.sample new file mode 100644 index 0000000..e677133 --- /dev/null +++ b/files/sample.xml.sample @@ -0,0 +1,3 @@ + + http://www.atomaka.com/song-caller/golden-girls.mp3 + \ No newline at end of file