RestComm / Restcomm-Connect

The Open Source Cloud Communications Platform
http://www.restcomm.com/
GNU Affero General Public License v3.0
241 stars 215 forks source link

restcomm.xml does not be updated after changing value in restcomm.conf #2590

Open xhoaluu opened 6 years ago

xhoaluu commented 6 years ago

I'm using xmlstarlet 1.6.1 For the first time run start-restcomm.sh: restcomm.xml will be updated exactly what we need. But for second roud, we cannot update restcomm.xml via restcomm.conf any more.

For example: 1/ VOICE_KEY = null Original restcomm.xml: < apikey ></ apikey > 1st restcomm.xml: </ apikey> 2/ VOICE_KEY = 'abcxyz' 2nd restcomm.xml: </ apikey>

As in sub sh file (config-restcomm.sh ... etc), the script is expecting < apikey>.*</ apikey>, But after 1 time update with null value, it's which is does not match with expectation of sed.

anhntnguyen commented 6 years ago

Jira issue: https://telestax.atlassian.net/browse/RESTCOMM-1178

maria-farooq commented 6 years ago

The reason behind is XMLStarlet that changes all empty tags to single closing element < apikey ></ apikey > ==> <apikey/> which is technically ok but as you said SED is expecting something else i.e < apikey ></ apikey > so we wont be able to change it after 1st run letme think of a solution