Skip to content
This repository has been archived by the owner on Oct 25, 2024. It is now read-only.

Commit

Permalink
fix username in entrypoint (#32)
Browse files Browse the repository at this point in the history
* fix username in entrypoint

* remove duplicate fi

* update changelog and improve build-locally

* impove changelog

---------

Co-authored-by: Markus Frindt <m.frindt@cognigy.com>
  • Loading branch information
Catharsis68 and Markus Frindt authored Sep 13, 2024
1 parent c8227e4 commit d4da5b4
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 3 deletions.
5 changes: 4 additions & 1 deletion .env
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,7 @@ spandspVersion=0d2e6ac # https://github.com/freeswitch/spandsp/commit/0d2e6ac65e
sofiaVersion=1.13.17
awsSdkCppVersion=1.11.345
freeswitchModulesVersion=1.2.22
freeswitchVersion=1.10.11
freeswitchVersion=1.10.11

dockerImageRepo=drachtio-freeswitch-mrf
dockerImageVersion=latest
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
### 0.9.2 (2024-09-13)
- fix replacement in `entrypoint.sh` to set the `Mediaserver` name correctly via `--username`
- improve `build-locally.sh` and add a tag to the docker image with `repo:version` from `.env` file

### 0.9.1 (2024-06-08)
- update `freeswitch` to `1.10.11`
- this changes the `sofia-sip` library requirement to version `1.13.17`
Expand Down
5 changes: 4 additions & 1 deletion build-locally.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ awsSdkCppVersion=$(grep awsSdkCppVersion .env | awk -F '=' '{print $2}')
freeswitchModulesVersion=$(grep freeswitchModulesVersion .env | awk -F '=' '{print $2}')
freeswitchVersion=$(grep freeswitchVersion .env | awk -F '=' '{print $2}')

dockerImageRepo=$(grep dockerImageRepo .env | awk -F '=' '{print $2}')
dockerImageVersion=$(grep dockerImageVersion .env | awk -F '=' '{print $2}')

docker build \
--build-arg CMAKE_VERSION="${cmakeVersion}" \
--build-arg GRPC_VERSION="${grpcVersion}" \
Expand All @@ -26,4 +29,4 @@ docker build \
--build-arg AWS_SDK_CPP_VERSION="${awsSdkCppVersion}" \
--build-arg FREESWITCH_MODULES_VERSION="${freeswitchModulesVersion}" \
--build-arg FREESWITCH_VERSION="${freeswitchVersion}" \
.
. --tag "${dockerImageRepo}:${dockerImageVersion}"
2 changes: 1 addition & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ while :; do

--username)
if [ -n "$2" ]; then
sed -i -e "s/name=\"username\" value=\"Jambonz\"/name=\"username\" value=\"$2\"/g" /usr/local/freeswitch/conf/sip_profiles/mrf.xml
sed -i -e 's/value="Jambonz-Mediaserver"/value="'$2'-Mediaserver"/g' /usr/local/freeswitch/conf/sip_profiles/mrf.xml
fi
shift
shift
Expand Down

0 comments on commit d4da5b4

Please sign in to comment.