tropo / tropo-webapi-php

A set of PHP classes for working with the Voxeo Tropo WebAPI
MIT License
94 stars 50 forks source link

Conferences without that framework how do I do it? #23

Closed russellharrower closed 10 years ago

russellharrower commented 13 years ago

Hi I just want to know how I create a conference without that frame work this is the code I coded but is wrong

require('tropo/tropo.class.php');

$tropo = new Tropo();
$tropo->say("Welcome to the geek singles hotline!");
$tropo->conference("1337", array(
"terminator"=>"*",
"mute" => false,
"playTones" => true
)
$tropo->say("We hope you had fun, call back soon!");

print $tropo; 
mheadd commented 13 years ago

You need to call:

$tropo->renderJSON();

In order to render JSON for the Tropo platform to consume. You are trying to do this using print.

russellharrower commented 13 years ago

Hi, I am getting this error

[Tropo-Thread-8be252416429d9c8e5cdce420473db18] ApplicationInstance[http://www.bonush.com/phone/index.php , sas_2-15-sm1j3kcv7vq53evtropo] has unknown errors: Cannot get property 'text' on null object java.lang.NullPointerException: Cannot get property 'text' on null object at org.codehaus.groovy.runtime.NullObject.getProperty(NullObject.java:56) at org.codehaus.groovy.runtime.InvokerHelper.getProperty(InvokerHelper.java:156) at org.codehaus.groovy.runtime.callsite.PojoMetaClassGetPropertySite.callGetProperty(PojoMetaClassGetPropertySite.java:41) at com.tropo.rest.JacksonParser.conference(JacksonParser.groovy:196) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:88) at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1058) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:886) at org.codehaus.groovy.runtime.InvokerHelper.invokePogoMethod(InvokerHelper.java:743) at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelpe

my PHP code is <?php include('tropo/tropo.class.php'); $tropo = new Tropo(); $tropo->say("Welcome to the geek singles hotline!"); $tropo->conference("1337", array("terminator"=>"*","mute" => false,"playTones" => true)); $tropo->say("We hope you had fun, call back soon!"); $tropo->renderJSON();

?>

mheadd commented 13 years ago

what version of PHP are you using?

russellharrower commented 13 years ago

PHP5

On Mon, Aug 22, 2011 at 10:40 PM, mheadd < reply@reply.github.com>wrote:

what version of PHP are you using?

Reply to this email directly or view it on GitHub: https://github.com/tropo/tropo-webapi-php/issues/23#issuecomment-1869761

mheadd commented 13 years ago

Which specific version of PHP5 are you using - e.g., 5.2.x, 5.3, etc...

There are some know issues with older version of PHP 5. Please use php_info() to determine your specific version.

Thanks!

jsgoecke commented 10 years ago

Seems resolved, just never closed.