cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1448
Views
0
Helpful
5
Replies

AXL updatePhone Subscribe Service

Michael Schmidt
Level 1
Level 1

Hi,

with this code I change a phone button template and subscribe a service to the phone.

The code is working and the code is subscribing the service to the phone but the code also deletes / unsubscribe all already to the phone subscribed services.

How can I solve the problem so the service will be added to the phone without deleting all already subscribed services?

my $res = $cm->updatePhone( SOAP::Data->attr({xmlns => ''})->name("name" => "$devname"),

                        =>  SOAP::Data->attr({xmlns => ''})->name("phoneTemplateName" => "$templatename"),

                        =>  SOAP::Data->attr({xmlns => ''})->name("services" => \SOAP::Data->attr({xmlns => ''})->value(

                                SOAP::Data->attr({xmlns => ''})->name("service" => \SOAP::Data->attr({xmlns => ''})->value(

                                SOAP::Data->attr({xmlns => ''})->name("telecasterServiceName" => '$servicename'),

                                SOAP::Data->attr({xmlns => ''})->name("name" => 'Test Service'),

                               

                            )),

                            )),

                          );

BR

Michael

5 Replies 5

npetrele
Cisco Employee
Cisco Employee

Have you tried getPhone first to discover the existing services, and then include those existing services in your updatePhone?

I didn`t made a getPhone before I did the updatePhone to get existing services.

Normally I don`t use such AXL commands but update via SQL.

When I update via SQL I don`t need to check which services already subscribed and the new service will not delete any existing service.

Is it really necessary to check in advance via AXL which serices already subscribed and is it normal that via updatePhone -> serivces -> service -> telecasterservice all already subscribed services will be deleted and only the new one will be added?

BR

Michael

Hi Michael,

Yes, when using any of the update AXL methods, it will replace existing services so it is necessary to include the ones you want to keep in the request. The SQL method will add rows to the database and that is why you don't see it delete any existing services.

Thanks,

Adrienne

Hi Adrienne,

nice to have contact in this way with you

Then I would say AXL is much more complicate than SQL because I can`t imagine how the code have to look like when I have for example 100 phone to update with a service and each of these 100 phones already have different counts and also different services subscribed and to every phone I have to find out the already subscibed services to add them again with the new service.

Do you know why AXL not working in the same way like SQL and just adding the service to the already subscribed services?

BR

Michael

Hi Michael,

I've seen other SOAP and REST API updates work the same way, so I assumed this was industry standard, but I haven't actually come across any documentation to support this.

I believe the reason for this is so that you can remove a service from the phone by not including it in the update request.

thanks,

Adrienne