Merge pull request #1 from Rhizomatica/ciaby/rtp-bridge

Ciaby/rtp bridge
This commit is contained in:
ciaby 2015-09-23 22:23:05 +02:00
commit 9f7214b2ff
8 changed files with 59 additions and 19 deletions

@ -1 +1 @@
Subproject commit 09967704c152f5fd044ed4ddbc7382ef2e24aea5 Subproject commit eb52429dbf78778a4871169571a744bff44a6287

View file

@ -91,9 +91,9 @@
<param name="outbound-codec-prefs" value="$${global_codec_prefs}"/> <param name="outbound-codec-prefs" value="$${global_codec_prefs}"/>
<param name="rtp-timer-name" value="soft"/> <param name="rtp-timer-name" value="soft"/>
<!-- ip address to use for rtp, DO NOT USE HOSTNAMES ONLY IP ADDRESSES --> <!-- ip address to use for rtp, DO NOT USE HOSTNAMES ONLY IP ADDRESSES -->
<param name="rtp-ip" value="127.0.0.1"/> <param name="rtp-ip" value="172.16.0.1"/>
<!-- ip address to bind to, DO NOT USE HOSTNAMES ONLY IP ADDRESSES --> <!-- ip address to bind to, DO NOT USE HOSTNAMES ONLY IP ADDRESSES -->
<param name="sip-ip" value="127.0.0.1"/> <param name="sip-ip" value="172.16.0.1"/>
<!--<param name="hold-music" value="$${hold_music}"/>--> <!--<param name="hold-music" value="$${hold_music}"/>-->
<param name="apply-nat-acl" value="nat.auto"/> <param name="apply-nat-acl" value="nat.auto"/>
@ -272,8 +272,8 @@
auto - Use guessed ip. auto - Use guessed ip.
auto-nat - Use ip learned from NAT-PMP or UPNP auto-nat - Use ip learned from NAT-PMP or UPNP
--> -->
<param name="ext-rtp-ip" value="auto-nat"/> <param name="ext-rtp-ip" value="172.16.0.1"/>
<param name="ext-sip-ip" value="auto-nat"/> <param name="ext-sip-ip" value="172.16.0.1"/>
<!-- rtp inactivity timeout --> <!-- rtp inactivity timeout -->
<param name="rtp-timeout-sec" value="300"/> <param name="rtp-timeout-sec" value="300"/>

View file

@ -1,2 +1,2 @@
#!/bin/sh #!/bin/sh
/usr/sbin/lcr start exec /usr/sbin/lcr start

View file

@ -3,15 +3,15 @@ gsm-bs
tones yes tones yes
earlyb no earlyb no
# These two lines enable RTP bridging # These two lines enable RTP bridging
#bridge Ext bridge Ext
#rtp-bridge rtp-bridge
[Ext] [Ext]
#sip <local ip>[:<local port>] <remote ip>[:<remote port>] #sip <local ip>[:<local port>] <remote ip>[:<remote port>]
sip 127.0.0.1:5050 127.0.0.1:5060 sip 172.16.0.1:5050 172.16.0.1:5060
earlyb yes earlyb yes
tones yes tones yes
extern extern
# These two lines enable RTP bridging # These two lines enable RTP bridging
#bridge gsm bridge gsm
#rtp-bridge rtp-bridge

View file

