Hello,
Long time Kam/Ser user, first time poster.
I'm running into a problem with one of our telco providers when we make a
call that ends up being not in service or some other error. In this case
our ACK's are not working and the phone line stays open for a period
of time until something times out on their end.
They claim the issue is that our negative ACK message is dropping one of
the Via headers. This is the only case I can find in our setup where
Kamailio does this. But it does drop the first Via, which is the first hop
in our internal network.
I don't understand why this is a problem for them, and I'm still trying to
get a reasonable explanation out of them. Technically, I don't see why it
would be a problem. This behaviour is not an issue with our other telco
providers. Strangely enough, it is also not an issue for this provider when
we make the calls over their MPLS network (we are switching to the
internet).
My question is, can this behaviour be changed in Kamailio somehow? Is there
a way for it to keep all the Via headers for negative ACK's?
Or, do I just need to poke them harder to fix their issues?
My setup:
Source -> Kamailio -> Firewall (NAT, SIP ALG) -> Telco Provider
I hope I have provided enough information.
Thanks!
Michael
Alex,
I get the following error
ERROR: <core> [core/pvapi.c:1127]: pv_parse_spec2(): wrong char [
ERROR: bad config file (1 errors)
CRITICAL: <core> [core/cfg.y:3537]: yyerror_at(): parse error in config
file /usr/local/etc/kamailio/kamailio.cfg, line 462, column 23-40: Can't
get from cache: $(rU{s.select,0,#)
David,
I did try escaping and get the same error.
$avp(techprefix) = $(rU{s.select,0,\#});
additionally, I think I initially tried it double quoted.
$avp(techprefix) = $(rU{s.select,0,"#"});
Resulted in:
ERROR: <core> [core/pvapi.c:1127]: pv_parse_spec2(): wrong char [
ERROR: bad config file (1 errors)
CRITICAL: <core> [core/cfg.y:3537]: yyerror_at(): parse error in config
file /usr/local/etc/kamailio/kamailio.cfg, line 462, column 23-42: Can't
get from cache: $(rU{s.select,0,"#")
Here is the entire block.
if ($rU =~ "[\*\#]") {
xlog("L_INFO",
"[$ci] -> $rU appears to have a tech prefix, processing...\n");
if ($rU =~ "\*") {
$avp(techprefix) = $(rU{s.select,0,*});
## Reset the RURI user to the non-tech prefix'ed value
$rU = $(rU{s.select,1,*});
## Overwrite the message source variable with "sourceip-techprefix"
$var(messagesource) = $_s($si-$avp(techprefix));
} else if ($rU =~ "\#") {
$avp(techprefix) = $(rU{s.select,0,#)});
## Reset the RURI user to the non-tech prefix'ed value
$rU = $(rU{s.select,1,#});
## Overwrite the message source variable with "sourceip-techprefix"
$var(messagesource) = $_s($si-$avp(techprefix));
}
}
On Sat, Jan 11, 2020 at 5:00 AM <sr-users-request(a)lists.kamailio.org> wrote:
> Send sr-users mailing list submissions to
> sr-users(a)lists.kamailio.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
> or, via email, send a message with subject or body 'help' to
> sr-users-request(a)lists.kamailio.org
>
> You can reach the person managing the list at
> sr-users-owner(a)lists.kamailio.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of sr-users digest..."
> Today's Topics:
>
> 1. Re: Kamailio in Docker Compile Error (Sergey Safarov)
> 2. Re: Kamailio in Docker Compile Error (Sam Ware)
> 3. Kamailio 5.2.2 IMS -enum_query question (Woscek, Martin W.)
> 4. String Transformation Question (Sam Ware)
> 5. Re: String Transformation Question (Alex Balashov)
> 6. Re: String Transformation Question (David Villasmil)
>
>
>
> ---------- Forwarded message ----------
> From: Sergey Safarov <s.safarov(a)gmail.com>
> To: "Kamailio (SER) - Users Mailing List" <sr-users(a)lists.kamailio.org>
> Cc:
> Bcc:
> Date: Fri, 10 Jan 2020 14:38:02 +0300
> Subject: Re: [SR-Users] Kamailio in Docker Compile Error
> please try kamailio-ci:5.3.2-alpine
> I will fix error about kamailio-ci:5.3.1-alpine.
>
> On Fri, Jan 10, 2020 at 1:53 PM Asgaroth <00asgaroth00(a)gmail.com> wrote:
>
>> Hi,
>>
>> I see that the kamailio-ci:5.3.1-alpine tag exists, but was getting an
>> error when trying to pull it 2 days ago, 5.3.0- alpine works fine.
>>
>> Unfortunately I cannot post the actual docker pull error right now (in
>> airport, on my phone)
>>
>> On Fri 10 Jan 2020, 08:32 Sergey Safarov, <s.safarov(a)gmail.com> wrote:
>>
>>> yum -y install yum-utils
>>> yum-config-manager --add-repo http://rpm.kamailio.org/centos/kamailio.repo
>>> yum install kamailio
>>>
>>>
>>> Also you can use this docker image
>>> https://hub.docker.com/repository/docker/kamailio/kamailio-ci
>>>
>>> On Fri, Jan 10, 2020 at 10:58 AM Daniel-Constantin Mierla <
>>> miconda(a)gmail.com> wrote:
>>>
>>>> Hello,
>>>>
>>>> try to install which and pkg-config tools.
>>>>
>>>> Cheers,
>>>> Daniel
>>>> On 10.01.20 02:21, Sam Ware wrote:
>>>>
>>>> I am attempting to create my own docker image on Centos 7. During the
>>>> build, I get the following error message during the "make all" phase.
>>>> ----------------------------------------------------------------------
>>>> CC (gcc) [kamailio] core/cfg.tab.o
>>>> LD (gcc) [kamailio] kamailio
>>>> make[1]: which: Command not found
>>>> make[1]: which: Command not found
>>>> make[1]: which: Command not found
>>>> make[1]: which: Command not found
>>>> make[1]: which: Command not found
>>>> make[1]: which: Command not found
>>>> CC (gcc) [M db_mysql.so] km_dbase.o
>>>> km_dbase.c:36:19: fatal error: mysql.h: No such file or directory
>>>> #include <mysql.h>
>>>> ^
>>>> compilation terminated.
>>>> make[1]: *** [km_dbase.o] Error 1
>>>> make: *** [modules] Error 1
>>>> ------------------------------------------------------------------------
>>>>
>>>> I checked and the mysql.h exists in the /usr/include/mysql directory.
>>>>
>>>> Any thoughts?
>>>>
>>>> FYI, here is my Dockerfile
>>>>
>>>> FROM centos:7
>>>> MAINTAINER “Sam D Ware” sware(a)o1.com
>>>> ENV container docker
>>>> RUN (cd /lib/systemd/system/sysinit.target.wants/; for i in ; do [ $i
>>>> == systemd-tmpfiles-setup.service ] || rm -f $i; done);
>>>> RUN rm -rf /lib/systemd/system/multi-user.target.wants/ \
>>>> && rm -rf /etc/systemd/system/.wants/ \
>>>> && rm -rf /lib/systemd/system/local-fs.target.wants/ \
>>>> && rm -f /lib/systemd/system/sockets.target.wants/udev \
>>>> && rm -f /lib/systemd/system/sockets.target.wants/initctl \
>>>> && rm -rf /lib/systemd/system/basic.target.wants/ \
>>>> && rm -f /lib/systemd/system/anaconda.target.wants/*
>>>> VOLUME [ “/sys/fs/cgroup”]
>>>> RUN yum -y install epel-release
>>>> RUN yum -y update
>>>> RUN yum -y install git-core gcc gcc-c++ flex bison mysql-devel
>>>> RUN yum -y install mariadb-devel hiredis hiredis-devel curl nss make
>>>> WORKDIR /usr/local/src/
>>>> RUN git clone --depth 1 --no-single-branch
>>>> https://github.com/kamailio/kamailio kamailio
>>>> WORKDIR /usr/local/src/kamailio/
>>>> RUN git checkout -b 5.3 origin/5.3
>>>> RUN make cfg
>>>> COPY modules.lst /usr/local/src/kamailio/src/
>>>> RUN make all
>>>> RUN make install
>>>> RUN groupadd kamailio
>>>> RUN adduser --system -g kamailio --shell /bin/false -c "Kamailio"
>>>> --home /var/run/kamailio kamailio
>>>> RUN cp /usr/local/src/kamailio/pkg/kamailio/obs/kamailio.sysconfig
>>>> /etc/sysconfig/kamailio
>>>> COPY kamailio.service /etc/systemd/system/kamailio.service
>>>> RUN yum clean all; systemctl enable kamailio
>>>> CMD ["/usr/sbin/init"]
>>>>
>>>> --
>>>> Sam D Ware
>>>>
>>>>
>>>> _______________________________________________
>>>> Kamailio (SER) - Users Mailing Listsr-users@lists.kamailio.orghttps://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>>>
>>>> --
>>>> Daniel-Constantin Mierla -- www.asipto.comwww.twitter.com/miconda -- www.linkedin.com/in/miconda
>>>> Kamailio World Conference - April 27-29, 2020, in Berlin -- www.kamailioworld.com
>>>>
>>>> _______________________________________________
>>>> Kamailio (SER) - Users Mailing List
>>>> sr-users(a)lists.kamailio.org
>>>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>>>
>>> _______________________________________________
>>> Kamailio (SER) - Users Mailing List
>>> sr-users(a)lists.kamailio.org
>>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>>
>> _______________________________________________
>> Kamailio (SER) - Users Mailing List
>> sr-users(a)lists.kamailio.org
>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>
>
>
>
> ---------- Forwarded message ----------
> From: Sam Ware <sam.ware(a)gmail.com>
> To: miconda(a)gmail.com
> Cc: "Kamailio (SER) - Users Mailing List" <sr-users(a)lists.kamailio.org>
> Bcc:
> Date: Fri, 10 Jan 2020 07:23:46 -0600
> Subject: Re: [SR-Users] Kamailio in Docker Compile Error
> Thanks Daniel,
>
> That got me past that hurdle. It was the "which". Looks like the
> pkg-config tools was already install; probably a preq for one of the other
> pkgs.
>
> Sam
>
> On Fri, Jan 10, 2020 at 1:58 AM Daniel-Constantin Mierla <
> miconda(a)gmail.com> wrote:
>
>> Hello,
>>
>> try to install which and pkg-config tools.
>>
>> Cheers,
>> Daniel
>> On 10.01.20 02:21, Sam Ware wrote:
>>
>> I am attempting to create my own docker image on Centos 7. During the
>> build, I get the following error message during the "make all" phase.
>> ----------------------------------------------------------------------
>> CC (gcc) [kamailio] core/cfg.tab.o
>> LD (gcc) [kamailio] kamailio
>> make[1]: which: Command not found
>> make[1]: which: Command not found
>> make[1]: which: Command not found
>> make[1]: which: Command not found
>> make[1]: which: Command not found
>> make[1]: which: Command not found
>> CC (gcc) [M db_mysql.so] km_dbase.o
>> km_dbase.c:36:19: fatal error: mysql.h: No such file or directory
>> #include <mysql.h>
>> ^
>> compilation terminated.
>> make[1]: *** [km_dbase.o] Error 1
>> make: *** [modules] Error 1
>> ------------------------------------------------------------------------
>>
>> I checked and the mysql.h exists in the /usr/include/mysql directory.
>>
>> Any thoughts?
>>
>> FYI, here is my Dockerfile
>>
>> FROM centos:7
>> MAINTAINER “Sam D Ware” sware(a)o1.com
>> ENV container docker
>> RUN (cd /lib/systemd/system/sysinit.target.wants/; for i in ; do [ $i ==
>> systemd-tmpfiles-setup.service ] || rm -f $i; done);
>> RUN rm -rf /lib/systemd/system/multi-user.target.wants/ \
>> && rm -rf /etc/systemd/system/.wants/ \
>> && rm -rf /lib/systemd/system/local-fs.target.wants/ \
>> && rm -f /lib/systemd/system/sockets.target.wants/udev \
>> && rm -f /lib/systemd/system/sockets.target.wants/initctl \
>> && rm -rf /lib/systemd/system/basic.target.wants/ \
>> && rm -f /lib/systemd/system/anaconda.target.wants/*
>> VOLUME [ “/sys/fs/cgroup”]
>> RUN yum -y install epel-release
>> RUN yum -y update
>> RUN yum -y install git-core gcc gcc-c++ flex bison mysql-devel
>> RUN yum -y install mariadb-devel hiredis hiredis-devel curl nss make
>> WORKDIR /usr/local/src/
>> RUN git clone --depth 1 --no-single-branch
>> https://github.com/kamailio/kamailio kamailio
>> WORKDIR /usr/local/src/kamailio/
>> RUN git checkout -b 5.3 origin/5.3
>> RUN make cfg
>> COPY modules.lst /usr/local/src/kamailio/src/
>> RUN make all
>> RUN make install
>> RUN groupadd kamailio
>> RUN adduser --system -g kamailio --shell /bin/false -c "Kamailio" --home
>> /var/run/kamailio kamailio
>> RUN cp /usr/local/src/kamailio/pkg/kamailio/obs/kamailio.sysconfig
>> /etc/sysconfig/kamailio
>> COPY kamailio.service /etc/systemd/system/kamailio.service
>> RUN yum clean all; systemctl enable kamailio
>> CMD ["/usr/sbin/init"]
>>
>> --
>> Sam D Ware
>>
>>
>> _______________________________________________
>> Kamailio (SER) - Users Mailing Listsr-users@lists.kamailio.orghttps://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>
>> --
>> Daniel-Constantin Mierla -- www.asipto.comwww.twitter.com/miconda -- www.linkedin.com/in/miconda
>> Kamailio World Conference - April 27-29, 2020, in Berlin -- www.kamailioworld.com
>>
>>
>
> --
> Sam D Ware
>
>
>
>
> ---------- Forwarded message ----------
> From: "Woscek, Martin W." <mwoscek(a)mitre.org>
> To: "Kamailio (SER) - Users Mailing List" <sr-users(a)lists.kamailio.org>
> Cc:
> Bcc:
> Date: Fri, 10 Jan 2020 16:57:29 +0000
> Subject: [SR-Users] Kamailio 5.2.2 IMS -enum_query question
>
> Hi,
>
>
>
> I am trying to invoke unum lookups from calls to enum_query()
> ,is_from_user_enum() and enum_pv_query().
>
> However we are not seeing any enum lookups over the wire using wireshark.
>
>
>
> In the Kamailio.cfg the following are set:
>
>
>
> loadmodule "enum"
>
> modparam("enum", "domain_suffix", "mydnsserver.org.")
>
> modparam("enum", "i_enum_suffix", " mydnsserver.org.")
>
>
>
> sample use in our Kamailio.cfg file:
>
>
>
> if(!enum_query("mydnsserver.org.")) {
>
> xlog(“….);
>
> #do something
>
> } else {
>
> Xlog(“….”)
>
> #do something else
>
> }
>
>
>
> I do see NAPTR lookups being done by the other Kamailio IMS processes
> initially when it starts up so I know it has connectivity to the DNS
> server, but none for the invoked enum queries.
>
>
>
> We are running Kamailio 5.2.2.
>
>
>
> Thanks,
>
> Martin
>
>
>
> ---------- Forwarded message ----------
> From: Sam Ware <sam.ware(a)gmail.com>
> To: "Kamailio (SER) - Users Mailing List" <sr-users(a)lists.kamailio.org>
> Cc:
> Bcc:
> Date: Fri, 10 Jan 2020 17:22:17 -0600
> Subject: [SR-Users] String Transformation Question
> We are receiving traffic with a tech prefix. We want to be able to use a
> # (hash tag) for the separator for the tech prefix and the remote user
> ($rU). I was using the s.select transformation before when using * for
> separator, but I get an error because it appears that it being interpreted
> as a comment. Any suggestions?
>
> Example:
> ## How I was doing it with the *
> $avp(techprefix) = $(rU{s.select,0,*});
>
> ## How I tried and got an error for the hash tag
> $avp(techprefix) = $(rU{s.select,0,#});
> --
> Sam D Ware
>
>
>
>
> ---------- Forwarded message ----------
> From: Alex Balashov <abalashov(a)evaristesys.com>
> To: "Kamailio (SER) - Users Mailing List" <sr-users(a)lists.kamailio.org>
> Cc:
> Bcc:
> Date: Fri, 10 Jan 2020 18:24:44 -0500
> Subject: Re: [SR-Users] String Transformation Question
> What’s the error?
>
> —
> Sent from mobile, with due apologies for brevity and errors.
>
> On Jan 10, 2020, at 6:23 PM, Sam Ware <sam.ware(a)gmail.com> wrote:
>
>
> We are receiving traffic with a tech prefix. We want to be able to use a
> # (hash tag) for the separator for the tech prefix and the remote user
> ($rU). I was using the s.select transformation before when using * for
> separator, but I get an error because it appears that it being interpreted
> as a comment. Any suggestions?
>
> Example:
> ## How I was doing it with the *
> $avp(techprefix) = $(rU{s.select,0,*});
>
> ## How I tried and got an error for the hash tag
> $avp(techprefix) = $(rU{s.select,0,#});
> --
> Sam D Ware
>
> _______________________________________________
> Kamailio (SER) - Users Mailing List
> sr-users(a)lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
>
>
>
> ---------- Forwarded message ----------
> From: David Villasmil <david.villasmil.work(a)gmail.com>
> To: "Kamailio (SER) - Users Mailing List" <sr-users(a)lists.kamailio.org>
> Cc:
> Bcc:
> Date: Fri, 10 Jan 2020 23:24:51 +0000
> Subject: Re: [SR-Users] String Transformation Question
> Have you tried scaping it? Never done it, tho
>
> On Fri, 10 Jan 2020 at 23:23, Sam Ware <sam.ware(a)gmail.com> wrote:
>
>> We are receiving traffic with a tech prefix. We want to be able to use a
>> # (hash tag) for the separator for the tech prefix and the remote user
>> ($rU). I was using the s.select transformation before when using * for
>> separator, but I get an error because it appears that it being interpreted
>> as a comment. Any suggestions?
>>
>> Example:
>> ## How I was doing it with the *
>> $avp(techprefix) = $(rU{s.select,0,*});
>>
>> ## How I tried and got an error for the hash tag
>> $avp(techprefix) = $(rU{s.select,0,#});
>> --
>> Sam D Ware
>>
>> _______________________________________________
>> Kamailio (SER) - Users Mailing List
>> sr-users(a)lists.kamailio.org
>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>
> --
> Regards,
>
> David Villasmil
> email: david.villasmil.work(a)gmail.com
> phone: +34669448337
> _______________________________________________
> sr-users mailing list
> sr-users(a)lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
--
Sam D Ware
Hello kamailio gurus,
I was wondering if there is a way to send a custom SIP NOTIFY message from kamailio to the registered SIP clients on-demand. For example, I want to take a kamailio node for maintainance and want all polycom phones registered on a kamailio node to re-register and move to a different kamailio node.
I know the uac module can send custom requests via uac_req_send, but can I invoke this via a kamcmd or kamctl command ?Any pointers/clues would be a great help.
Thanks,RK
Hi All,
Quick question, I've tried to find this myself, but there doesn't seem to be any documentation that I can find on it.
Does the topos module work with db_redis module? I can see two schema files for topos (topos_t, topos_d), but I can't work out what the keys should be.
modparam("db_redis", "keys", "topos_t=entry:hash_entry,hash_id,...?")
modparam("db_redis", "keys", "topos_d=entry:hash_entry,hash_id,...?")
modparam("topos", "db_url", "redis://127.0.0.1:6379/kamailio")
modparam("topos", "storage", "db")
Any pointers would be greatly appreciated.
Kind Regards,
Ben Merrills
Dear All,
I was wondering if someone could give me a pointer on handling diameter
"EVENT REQUEST" (416)
I am a complete newb to the diameter, and have used a RESTCOMM SMS-C to
generate charging requests.
1. I have got the CDP and other modules going and it connects with
application (Diameter Credit Control Application (4)
2. I tried to use a simple ims_ocs module, but get a "getMethod()"
error. Looking at the code, there are only three supported, START,
INTERIM, & STOP.
3. I have captured the message in pcap - and all looks OK.
4. To examine the whole message I tried using the ims_diameter_server
module to produce a JSON of all the values sent in the $diameter_request
within the event_route, HOWEVER once the request arrives I get an error:
ERROR: cdp [diameter_avp.c:645]: AAAUngroupAVPS(): hss3g_ungroup_avps:
source buffer to short!! Cannot read the whole AVP header!
I assume that the cdp function AAAUngroupAVPS() cannot sort the data
into JSON due to a buffer issue. Any pointers?
Steve
Boa Noite.
Instalei o kamailio mas não consigo usar
Segue a configuração.
baixei e adicionei chave GPG à sua lista de chaves apt
wget -O- http://deb.kamailio.org/kamailiodebkey.gpg | sudo apt-key a
Em seguida, adicionei as linhas do repositório ao seu arquivo
/etc/apt/sources.list , Adicionei um repositório para a versão mais
recente.
sudo nano /etc/apt/source.list.d/kamailio.list
versão ubuntu 16.04
deb http://deb.kamailio.org/kamailio53 xenial main
deb-src http://deb.kamailio.org/kamailio53 xenial main
Atualização do sistema e instalação do Kamailio
sudo apt update
sudo apt install kamailio kamailio-mysql-modules
Editei o arquivo /etc/kamailio/kamctlrc e verifiquei se a DBENGINE variável
está definida como MySQL. Removi o #símbolo para descomentá-lo.
$ sudo nano / etc / kamailio / kamctlrc
DBENGINE = MYSQL
DBHOST = host local
Instalei banco de dados
apt install mysql-server
modulos também
apt -y install kamailio kamailio-mysql-modules kamailio-utils-modules
rtpproxy
Em seguida criei banco de dados para Mysql.
sudo kamdbctl create
logo após foi inserida a senha
(xxxx)
editei o arquivo /etc/kamailio/kamailio.cfg
#! define WITH_MYSQL
#! define WITH_AUTH
*#! define WITH_USRLOCDB -> ao adicionar este iten o kamailio
reiinicializa com erro (segue anexo arquivo jpeg)*
#! define WITH_ACCDB
Editei a linha da variável RUN_KAMAILIO no arquivo /etc/default/kamailio
para que o kamailio possa rodar.
RUN_KAMAILIO=yes
configuração do rtpproxy no arquivo /ec/default/rtpproxy
retirada do #simbolo
control_sock=udp:localhost:7722
EXTRA_OPTS=" -l < IP local >"
reinicio RTPproxy
Obs: O sistema tambem não existe o arquivo /var/log/kamailio.log
We are receiving traffic with a tech prefix. We want to be able to use a #
(hash tag) for the separator for the tech prefix and the remote user
($rU). I was using the s.select transformation before when using * for
separator, but I get an error because it appears that it being interpreted
as a comment. Any suggestions?
Example:
## How I was doing it with the *
$avp(techprefix) = $(rU{s.select,0,*});
## How I tried and got an error for the hash tag
$avp(techprefix) = $(rU{s.select,0,#});
--
Sam D Ware
I am attempting to create my own docker image on Centos 7. During the
build, I get the following error message during the "make all" phase.
----------------------------------------------------------------------
CC (gcc) [kamailio] core/cfg.tab.o
LD (gcc) [kamailio] kamailio
make[1]: which: Command not found
make[1]: which: Command not found
make[1]: which: Command not found
make[1]: which: Command not found
make[1]: which: Command not found
make[1]: which: Command not found
CC (gcc) [M db_mysql.so] km_dbase.o
km_dbase.c:36:19: fatal error: mysql.h: No such file or directory
#include <mysql.h>
^
compilation terminated.
make[1]: *** [km_dbase.o] Error 1
make: *** [modules] Error 1
------------------------------------------------------------------------
I checked and the mysql.h exists in the /usr/include/mysql directory.
Any thoughts?
FYI, here is my Dockerfile
FROM centos:7
MAINTAINER “Sam D Ware” sware(a)o1.com
ENV container docker
RUN (cd /lib/systemd/system/sysinit.target.wants/; for i in ; do [ $i ==
systemd-tmpfiles-setup.service ] || rm -f $i; done);
RUN rm -rf /lib/systemd/system/multi-user.target.wants/ \
&& rm -rf /etc/systemd/system/.wants/ \
&& rm -rf /lib/systemd/system/local-fs.target.wants/ \
&& rm -f /lib/systemd/system/sockets.target.wants/udev \
&& rm -f /lib/systemd/system/sockets.target.wants/initctl \
&& rm -rf /lib/systemd/system/basic.target.wants/ \
&& rm -f /lib/systemd/system/anaconda.target.wants/*
VOLUME [ “/sys/fs/cgroup”]
RUN yum -y install epel-release
RUN yum -y update
RUN yum -y install git-core gcc gcc-c++ flex bison mysql-devel
RUN yum -y install mariadb-devel hiredis hiredis-devel curl nss make
WORKDIR /usr/local/src/
RUN git clone --depth 1 --no-single-branch
https://github.com/kamailio/kamailio kamailio
WORKDIR /usr/local/src/kamailio/
RUN git checkout -b 5.3 origin/5.3
RUN make cfg
COPY modules.lst /usr/local/src/kamailio/src/
RUN make all
RUN make install
RUN groupadd kamailio
RUN adduser --system -g kamailio --shell /bin/false -c "Kamailio" --home
/var/run/kamailio kamailio
RUN cp /usr/local/src/kamailio/pkg/kamailio/obs/kamailio.sysconfig
/etc/sysconfig/kamailio
COPY kamailio.service /etc/systemd/system/kamailio.service
RUN yum clean all; systemctl enable kamailio
CMD ["/usr/sbin/init"]
--
Sam D Ware