update model for new columns on voip_carriers

This commit is contained in:
Dave Horton
2022-10-06 11:08:59 +01:00
parent e067fc2cf4
commit 36a1d4bef1
3 changed files with 30 additions and 1 deletions

View File

@@ -111,6 +111,18 @@ VoipCarrier.fields = [
name: 'smpp_system_id',
type: 'string'
},
{
name: 'register_from_user',
type: 'string'
},
{
name: 'register_from_domain',
type: 'string'
},
{
name: 'register_public_ip_in_contact',
type: 'number'
}
];
module.exports = VoipCarrier;

View File

@@ -909,6 +909,15 @@ paths:
type: string
description: sip password to authenticate with, if registration is required
example: bar
register_from_user:
type: string
description: optional username to apply in From header
register_from_domain:
type: string
description: optional domain to apply in From header
register_public_ip_in_contact:
type: boolean
description: if true, use our public ip in Contact header; otherwise, use sip realm
tech_prefix:
type: string
description: prefix to be applied to the called number for outbound call attempts
@@ -4511,6 +4520,12 @@ components:
type: string
register_password:
type: string
register_from_user:
type: string
register_from_domain:
type: string
register_public_ip_in_contact:
type: boolean
tech_prefix:
type: string
inbound_auth_username:

View File

@@ -54,7 +54,9 @@ test('voip carrier tests', async(t) => {
requires_register: true,
register_username: 'foo',
register_sip_realm: 'bar',
register_password: 'baz'
register_password: 'baz',
register_from_user: 'fromme',
register_from_domain: 'fromdomain'
}
});
t.ok(result.statusCode === 204, 'successfully updated voip carrier');