@ -154,7 +154,7 @@ class rhizo_base {
ensure => present, ensure => present,
provider => git, provider => git,
source => 'https://github.com/Rhizomatica/rccn.git', source => 'https://github.com/Rhizomatica/rccn.git',
revision => '1.0.5', revision => '1.0.5-rtp',
require => [ File['/var/rhizomatica'], Package['git'] ], require => [ File['/var/rhizomatica'], Package['git'] ],
notify => [ Exec['locale-gen'], notify => [ Exec['locale-gen'],
Exec['restart-freeswitch'], Exec['restart-freeswitch'],

View file

@ -12,8 +12,14 @@
# #
class rhizo_base::lcr { class rhizo_base::lcr {
package { 'lcr': package { 'lcr':
ensure => installed, ensure => latest,
require => Class['rhizo_base::apt'], require => Class['rhizo_base::apt'],
notify => Exec['restart-lcr'],
}
exec { 'restart-lcr':
command => '/usr/bin/sv restart lcr',
refreshonly => true,
} }
service { 'lcr': service { 'lcr':

View file

@ -24,16 +24,35 @@ class rhizo_base::openbsc {
$bts3_ip_address = $rhizo_base::bts3_ip_address $bts3_ip_address = $rhizo_base::bts3_ip_address
$smsc_password = $rhizo_base::smsc_password $smsc_password = $rhizo_base::smsc_password
package { ['osmocom-nitb', 'osmocom-nitb-dbg', package { [ 'libosmoabis4', 'libosmocore6',
'libdbd-sqlite3', 'libsmpp0']: 'libosmoctrl0', 'libosmogsm5',
ensure => installed, 'libosmovty1', 'osmocom-nitb',
'osmocom-nitb-dbg']:
ensure => latest,
require => Class['rhizo_base::apt'], require => Class['rhizo_base::apt'],
notify => Exec['hlr_pragma_wal'], notify => [ Exec['hlr_pragma_wal'],
Exec['restart-nitb'] ],
}
package { [ 'libosmoabis3', 'libosmocore4',
'libosmogsm6', 'libosmovty0',
'libgtp', 'libgtp0',
'libgtp0-dev', 'openggsn',
'libosmo-abis', 'libosmo-abis-dbg',
'libosmo-abis-dev', 'libosmo-netif-dbg',
'libosmo-netif-dev', 'libosmo-sccp',
'libosmo-sccp-dbg', 'libosmo-sccp-dev',
'libosmocodec0', 'libosmocore',
'libosmocore-dbg', 'libosmocore-dev',
'libosmocore-utils', 'libosmogb3',
'libosmonetif2', 'libosmosim0',
'libosmotrau0']:
ensure => purged,
} }
service { 'osmocom-nitb': service { 'osmocom-nitb':
enable => false, enable => false,
require => Package['osmocom-nitb'] require => Package['osmocom-nitb'],
} }
file { '/etc/osmocom/osmo-nitb.cfg': file { '/etc/osmocom/osmo-nitb.cfg':
@ -47,4 +66,11 @@ class rhizo_base::openbsc {
require => Class['rhizo_base::packages'], require => Class['rhizo_base::packages'],
refreshonly => true, refreshonly => true,
} }
exec { 'restart-nitb':
command => '/usr/bin/sv restart osmo-nitb',
require => Class['rhizo_base::packages'],
refreshonly => true,
}
} }

View file

@ -6,6 +6,7 @@ password foo
log stderr log stderr
logging filter all 1 logging filter all 1
logging color 1 logging color 1
logging print category 0
logging timestamp 0 logging timestamp 0
logging level all notice logging level all notice
logging level rll notice logging level rll notice
@ -31,6 +32,7 @@ log stderr
logging level nat notice logging level nat notice
logging level ctrl notice logging level ctrl notice
logging level smpp notice logging level smpp notice
logging level filter notice
logging level lglobal notice logging level lglobal notice
logging level llapd notice logging level llapd notice
logging level linp notice logging level linp notice
@ -38,6 +40,8 @@ log stderr
logging level lmi notice logging level lmi notice
logging level lmib notice logging level lmib notice
logging level lsms notice logging level lsms notice
logging level lctrl notice
logging level lgtp notice
! !
line vty line vty
no login no login
@ -404,9 +408,13 @@ network
mncc-int mncc-int
default-codec tch-f fr default-codec tch-f fr
default-codec tch-h hr default-codec tch-h hr
nitb
subscriber-create-on-demand
no assign-tmsi
smpp smpp
local-tcp-port 2775 local-tcp-port 2775
policy closed policy closed
smpp-first
esme OSMPP esme OSMPP
password <%= @smsc_password %> password <%= @smsc_password %>
default-route default-route