Created by: TONY GALEK on 15-09-2010 01:28:09 PM I'm using the PHP below to add a line in my 6.1 UCM and everything seems to work except the 'voiceMailProfileName' will not update the voicemail profile. When I do an AXL trace that one items doesn't show up in the SOAP envelope. Anyone see the issue with my code? Thanks in advance for the help. <html> <head> <title>Add Phone</title> </head> <body> <?php /* ************************************************** * This Script will import Phones into CUCM 7.1.2 * * using AXL SOAP (AXIS) * ************************************************** */ // vars define('CUCM_SERVER_IP', '10.5.12.3'); define('CUCM_SERVER_PORT','8443'); define('CUCM_AXL_USER', 'test'); define('CUCM_AXL_PASS', 'test'); define('CUCM_AXL_API', '/xampp/soap/AXLAPI.wsdl'); //test data $firstName = 'Tony'; $lastName = 'Galek'; $phoneType = '7911'; $extension = '4738270'; $vmprofile = 'INT_vmprofile'; $vmcss = 'ATL_unrestricted'; $cfdcss = 'INT_unrestricted'; $partition = 'internal';
$phoneButtonTemplate = '7911-1L'; // start soap_client $client = new SoapClient(CUCM_AXL_API, array('trace'=>true, 'exceptions'=>true, 'location'=>"[url=https://".CUCM_SERVER_IP.":".CUCM_SERVER_PORT."/axl]https://".CUCM_SERVER_IP.":".CUCM_SERVER_PORT."/axl", 'login'=>CUCM_AXL_USER, 'password'=>CUCM_AXL_PASS)); // add the line first $response = $client->addLine(array("newLine"=>array( "pattern"=>$extension, "description"=>$firstName." ".$lastName."", "usage"=>"Device", "routePartitionName"=>$partition, "alertingName"=>$firstName." ".$lastName."", "asciiAlertingName"=>$firstName." ".$lastName."", "callForwardAll"=>array("forwardToVoiceMail"=>"","callingSearchSpaceName"=>$cfdcss,"secondaryCallingSearchSpaceName"=>$cfdcss), "callForwardBusy"=>array("forwardToVoiceMail"=>"t","callingSearchSpaceName"=>$cfdcss), "callForwardBusyInt"=>array("forwardToVoiceMail"=>"t","callingSearchSpaceName"=>$cfdcss), "callForwardNoAnswer"=>array("forwardToVoiceMail"=>"t","callingSearchSpaceName"=>$cfdcss), "callForwardNoAnswerInt"=>array("forwardToVoiceMail"=>"t","callingSearchSpaceName"=>$cfdcss), "callForwardNoCoverage"=>array("forwardToVoiceMail"=>"t","callingSearchSpaceName"=>$cfdcss), "callForwardNoCoverageInt"=>array("forwardToVoiceMail"=>"t","callingSearchSpaceName"=>$cfdcss), "callForwardOnFailure"=>array("forwardToVoiceMail"=>"t","callingSearchSpaceName"=>$cfdcss), "callForwardNotRegistered"=>array("forwardToVoiceMail"=>"t","callingSearchSpaceName"=>$cfdcss), "callForwardNotRegisteredInt"=>array("forwardToVoiceMail"=>"t","callingSearchSpaceName"=>$cfdcss), "voiceMailProfileName"=>$vmprofile, ))); $lineuuid = $response->return; echo "AddLine returned Line UUID: ".$lineuuid."<br>\n"; ?> </body> </html>
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: