File tree Expand file tree Collapse file tree
configuration/config-scripts/as7-config-scripts/restcomm
restcomm.application/src/main/java/org/restcomm/connect/application Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -833,6 +833,22 @@ configConferenceTimeout(){
833833 xmlstarlet ed --inplace -u " /restcomm/runtime-settings/conference-timeout" -v " $CONFERENCE_TIMEOUT " $FILE
834834}
835835
836+ configSdrService (){
837+ xmlstarlet ed --inplace -d " /restcomm/runtime-settings/sdr-service" $FILE
838+ if [ -n " $SDR_SERVICE_CLASS " ]; then
839+ echo " Configure Sdr service"
840+ xmlstarlet ed --inplace -s " /restcomm/runtime-settings" -t elem -n sdr-service \
841+ -i " /restcomm/runtime-settings/sdr-service" -t attr -n class -v " $SDR_SERVICE_CLASS " \
842+ $FILE
843+ if [ -n " $SDR_SERVICE_HTTP_URI " ]; then
844+ xmlstarlet ed --inplace -s " /restcomm/runtime-settings/sdr-service" -t elem -n http-uri -v " $SDR_SERVICE_HTTP_URI " $FILE
845+ fi
846+ if [ -n " $SDR_SERVICE_AMQP_URI " ]; then
847+ xmlstarlet ed --inplace -s " /restcomm/runtime-settings/sdr-service" -t elem -n amqp-uri -v " $SDR_SERVICE_AMQP_URI " $FILE
848+ fi
849+ fi
850+ }
851+
836852# MAIN
837853echo ' Configuring RestComm...'
838854configRCJavaOpts
@@ -873,4 +889,5 @@ configRMSNetworking
873889configAsrDriver
874890configDnsProvisioningManager
875891configConferenceTimeout
892+ configSdrService
876893echo ' Configured RestComm!'
Original file line number Diff line number Diff line change @@ -141,4 +141,9 @@ DNS_PROVISIONING_AWS_ROUTE53_ALIAS_HOSTED_ZONE_ID=""
141141# CONFERENCE_TIMEOUT is allowed life of a conference in restcomm
142142# after that all participants will be asked to leave and conference will be closed.
143143# default value is 14400 seconds/(4 hours).Please provide value in seconds
144- CONFERENCE_TIMEOUT=" 14400"
144+ CONFERENCE_TIMEOUT=" 14400"
145+
146+ # SDR Service configuration
147+ SDR_SERVICE_CLASS=' '
148+ SDR_SERVICE_HTTP_URI=' '
149+ SDR_SERVICE_AMQP_URI=' '
Original file line number Diff line number Diff line change @@ -245,7 +245,7 @@ public UntypedActor create() throws Exception {
245245 }
246246
247247 private ActorRef sdrService (final Configuration configuration , final ClassLoader loader ) throws Exception {
248- final String className = configuration .getString ("sdr-service[@class]" );
248+ final String className = configuration .subset ( "runtime-settings" ). getString ("sdr-service[@class]" );
249249 if (className != null ) {
250250 final Props props = new Props (new UntypedActorFactory () {
251251 @ Override
You can’t perform that action at this time.
0 commit comments