Freeswitch init via SystemD on Debian Unstable

I ran into an issue when I upgraded my Debian unstable box to systemd. I have FreeSWITCH on this box and the systemd initiation is not working.


Dec 14 18:05:44 mail systemd[1]: freeswitch.service: Start operation timed out. Terminating.
Dec 14 18:05:48 mail systemd[1]: Failed to start freeswitch.
Dec 14 18:05:48 mail systemd[1]: freeswitch.service: Unit entered failed state.
Dec 14 18:05:48 mail systemd[1]: freeswitch.service: Failed with result 'timeout'.
Dec 14 18:05:48 mail systemd[1]: freeswitch.service: Service hold-off time over, scheduling restart.
Dec 14 18:05:48 mail systemd[1]: Stopped freeswitch.
Dec 14 18:05:48 mail systemd[1]: Starting freeswitch...
Dec 14 18:05:50 mail systemd[1]: freeswitch.service: PID file /run/freeswitch/freeswitch.pid not readable (yet?) after start: No such file or directory

After much research and trial and error, I finally found the solution. I had to change the PIDFile statement of the freeswitch.service file.


[Unit]
Description=freeswitch
After=syslog.target network.target local-fs.target

[Service]
; service
Type=forking
;PIDFile=/run/freeswitch/freeswitch.pid
PIDFile=/usr/local/freeswitch/run/freeswitch.pid
;PermissionsStartOnly=true
Environment="DAEMON_OPTS=-nonat"
EnvironmentFile=-/etc/default/freeswitch
ExecStart=/usr/local/freeswitch/bin/freeswitch -u freeswitch -g freeswitch -ncwait $DAEMON_OPTS

;ExecStart=/usr/local/freeswitch/bin/freeswitch -u freeswitch -g freeswitch -ncwait -nonat -rp
TimeoutSec=45s
Restart=on-failure
; exec
WorkingDirectory=/usr/local/freeswitch
;User=freeswitch
User=root
Group=daemon
;Group=freeswitch
LimitCORE=infinity
LimitNOFILE=100000
LimitNPROC=60000
;LimitSTACK=240
LimitRTPRIO=infinity
LimitRTTIME=7000000
IOSchedulingClass=realtime
IOSchedulingPriority=2
CPUSchedulingPolicy=rr
CPUSchedulingPriority=89
UMask=0007

[Install]
WantedBy=multi-user.target

Host route for incoming DID

flowroute

FS-new-web-logo

For months, my flowroute DID on my Freeswitch box has been misconfigured. I did not really care because I only use this as a backup. But, ever since I moved in the new house where the cellphone signal is atrocious , I find it necessary to have this working.

I had to call Dev at the house yesterday but the cellular call keeps dropping. When I called the flowroute DID , it gave me “you’ve dialled a non working number” . So today after much research , I found that I had to set the route settings in the flowroute site. I also had to match the port with the external profile port on my freeswitch box.

Freeswitch and NAT audio issues

I am running Freeswitch from git and lately I notice that it’s not working properly. Something changed that I could not put my finger on it.

So this is my setup:

  • Freeswitch from git – I almost always update this when I can. I don’t remember when but I one of the update I did broke the thing
  • Dingaling/GoogleVoice – I don’t know if this is FS or a google voice problem. Maybe google made some changes and screwed up freeswitch
  • Debian Sid – updated all the time
  • PFsense – latest and greatest routerĀ .I am doing NAT through this box. I might have made some changes that might have affected my FS . Need to investigate this.

What I have done so far:

  • I had set stun on jingle_profile and I still hear no audio , DTMF works however
  • Setting stun off disables DTMF and still no audio
  • Turned off Call Screening/Presentation
  • I am reverting to version 1.2.stable today. Before I was tracking Master.

Reverting to stable worked!

Switching to FreeSwitch

freeswitch

I am taking on a new project. I already started this a week ago and It’s still really a work in progress.

So,from my title you may know that I am trying out Freeswitch. I had Asterisk for so long I can’t even remember now. I mainly use my Asterisk setup for google voice and I don’t like that their implementation breaks a lot. I really don’t know if its Asterisk’s fault but I am just willing to try out something new ,hopefully this will be a whole lot better.

A couple of days ago ,I already figured out how to get incoming and outgoing GV(google voice) calls. Now all I need is to make a few adjustments to the dialplan,if I figure this out.*crosses fingers* The dialplan for me I think is much easier to understand than asterisk ,I just need a refresher on REGEX because all the logic depends on it.

Browsing through the Freeswitch wiki ,I found that refresher on REGEX.Thanks a lot to the Freeswitch community,I feel like I am . . .home. *winks*