Moving Phone Sites - issue

Hi
I'm using PUT
/api/v2/telephony/providers/edges/phones/{phoneId} to move a "Remote" phone between sites ( Not WebRTC phone)

I have to include a Lines Name (and associated properties) to make this work

If I use the existing Lines name I get an error saying the Lines Name already exists (even though this is the line I want to change)

{
"message": "StationV2 with name 'BADesk_1' already exists.",
"code": "general.bad.request",
"status": 400,
"messageWithParams": "{entityName} with {fieldName} '{value}' already exists.",
"messageParams": {
"entityName": "StationV2",
"fieldName": "name",
"value": "BADesk_1"
},
"contextId": "c0731103-0f4b-4cf2-acb0-d4d03902f57c",
"details": [
{
"errorCode": "DUPLICATE_LINE_NAME",
"fieldName": "lines[0].name"
}
],
"errors": []
}

If I change the Lines name, and associated Lines properties, this is successful, but this means the agent will need to reselect the Phone to make calls.
The UI doesnt require this to change Sites

Any ideas? I would have thought the Update would do just that?

Cheers
Brian

Be nice to have someone from Genesys advise here?

Have you inspected the API requests made in the browser's network console when you do this? If the UI is doing the behavior you want to replicate, looking at those requests should hint at what's different from what you're doing.

Thanks Tim, It pointed me in the right direction and I have this working now :slight_smile:

You need to send the following information for a "Remote Phone" device in the data portion of the PUT request

Name of Device
Site
Id
phone base setting
Id
lines (AS A LIST)
name
line base setting
id

I use python and send it as follows:

parameters = f'{{"name": "{phoneName}","site": {{"id": "{siteId}"}},"phoneBaseSettings": {{"id": "{pBsID}"}},"lines":[{{"id" : "{lineId}","name" : "{lineName}","lineBaseSettings": {{"id": "{lBsId}"}}}}]}}'

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.