[Spce-user] Soap create voip account

jchism2 jchism2 at gmail.com
Fri Mar 28 10:39:28 EDT 2014


Thanks. That worked. 


Sent via the Samsung Galaxy Note® 3, an AT&T 4G LTE smartphone

-------- Original message --------
From: Szabó János <szabojanos at nagytv.hu> 
Date:03/28/2014  9:07 AM  (GMT-06:00) 
To: jchism2 <jchism2 at gmail.com>,spce-user at lists.sipwise.com 
Subject: Re: [Spce-user] Soap create voip account 

Hi! 

You need some little modification in the soap method
you wrote this:
$job = array('authentication' => array('type' => 'admin', 'username' => 'xxxxxxx', 'password' => 'xxxxxx'),'parameters' => array('billing_profile' => 'default', 'status' => 'active', 'external_id' => $trunkname));

and you need this: 
$job = array('authentication' => array('type' => 'admin', 'username' => 'xxxxxxx', 'password' => 'xxxxxx'),
'parameters' => array(
'data' => array( 
    'billing_profile' => 'default',
    'status' => 'active',
    'external_id' => $trunkname)));

John

2014.03.28. 14:55 keltezéssel, jchism2 írta:

Here is the code we are using. It is replying with a missing billing profile error. Can you see anything in this code that         would cause the problem. We are using the default profile for billing. 

require_once($_SERVER['DOCUMENT_ROOT'].'/sites/all/data/nusoap/lib/nusoap.php');    //   I had to get the SOAP library in place on  SERVER A for NUSOAP //--not the yum install php-soap 



// Create the client instance
$client = new nusoap_client($_SERVER['DOCUMENT_ROOT'].'/sites/all/data/Provisioning.wsdl', true);
//$client->soap_defencoding = 'UTF-8'; // We had noticed the client defaults to something else. Doesn't seem to effect either way?

$client->setCredentials("xxxx","xxxxxxx","basic");  // The Login and Pass for the SOAP connection - Username and pass on PORT 2443



// Call the SOAP method
$job = array('authentication' => array('type' => 'admin', 'username' => 'xxxxxxx', 'password' => 'xxxxxx'),'parameters' => array('billing_profile' => 'default', 'status' => 'active', 'external_id' => $trunkname));

$result = $client->call('create_voip_account',$job);  // This is just a test pull of information for proof of concept, nothing really for production use.



//print_r($job);


// Check for a fault
if ($client->fault) {
    echo '<h2>Fault</h2><pre>';
    print_r($result);
    echo '</pre>';
}


else
{
  // Check for errors
  $err = $client->getError();
  if ($err)
  {
    // Display the error
    echo '<h2>Error</h2><pre>' . $err . '</pre>';
  }
  else
  {
  // Display the result
  echo '<h2>Result</h2><pre>';
  print_r($result);
  echo '</pre>';
  }
}

exit(0);

Sent via the Samsung Galaxy Note® 3, an AT&T 4G LTE smartphone


_______________________________________________
Spce-user mailing list
Spce-user at lists.sipwise.com
http://lists.sipwise.com/listinfo/spce-user

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sipwise.com/pipermail/spce-user_lists.sipwise.com/attachments/20140328/841b4be4/attachment-0001.html>


More information about the Spce-user mailing list