From abf41eb99824fbb99921ac023a4615e2f1600703 Mon Sep 17 00:00:00 2001 From: paspo Date: Tue, 1 Jan 2019 23:42:45 +0100 Subject: [PATCH] updated readme --- README.md | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index c4fc1dc..834a1dd 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,27 @@ # sip-recorder -docker container with an asterisk instance which replies to all calls and records them \ No newline at end of file +docker container with an asterisk instance which replies to all calls and records them + +## building +``` +docker build -t sip-recorder . +``` + +## running +``` +# first get your IP address +IP=$(ip addr show eth0 |grep '^\s*inet\ ' | sed 's/.*inet\ \([0-9]*\.[0-9]*\.[0-9]*\.[0-9]*\).*/\1/') + +# then start the container +docker run -d --name sip-recorder \ +-v "$PWD/recordings:/recordings" \ +-v "$PWD/recordings-csv:/var/log/asterisk/cdr-custom" \ +-p 5060:5060/udp -p 15000-15100:15000-15100/udp \ +-e "SIP_PASS=mypassword" \ +-e "SIP_USER=myuser" \ +-e "SIP_SERVER=sip.provider.com" \ +-e "EXTERNAL_IP=$IP" \ +sip-recorder + +``` +