jthalacker
January 21 |
I am attempting to use the SDK to recreate DID ranges so that each range is just the DID.
I take the following steps:
Unfortunately I am having trouble with DIDs that have the owner_type of 'PHONE'. I can not figure out the correct endpoint to call to unassign the DID.
Below is an example of the case when it is a phone that I wrote up, but I cant seem to find where the phone number is stored in phone_config.
elif owner_type == "PHONE":
# Unassign from Phone
# Get the phone configuration using owner_id (retrieved from the DID response)
phone_config = telephony_api.get_telephony_providers_edges_phone(owner_id)
with open("output.txt", "w") as f:
f.write(f"phone config: {phone_config}")
# Remove the DID by setting the phone number to None or removing it from assigned lines
for line in phone_config.lines:
print(line)
if line.line_base_settings.phone_number == did_number:
# Remove the DID from the line (or set the phone number to None)
line.line_base_settings.phone_number = None
# Update the phone configuration to reflect the change
telephony_api.put_telephony_providers_edges_phone(owner_id, phone_config)
Any help is greatly appreciated!
Visit Topic to respond.
You are receiving this because you enabled mailing list mode.
To unsubscribe from these emails, click here.