mirror of
https://github.com/jambonz/jambonz-api-server.git
synced 2026-01-25 02:08:24 +00:00
add voip_carriers.e164_leading_plus for carrier-level configuration of E.164 dial string
This commit is contained in:
@@ -95,6 +95,7 @@ name VARCHAR(64) NOT NULL UNIQUE ,
|
||||
description VARCHAR(255),
|
||||
account_sid CHAR(36) COMMENT 'if provided, indicates this entity represents a customer PBX that is associated with a specific account',
|
||||
application_sid CHAR(36) COMMENT 'If provided, all incoming calls from this source will be routed to the associated application',
|
||||
e164_leading_plus BOOLEAN NOT NULL DEFAULT false,
|
||||
PRIMARY KEY (voip_carrier_sid)
|
||||
) ENGINE=InnoDB COMMENT='A Carrier or customer PBX that can send or receive calls';
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
</location>
|
||||
<size>
|
||||
<width>266.00</width>
|
||||
<height>120.00</height>
|
||||
<height>140.00</height>
|
||||
</size>
|
||||
<zorder>6</zorder>
|
||||
<SQLField>
|
||||
@@ -119,6 +119,13 @@
|
||||
<objectComment><![CDATA[If provided, all incoming calls from this source will be routed to the associated application]]></objectComment>
|
||||
<uid><![CDATA[B6545E2E-7F55-4082-AEFA-29F50C137D64]]></uid>
|
||||
</SQLField>
|
||||
<SQLField>
|
||||
<name><![CDATA[e164_leading_plus]]></name>
|
||||
<type><![CDATA[BOOLEAN]]></type>
|
||||
<defaultValue><![CDATA[false]]></defaultValue>
|
||||
<notNull><![CDATA[1]]></notNull>
|
||||
<uid><![CDATA[123EA4AC-627B-42A1-8779-D72494E8D47F]]></uid>
|
||||
</SQLField>
|
||||
<labelWindowIndex><![CDATA[8]]></labelWindowIndex>
|
||||
<objectComment><![CDATA[A Carrier or customer PBX that can send or receive calls]]></objectComment>
|
||||
<ui.treeExpanded><![CDATA[1]]></ui.treeExpanded>
|
||||
@@ -251,8 +258,8 @@
|
||||
<comment><![CDATA[a regex-based pattern match for call routing]]></comment>
|
||||
<tableType><![CDATA[InnoDB]]></tableType>
|
||||
<location>
|
||||
<x>406.00</x>
|
||||
<y>425.00</y>
|
||||
<x>424.00</x>
|
||||
<y>461.00</y>
|
||||
</location>
|
||||
<size>
|
||||
<width>254.00</width>
|
||||
@@ -1065,17 +1072,17 @@
|
||||
<overviewPanelHidden><![CDATA[0]]></overviewPanelHidden>
|
||||
<pageBoundariesVisible><![CDATA[0]]></pageBoundariesVisible>
|
||||
<PageGridVisible><![CDATA[0]]></PageGridVisible>
|
||||
<RightSidebarWidth><![CDATA[1756.000000]]></RightSidebarWidth>
|
||||
<RightSidebarWidth><![CDATA[1788.000000]]></RightSidebarWidth>
|
||||
<sidebarIndex><![CDATA[2]]></sidebarIndex>
|
||||
<snapToGrid><![CDATA[0]]></snapToGrid>
|
||||
<SourceSidebarWidth><![CDATA[0.000000]]></SourceSidebarWidth>
|
||||
<SQLEditorFileFormatVersion><![CDATA[4]]></SQLEditorFileFormatVersion>
|
||||
<uid><![CDATA[58C99A00-06C9-478C-A667-C63842E088F3]]></uid>
|
||||
<windowHeight><![CDATA[1337.000000]]></windowHeight>
|
||||
<windowLocationX><![CDATA[2625.000000]]></windowLocationX>
|
||||
<windowLocationY><![CDATA[80.000000]]></windowLocationY>
|
||||
<windowScrollOrigin><![CDATA[{0, 1}]]></windowScrollOrigin>
|
||||
<windowWidth><![CDATA[2033.000000]]></windowWidth>
|
||||
<windowHeight><![CDATA[1250.000000]]></windowHeight>
|
||||
<windowLocationX><![CDATA[408.000000]]></windowLocationX>
|
||||
<windowLocationY><![CDATA[94.000000]]></windowLocationY>
|
||||
<windowScrollOrigin><![CDATA[{0, 0.5}]]></windowScrollOrigin>
|
||||
<windowWidth><![CDATA[2065.000000]]></windowWidth>
|
||||
</SQLDocumentInfo>
|
||||
<AllowsIndexRenamingOnInsert><![CDATA[1]]></AllowsIndexRenamingOnInsert>
|
||||
<defaultLabelExpanded><![CDATA[1]]></defaultLabelExpanded>
|
||||
|
||||
@@ -21,6 +21,18 @@ VoipCarrier.fields = [
|
||||
{
|
||||
name: 'description',
|
||||
type: 'string'
|
||||
},
|
||||
{
|
||||
name: 'account_sid',
|
||||
type: 'string',
|
||||
},
|
||||
{
|
||||
name: 'application_sid',
|
||||
type: 'string'
|
||||
},
|
||||
{
|
||||
name: 'e164_leading_plus',
|
||||
type: 'number'
|
||||
}
|
||||
];
|
||||
|
||||
|
||||
@@ -250,6 +250,8 @@ paths:
|
||||
description: voip carrier name
|
||||
description:
|
||||
type: string
|
||||
e164_leading_plus:
|
||||
type: boolean
|
||||
required:
|
||||
- name
|
||||
responses:
|
||||
@@ -1613,6 +1615,8 @@ components:
|
||||
type: string
|
||||
description:
|
||||
type: string
|
||||
e164_leading_plus:
|
||||
type: boolean
|
||||
required:
|
||||
- voip_carrier_sid
|
||||
- name
|
||||
|
||||
@@ -22,7 +22,8 @@ test('voip carrier tests', async(t) => {
|
||||
auth: authAdmin,
|
||||
json: true,
|
||||
body: {
|
||||
name: 'daveh'
|
||||
name: 'daveh',
|
||||
e164_leading_plus: true
|
||||
}
|
||||
});
|
||||
t.ok(result.statusCode === 201, 'successfully created voip carrier');
|
||||
@@ -33,7 +34,7 @@ test('voip carrier tests', async(t) => {
|
||||
auth: authAdmin,
|
||||
json: true,
|
||||
});
|
||||
t.ok(result.length === 1 , 'successfully queried all voip carriers');
|
||||
t.ok(result.length === 1 && result[0].e164_leading_plus, 'successfully queried all voip carriers');
|
||||
|
||||
/* query one voip carriers */
|
||||
result = await request.get(`/VoipCarriers/${sid}`, {
|
||||
|
||||
Reference in New Issue
Block a user