From 042ad9f629007e5cceaf547d412aa87590fcc9a2 Mon Sep 17 00:00:00 2001 From: Dave Horton Date: Fri, 18 Aug 2023 08:41:04 -0400 Subject: [PATCH] update to jambonz.cloud --- db/seed-integration-test.sql | 8 ++++---- db/seed-production-database-open-source.sql | 6 +++--- db/webapp-tests.sql | 6 +++--- lib/routes/api/register.js | 9 ++++++--- lib/swagger/swagger.yaml | 2 +- test/call-test.js | 8 ++++---- test/oauth/gh-get-user.js | 2 +- test/webapp_tests.js | 2 +- 8 files changed, 23 insertions(+), 20 deletions(-) diff --git a/db/seed-integration-test.sql b/db/seed-integration-test.sql index 6a68d89..ce6845c 100644 --- a/db/seed-integration-test.sql +++ b/db/seed-integration-test.sql @@ -22,7 +22,7 @@ values ('3f35518f-5a0d-4c2e-90a5-2407bb3b36f0', '38700987-c7a4-4685-a5bb-af378f9 -- create one service provider and one account insert into service_providers (service_provider_sid, name, root_domain) -values ('2708b1b3-2736-40ea-b502-c53d8396247f', 'default service provider', 'sip.jambonz.us'); +values ('2708b1b3-2736-40ea-b502-c53d8396247f', 'default service provider', 'sip.jambonz.cloud'); insert into accounts (account_sid, service_provider_sid, name, webhook_secret) values ('9351f46a-678c-43f5-b8a6-d4eb58d131af','2708b1b3-2736-40ea-b502-c53d8396247f', 'default account', 'wh_secret_cJqgtMDPzDhhnjmaJH6Mtk'); @@ -38,9 +38,9 @@ values ('3f35518f-5a0d-4c2e-90a5-2407bb3b36fs', '38700987-c7a4-4685-a5bb-af378f9 -- create two applications insert into webhooks(webhook_sid, url, method) values -('84e3db00-b172-4e46-b54b-a503fdb19e4a', 'https://public-apps.jambonz.us/call-status', 'POST'), -('d31568d0-b193-4a05-8ff6-778369bc6efe', 'https://public-apps.jambonz.us/hello-world', 'POST'), -('81844b05-714d-4295-8bf3-3b0640a4bf02', 'https://public-apps.jambonz.us/dial-time', 'POST'); +('84e3db00-b172-4e46-b54b-a503fdb19e4a', 'https://public-apps.jambonz.cloud/call-status', 'POST'), +('d31568d0-b193-4a05-8ff6-778369bc6efe', 'https://public-apps.jambonz.cloud/hello-world', 'POST'), +('81844b05-714d-4295-8bf3-3b0640a4bf02', 'https://public-apps.jambonz.cloud/dial-time', 'POST'); insert into applications (application_sid, account_sid, name, call_hook_sid, call_status_hook_sid, speech_synthesis_vendor, speech_synthesis_language, speech_synthesis_voice, speech_recognizer_vendor, speech_recognizer_language) VALUES diff --git a/db/seed-production-database-open-source.sql b/db/seed-production-database-open-source.sql index 8fb7868..49ceb8c 100644 --- a/db/seed-production-database-open-source.sql +++ b/db/seed-production-database-open-source.sql @@ -24,9 +24,9 @@ values ('09e92f3c-9d73-4303-b63f-3668574862ce', '1cf2f4f4-64c4-4249-9a3e-5bb4cb5 -- create two applications insert into webhooks(webhook_sid, url, method) values -('84e3db00-b172-4e46-b54b-a503fdb19e4a', 'https://public-apps.jambonz.us/call-status', 'POST'), -('d31568d0-b193-4a05-8ff6-778369bc6efe', 'https://public-apps.jambonz.us/hello-world', 'POST'), -('81844b05-714d-4295-8bf3-3b0640a4bf02', 'https://public-apps.jambonz.us/dial-time', 'POST'); +('84e3db00-b172-4e46-b54b-a503fdb19e4a', 'https://public-apps.jambonz.cloud/call-status', 'POST'), +('d31568d0-b193-4a05-8ff6-778369bc6efe', 'https://public-apps.jambonz.cloud/hello-world', 'POST'), +('81844b05-714d-4295-8bf3-3b0640a4bf02', 'https://public-apps.jambonz.cloud/dial-time', 'POST'); insert into applications (application_sid, account_sid, name, call_hook_sid, call_status_hook_sid, speech_synthesis_vendor, speech_synthesis_language, speech_synthesis_voice, speech_recognizer_vendor, speech_recognizer_language) VALUES diff --git a/db/webapp-tests.sql b/db/webapp-tests.sql index 050ad29..34d97cc 100644 --- a/db/webapp-tests.sql +++ b/db/webapp-tests.sql @@ -2,7 +2,7 @@ SET FOREIGN_KEY_CHECKS=0; -- create one service provider insert into service_providers (service_provider_sid, name, description, root_domain) -values ('2708b1b3-2736-40ea-b502-c53d8396247f', 'jambonz.us', 'jambonz.us service provider', 'sip.yakeeda.com'); +values ('2708b1b3-2736-40ea-b502-c53d8396247f', 'jambonz.cloud', 'jambonz.cloud service provider', 'sip.yakeeda.com'); insert into api_keys (api_key_sid, token) values ('3f35518f-5a0d-4c2e-90a5-2407bb3b36f0', '38700987-c7a4-4685-a5bb-af378f9734de'); @@ -19,8 +19,8 @@ insert into sip_gateways (sip_gateway_sid, voip_carrier_sid, ipv4, port, inbound values ('46b727eb-c7dc-44fa-b063-96e48d408e4a', '5145b436-2f38-4029-8d4c-fd8c67831c7a', '3.3.3.3', 5060, 1, 1, 1); -- create the test application and test phone number -insert into webhooks (webhook_sid, url, method) values ('d9c205c6-a129-443e-a9c0-d1bb437d4bb7', 'https://flows.jambonz.us/testCall', 'POST'); -insert into webhooks (webhook_sid, url, method) values ('6ac36aeb-6bd0-428a-80a1-aed95640a296', 'https://flows.jambonz.us/callStatus', 'POST'); +insert into webhooks (webhook_sid, url, method) values ('d9c205c6-a129-443e-a9c0-d1bb437d4bb7', 'https://flows.jambonz.cloud/testCall', 'POST'); +insert into webhooks (webhook_sid, url, method) values ('6ac36aeb-6bd0-428a-80a1-aed95640a296', 'https://flows.jambonz.cloud/callStatus', 'POST'); insert into applications (application_sid, name, service_provider_sid, call_hook_sid, call_status_hook_sid, speech_synthesis_vendor, speech_synthesis_language, speech_synthesis_voice, speech_recognizer_vendor, speech_recognizer_language) values ('7a489343-02ed-471e-8df0-fc5e1b98ce8f', 'Test application', '2708b1b3-2736-40ea-b502-c53d8396247f', diff --git a/lib/routes/api/register.js b/lib/routes/api/register.js index f36d6d2..8ab002e 100644 --- a/lib/routes/api/register.js +++ b/lib/routes/api/register.js @@ -298,9 +298,12 @@ router.post('/', async(req, res) => { const dialTimeSid = uuid(); /* 3 webhooks */ - await promisePool.execute(insertWebookSql, [callStatusSid, 'https://public-apps.jambonz.us/call-status', 'POST']); - await promisePool.execute(insertWebookSql, [helloWordSid, 'https://public-apps.jambonz.us/hello-world', 'POST']); - await promisePool.execute(insertWebookSql, [dialTimeSid, 'https://public-apps.jambonz.us/dial-time', 'POST']); + await promisePool.execute(insertWebookSql, [callStatusSid, + 'https://public-apps.jambonz.cloud/call-status', 'POST']); + await promisePool.execute(insertWebookSql, [helloWordSid, + 'https://public-apps.jambonz.cloud/hello-world', 'POST']); + await promisePool.execute(insertWebookSql, [dialTimeSid, + 'https://public-apps.jambonz.cloud/dial-time', 'POST']); /* 2 applications */ await promisePool.execute(insertApplicationSql, [uuid(), userProfile.account_sid, 'hello world', diff --git a/lib/swagger/swagger.yaml b/lib/swagger/swagger.yaml index e02dc16..65174cc 100644 --- a/lib/swagger/swagger.yaml +++ b/lib/swagger/swagger.yaml @@ -786,7 +786,7 @@ paths: required: true schema: type: string - example: mycorp.sip.jambonz.us + example: mycorp.sip.jambonz.cloud responses: 200: description: indicates whether value is already in use diff --git a/test/call-test.js b/test/call-test.js index 898e636..22baba8 100644 --- a/test/call-test.js +++ b/test/call-test.js @@ -31,8 +31,8 @@ test('Create Call Success With Synthesizer in Payload', async (t) => { auth: authUser, json: true, body: { - call_hook: "https://public-apps.jambonz.us/hello-world", - call_status_hook: "https://public-apps.jambonz.us/call-status", + call_hook: "https://public-apps.jambonz.cloud/hello-world", + call_status_hook: "https://public-apps.jambonz.cloud/call-status", from: "15083778299", to: { type: "phone", @@ -73,8 +73,8 @@ test('Create Call Success Without Synthesizer in Payload', async (t) => { auth: authUser, json: true, body: { - call_hook: "https://public-apps.jambonz.us/hello-world", - call_status_hook: "https://public-apps.jambonz.us/call-status", + call_hook: "https://public-apps.jambonz.cloud/hello-world", + call_status_hook: "https://public-apps.jambonz.cloud/call-status", from: "15083778299", to: { type: "phone", diff --git a/test/oauth/gh-get-user.js b/test/oauth/gh-get-user.js index 2b2fbfa..6c20346 100644 --- a/test/oauth/gh-get-user.js +++ b/test/oauth/gh-get-user.js @@ -7,7 +7,7 @@ const test = async() => { headers: { Authorization: `Bearer ${process.env.GH_CODE}`, Accept: 'application/json', - 'User-Agent': 'jambonz.us' + 'User-Agent': 'jambonz.cloud' } }, (err, response, body) => { if (err) console.log(error); diff --git a/test/webapp_tests.js b/test/webapp_tests.js index 0a6d6e2..d7535e1 100644 --- a/test/webapp_tests.js +++ b/test/webapp_tests.js @@ -192,7 +192,7 @@ test('webapp tests', async(t) => { t.ok(result.statusCode === 200 && result.body.available === true, 'indicates when email is available'); /* check if a subdomain is available */ - result = await request.get('/Availability?type=subdomain&value=mycompany.sip.jambonz.us', { + result = await request.get('/Availability?type=subdomain&value=mycompany.sip.jambonz.cloud', { resolveWithFullResponse: true, auth: authUser, json: true,