Child pages
  • Adding Users with PHP
Skip to end of metadata
Go to start of metadata

This uses the sipXconfig SOAP API.

Creating a sipXecs user with PHP


function addSipXecsUser($ext,$fname,$lname,$pin,$alias)
	$client = new SoapClient("https://sipx:8443/sipxconfig/services/UserService?wsdl", array('login' => "superadmin", 'password' => "your_sipxecs_superadmin_pw_here", 'authentication' => SOAP_AUTHENTICATION_DIGEST));
	try {
		//this is the data from the <complexType name="User"> field -- it's all optional so make sure the single quotes match the wsdl then poulate the doubles with whatever you want
		$userdata = array('userName'=>$ext, 'lastName' => $lname, 'firstName' => $fname, 'sipPassword'=>randomKey(), 'emailAdress'=>$alias."", 'aliases'=>$alias);
		//probably won't change this line - the userdata is from the array above, the pin is generated by the end user as their voicemail key
		$user = array('user'=>$userdata, 'pin'=>$pin);
		//make the soap call
	catch (SoapFault $soapFault) 
	//post soap functionality
		return "error";
		return "success";

  • No labels