$info) { /* Check if item is enabled */ if (!isEnabled($info)) { continue; } /* Get Tenant Name */ $tenant = getTenantName($info); /* Get Last Edit Date */ $lastedit = getLastEdit($info); } /* Tenant Name (must already exist) */ $tenant = 'default'; /* Context Name */ $name = 'test-playback'; /* Extension */ $exten = 's'; /* Priority */ $prio = 1; /* Dialplan */ $cmd = array(); $cmd[] = 'Answer'; $cmd[] = 'Playback(welcome)'; $cmd[] = 'Hangup'; /* Add to Dialplan */ addToDialplan($tenant, $name, $exten, $prio, $cmd); /* Remove from Dialplan */ removeFromDialplan($tenant, $name, $exten, $prio); /* Set Database Family */ $family = sprintf("%s/%s", $tenant, 'Test'); /* Remove Tree from Database */ removeFromDatabase($family); /* Add Key to Database */ addToDatabase($family, 'Key', 'Value'); addToDatabase($family, 'Key2', 'Value2'); /* Remove Key from Database */ removeFromDatabase($family, 'Key');