One of our customers has a requirement to change their outbound CLI on a daily basis. They have purchased a group of numbers to use for this & I'm looking at how to automate this process for them by making an API request every morning at 1am.
Testing in our lab, I can get the current trunk settings:
GET: /api/v2/telephony/providers/edges/trunkbasesettings/{trunkBaseSettingsId}
Which returns a JSON object with all the settings
In the returned object I do the following:
- remove the version number property
- change the value stored in properties.trunk_outboundIdentity_callingAddress.value.instance from +649xxx1234 to +649xxx6789
I then perform a
PUT: /api/v2/telephony/providers/edges/trunkbasesettings/{trunkBaseSettingsId}
this returns a 200/Ok
But in the response document it shows the previous version and also shows the previous trunk_outboundIdentity_callingAddress value (+649xxx1234) not my new one.
If I I take the exact same updated object and paste it in to the API Explorer however, and perform the same
PUT: /api/v2/telephony/providers/edges/trunkbasesettings/{trunkBaseSettingsId}
Then the response contains an incremented version & the trunk_outboundIdentity_callingAddress shows as being my new one (+649xxx6789)
So little confused as how to proceed with this one, so any guidance appreciated