Jump to content

SOAP step by step


RobertoAchab
 Share

Recommended Posts

Hallo, I'm Roberto from Italy.

I need help in setting-up an IVR talking SOAP to a php server.

I never used SOAP, I've an apache 2.2.8, php 5.2.6 server.

I can't create an IVR "talking" to the apache.

In the next 3 weeks we're going to run a demo in front of some partners/developers and we want to demonstrate the flexibility of pbxnsip, that we're starting to distribute in Italy right now.

We found the articles in Wikipedia, but on our server it seems to give an XML- parsiing error.

There must be a something that we didn't consider, something really simple pheraphs, but unfortunately we're in a hurry, can someone, please, tell us in a simple step-by-step way what do we have to do?

The samples in the wiki really seem to be written for someone who knows already the bascis of soap communications.

 

Thanks in advance.

Link to comment
Share on other sites

Hallo, I'm Roberto from Italy.

I need help in setting-up an IVR talking SOAP to a php server.

I never used SOAP, I've an apache 2.2.8, php 5.2.6 server.

I can't create an IVR "talking" to the apache.

In the next 3 weeks we're going to run a demo in front of some partners/developers and we want to demonstrate the flexibility of pbxnsip, that we're starting to distribute in Italy right now.

We found the articles in Wikipedia, but on our server it seems to give an XML- parsiing error.

There must be a something that we didn't consider, something really simple pheraphs, but unfortunately we're in a hurry, can someone, please, tell us in a simple step-by-step way what do we have to do?

The samples in the wiki really seem to be written for someone who knows already the bascis of soap communications.

 

Thanks in advance.

 

Hi Roberto,

 

Were the articles you were referring to actually on Wikipedia, or were they on the pbxnsip Wiki? If it wasn't on the pbxnsip Wiki, perhaps you want to look at http://wiki.pbxnsip.com/index.php/Linking_..._to_an_IVR_Node to get an idea of how the response must be presented for the IVR. There is even a very basic example on that page.

 

Hope that helps.

 

Tim

 

PS. Admins, this should probably be under the IVR section....

Link to comment
Share on other sites

Thank for your kind answer, that article was the one i was referring to.

Implementing that sample took us to the "parsing" error, my colleague (I'm not a programmer, he is) thinks there could be a release incompatibility.

The question is, is there anyone who succeded in running that sample?

It would be enough for me, because I only need to do a demo to potential buyers.

 

Thanks again

Link to comment
Share on other sites

The question is, is there anyone who succeded in running that sample?

 

 

Running PHP 5.1.6 on CentOS 5 I am not able to run the sample script. I have even attempted to make these global variables. I am getting the errors below.

 

[Tue Sep 30 13:54:38 2008] [error] [client 127.0.0.1] PHP Notice:  Undefined variable: callid in /var/www/html/soap.php on line 16
[Tue Sep 30 13:54:38 2008] [error] [client 127.0.0.1] PHP Notice:  Undefined variable: output in /var/www/html/soap.php on line 17

 

Tim

Link to comment
Share on other sites

Running PHP 5.1.6 on CentOS 5 I am not able to run the sample script. I have even attempted to make these global variables. I am getting the errors below.

 

[Tue Sep 30 13:54:38 2008] [error] [client 127.0.0.1] PHP Notice:  Undefined variable: callid in /var/www/html/soap.php on line 16
[Tue Sep 30 13:54:38 2008] [error] [client 127.0.0.1] PHP Notice:  Undefined variable: output in /var/www/html/soap.php on line 17

 

Tim

 

In this function

 

function xml_data($parser, $data) {

global $elem, $from_user, $to_user, $from, $to, $duration, $start;

if($elem=="CALLID") $callid .= $data;

else if($elem=="OUTPUT") $output .= $data;

}

 

 

TRY ADDING $callid and $output as GLOBAL variables within this function call.

 

The variables are classed as local until the linked in as GLOBALS. They are first set outside this function, right at he top of the script....

 

<?php

$elem="";

$callid="";

$output="";

 

function start_element($parser, $name, $attrs) {

 

 

Let me know if that makes a difference?

Link to comment
Share on other sites

function xml_data($parser, $data) {

 

<snip>

 

TRY ADDING $callid and $output as GLOBAL variables within this function call.

 

The variables are classed as local until the linked in as GLOBALS. They are first set outside this function, right at he top of the script....

 

<snip>

 

That worked. Perhaps someone with access to the wiki could update the example?

 

Tim

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...