Hi Peter,

I created simple config for freeswitch+kamailio set-up, where everything including registration is handled by Freeswitch(PBX) and you can try to use it, maybe this is what you need.


I never tested in in prod, so use it on your own risk.

With kind regards,


2015-12-17 17:36 GMT+02:00 Peter Gervai <grinapo@gmail.com>:

I've been browsing the net and the (not so friendly) documentation but
found no readily available solution.
I have tried to fabricate on myself but it seems it's not that easy
without getting deeply familarised with
SIP protocol internals which I don't quite want know.

The problem seems simple enough, maybe you can easily tell the solution.

There is kamailio at ip It's task is to accept
connections from SIP clients
and forward them to PBX at, and accept PBX packets and
forward them to the
clients.  PBX handles registration, options, invites, everything.
Kamailio does not authenticate, authorise, just forwards everything
back and forth, like a mindless proxy.
No NAT involved.

[The reason is that K. have to call external scripts whenever an
outbound call (towards the clients) is
initiated, which the PBX is unable to. Please don't advise other
solutions (which isn't able to call executables

I have created a simplistic config which is not expected to work and
it doesn't quite (plenty of security stuff left out now):

route {
 if(src_ip==myself) {
 } else {
  if(src_ip!="") {
  } else { #from gateway pkts aren't changed

  if(!t_relay()) {

There is several possible problems, but it seems Contact: is one main
one since it contains the client instead of
the proxy. Possibly this may even be the almost-good solution.

I'm sure there's an easy and pretty solution so before I start to make
ugly ones I ask the wise people.


SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list