Problem:
Problem updating the e164Mask for my phone by using the function updatePhone.
Getting information from your CUCM-Server is no problem but update shows the prior e164Mask.
Wrong way:
<?php
$client = new SoapClient("[Server-IP]/AXLAPI.wsdl",
array('trace' => 1,
'exceptions' => true,
'cahe_wsdl' => WSDL_CACHE_NONE,
'location' => "https://[CUCM server]/axl",
'login' => '[username]',
'password' => '[password]'));
//Uebermittelte Rufnummer aendern
$telefonname = [SEP....];
$neuenummer = '+491234567890';
$update = $client->updatePhone(array('name'=>$telefonname));
$update->return->lines->line->e164Mask = $neuenummer;
echo("getPhone-Infos: ".$response->return->phone->lines->line->e164Mask)."<br>";
?>
The last getPhone is still showing the old e164Mask.
Solution:
The update needs to be within the form of the following.
<updatePhone>
<name>SEP</name>
<lines>
<line>
<index>1</index>
<dirn>
<pattern>1010</pattern>
</dirn>
<e164Mask>+491234567890</e164Mask>
</line>
</lines>
</updatePhone>
Please note, when getting the phone, you need to get the line index (If it's more than one DN assigned), dn pattern so that you can update to the correct DN with that e164Mask.
Then in php, you update with the array look like this
$line = array("line"=>array("index"=>"1","dirn"=>array("pattern"=>"1010"),"e164Mask"=>"+491234567890"));
$response = $client->updatePhone(array("name"=>"SEP","lines"=>$line));
Comments
0 comments
Please sign in to leave a comment.