blf update/add/delete

Version 1
    This document was generated from CDN thread

    Created by: George Goglidze Berdzenishvili on 31-05-2012 10:45:41 AM
    Hi all,
     
    I'm trying to update/add/delete SD/BLF.
     
    I managed to do all the operations with Speeddials with Admin XML.
    but cannot do it for BLF.
     
    it gives different errors.
     
    1) ADD NEW BLF
    error message: Host not found
     
    but I specify only destination, here's my code snippet:
      1
      2$blf[0] = array("blfDest" => $number, "label" => $fullname, "asciiLabel" => $fullname, "index" => "1");
      3try {
      4 $client->updatePhone(array( "name"=> $device, "busyLampFields" => $blf ));
      5} catch ( SoapFault $soapFault ) {
      6 ShowError($language, $soapFault->getMessage());
      7 exit(0);
      8}
      9[CODE]
     10 
     11the same code for SpeedDial works fine,
     12here's the SD code that works fine:
     13[CODE]
     14$sd[0] = array("dirn" => $number, "label" => $fullname, "asciiLabel" => $fullname, "index" => "1");
     15try {
     16 $client->updatePhone(array( "name"=> $device, "speeddials" => $sd ));
     17} catch ( SoapFault $soapFault ) {
     18 ShowError($language, $soapFault->getMessage());
     19 exit(0);
     20}
     21[CODE]
     22 
     23Please let me know if I'm doing something wrong.
     24 
     25thanks,
     26
     27[b]Subject: [/b]RE: blf update/add/delete
     28 [b]Replied by: [/b]Florian Kroessbacher [b]on [/b]31-05-2012 02:20:05 PM
     29Hy George,
     30
     31in BLF Speeddial there is one Option more for the Destination.
     32I could be a dirn (Number+Partition) or it could only be a destination number (like +431234567)
     33
     34[u]The Speeddial XML consists of the follwing[/u]
     35
     36(dirn,label,asciilabel,index)
     37(String,String,String,positiveInteger)
     38
     39[u]The BLFSpeeddial consists of the follwing[/u]
     40
     41(blfdirn,routePartition,blfDest,label,asciilabel,associatedBLFSDFeatures,index)
     42(String,String,String,String,String,XBLFSDOption,positiveInteger)
     43
     44Our Code Snipp in JAVA
     45
     46This is for the BLFOption
     47XBLFSDOption[] blfoption = new XBLFSDOption[1];
     48// Enable Pickup Feature
     49blfoption[0] = XBLFSDOption.Pickup;
     50
     51And there are 2 Cases which could be
     52
     53One is: Dirn with known Partition then
     54[b]XBusyLampField(direction,partition, null, label,label, blfoption,blfindex);[/b]
     55Second one is: We do not know the Partition then
     56[b]XBusyLampField(direction,null, direction, label,label, blfoption,blfindex);[/b]
     57
     58[b]Subject: [/b]RE: blf update/add/delete
     59 [b]Replied by: [/b]George Goglidze Berdzenishvili [b]on [/b]01-06-2012 10:44:48 AM
     60Hi all,
     61 
     62I'm trying to update/add/delete SD/BLF.
     63 
     64I managed to do all the operations with Speeddials with Admin XML.
     65but cannot do it for BLF.
     66 
     67it gives different errors.
     68 
     691) ADD NEW BLF
     70error message: Host not found
     71 
     72but I specify only destination, here's my code snippet:
     73[CODE]
     74$blf[0] = array("blfDest" => $number, "label" => $fullname, "asciiLabel" => $fullname, "index" => "1");
     75try {
     76 $client->updatePhone(array( "name"=> $device, "busyLampFields" => $blf ));
     77} catch ( SoapFault $soapFault ) {
     78 ShowError($language, $soapFault->getMessage());
     79 exit(0);
     80}
     81[CODE]
     82 
     83the same code for SpeedDial works fine,
     84here's the SD code that works fine:
     85[CODE]
     86$sd[0] = array("dirn" => $number, "label" => $fullname, "asciiLabel" => $fullname, "index" => "1");
     87try {
     88 $client->updatePhone(array( "name"=> $device, "speeddials" => $sd ));
     89} catch ( SoapFault $soapFault ) {
     90 ShowError($language, $soapFault->getMessage());
     91 exit(0);
     92}
     93[CODE]
     94 
     95Please let me know if I'm doing something wrong.
     96 
     97thanks,
     98
     99[b]Subject: [/b]RE: blf update/add/delete
    100 [b]Replied by: [/b]Florian Kroessbacher [b]on [/b]01-06-2012 11:07:24 AM
    101Hy George,
    102
    103in BLF Speeddial there is one Option more for the Destination.
    104I could be a dirn (Number+Partition) or it could only be a destination number (like +431234567)
    105
    106The Speeddial XML consists of the follwing
    107
    108(dirn,label,asciilabel,index)
    109(String,String,String,positiveInteger)
    110
    111The BLFSpeeddial consists of the follwing
    112
    113(blfdirn,routePartition,blfDest,label,asciilabel,associatedBLFSDFeatures,index)
    114(String,String,String,String,String,XBLFSDOption,positiveInteger)
    115
    116Our Code Snipp in JAVA
    117
    118This is for the BLFOption
    119XBLFSDOption[] blfoption = new XBLFSDOption[1];
    120// Enable Pickup Feature
    121blfoption[0] = XBLFSDOption.Pickup;
    122
    123And there are 2 Cases which could be
    124
    125One is: Dirn with known Partition then
    126XBusyLampField(direction,partition, null, label,label, blfoption,blfindex);
    127Second one is: We do not know the Partition then
    128XBusyLampField(direction,null, direction, label,label, blfoption,blfindex);
    129