SIP Trunk registration failing post-apply

Is it possible to force SIP trunk re-registration via the API? don’t want to manual refresh 100 trunks.

Background

managing trunks via Terraform. using genesyscloud_telephony_providers_edges_sip_trunk. drift detected in staging. running provider v1.32.0. edge firmware is latest.

Issue

trunks show STATE_UNREGISTERED post-deploy. CLI returns 400 when trying to update status. terraform state looks clean.

resource "genesyscloud_telephony_providers_edges_sip_trunk" "edge_trunk" {
 name = "prod-edge-${var.region}"
}

Troubleshooting

checked genesyscloud telephony providers edges sip-trunks list. auth creds match the edge config. firewall rules open. logs show 503 Service Unavailable on the SIP stack.

hey, not sure about the API part since i’m still learning that side of things. but if you are using terraform, usually just running terraform apply again fixes the drift. the provider should detect the config change and push it to the edge.

in australia, we sometimes see SIP trunks drop registration if the edge firmware is out of sync with the platform version. check your genesyscloud_telephony_providers_edges_sip_trunk resource. make sure the sip_trunk_name and description match exactly what is in your state file. if there is a mismatch, terraform will update it and trigger a re-register.

also, check the edge status in the admin portal. sometimes the edge itself needs a restart if it’s stuck. i had this happen with a customer in Sydney last week. the edge was reporting healthy but trunks were down. rebooting the edge fixed it. no api call needed. just a hard reset of the edge node.

1 Like

terraform apply usually handles it, but i’ve seen cases where the edge needs a nudge. if the config is already synced, try a direct API call to force re-registration.

curl -X POST "https://api.mypurecloud.com/api/v2/telephony/providers/edges/siptrunks/{id}/registrations" \
 -H "Authorization: Bearer $TOKEN"

works for single trunks. loop it for bulk.

2 Likes

's curl is spot on for the endpoint, but you’ll likely hit rate limits looping 100 trunks. use the SDK to queue requests instead.

const client = PlatformClient.v2();
const telephony = client.TelephonyProvidersEdgesApi;
await telephony.postSiptrunkRegistrations(id);

batch them with a small delay between calls. keeps the edge happy.

1 Like