Add voipms configuration
Change-Id: Ib776c8944bb3b2564e52b94fdb2bd04ffc6835eb
This commit is contained in:
parent
a573697b77
commit
624a89dd98
@ -332,7 +332,16 @@ node 'zuul-dev.openstack.org' {
|
|||||||
|
|
||||||
node 'pbx.openstack.org' {
|
node 'pbx.openstack.org' {
|
||||||
class { 'openstack_project::pbx':
|
class { 'openstack_project::pbx':
|
||||||
sysadmins => hiera('sysadmins'),
|
sysadmins => hiera('sysadmins'),
|
||||||
|
sip_providers => [
|
||||||
|
{
|
||||||
|
provider => 'voipms',
|
||||||
|
hostname => 'dallas.voip.ms',
|
||||||
|
username => hiera('voipms_username'),
|
||||||
|
password => hiera('voipms_password'),
|
||||||
|
outgoing => false,
|
||||||
|
},
|
||||||
|
],
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -26,3 +26,5 @@ exten => 7726,1,Answer()
|
|||||||
same => n,Playback(spam)
|
same => n,Playback(spam)
|
||||||
same => n,Hangup()
|
same => n,Hangup()
|
||||||
|
|
||||||
|
; All other extensions go to s,1
|
||||||
|
exten => _X.,1,Goto(s,1)
|
||||||
|
@ -1,14 +0,0 @@
|
|||||||
; sip.conf customizations for pbx.openstack.org
|
|
||||||
|
|
||||||
[general](+)
|
|
||||||
udpbindaddr=::
|
|
||||||
tcpenable=yes
|
|
||||||
tcpbindaddr=::
|
|
||||||
context=public
|
|
||||||
allowguest=yes
|
|
||||||
disallow=all
|
|
||||||
allow=g722
|
|
||||||
allow=ulaw
|
|
||||||
allow=alaw
|
|
||||||
allow=gsm
|
|
||||||
videosupport=yes
|
|
@ -17,6 +17,7 @@
|
|||||||
# == Class: openstack_project::pbx
|
# == Class: openstack_project::pbx
|
||||||
class openstack_project::pbx (
|
class openstack_project::pbx (
|
||||||
$sysadmins = [],
|
$sysadmins = [],
|
||||||
|
$sip_providers = [],
|
||||||
) {
|
) {
|
||||||
class { 'openstack_project::server':
|
class { 'openstack_project::server':
|
||||||
sysadmins => $sysadmins,
|
sysadmins => $sysadmins,
|
||||||
@ -46,7 +47,7 @@ class openstack_project::pbx (
|
|||||||
owner => 'asterisk',
|
owner => 'asterisk',
|
||||||
group => 'asterisk',
|
group => 'asterisk',
|
||||||
mode => '0660',
|
mode => '0660',
|
||||||
source => 'puppet:///modules/openstack_project/pbx/asterisk/sip.conf',
|
content => template('openstack_project/pbx/asterisk/sip.conf.erb'),
|
||||||
require => File['/etc/asterisk/'],
|
require => File['/etc/asterisk/'],
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -0,0 +1,32 @@
|
|||||||
|
; sip.conf customizations for pbx.openstack.org
|
||||||
|
|
||||||
|
[general](+)
|
||||||
|
udpbindaddr=::
|
||||||
|
tcpenable=yes
|
||||||
|
tcpbindaddr=::
|
||||||
|
context=public
|
||||||
|
allowguest=yes
|
||||||
|
disallow=all
|
||||||
|
allow=g722
|
||||||
|
allow=ulaw
|
||||||
|
allow=alaw
|
||||||
|
allow=gsm
|
||||||
|
videosupport=yes
|
||||||
|
<% sip_providers.each do |provider| -%>
|
||||||
|
register => <%= provider['username'] %>:<%= provider['password'] %>@<%= provider['hostname'] %>:5060
|
||||||
|
<% end -%>
|
||||||
|
|
||||||
|
|
||||||
|
<% sip_providers.each do |provider| -%>
|
||||||
|
<% if provider['outgoing'] == true -%>
|
||||||
|
[<%= provider['username'] %>]
|
||||||
|
context=public
|
||||||
|
host=<%= provider['hostname'] %>
|
||||||
|
secret=<%= provider['password'] %>
|
||||||
|
type=peer
|
||||||
|
defaultuser=<%= provider['username'] %>
|
||||||
|
fromuser=<%= provider['username'] %>
|
||||||
|
trustrpid=yes
|
||||||
|
sendrpid=yes
|
||||||
|
<% end -%>
|
||||||
|
<% end -%>
|
Loading…
Reference in New Issue
Block a user