FreeSWITCH package for pfSense 1.2.1 and 2.0 released. PBX or Proxy
-
no Adrian - i havent actually tried to get one going on it, I will see if I can check one out tomorrow. Aastras are pretty finicky with network and nat settings - you are connecting everything on the same network - right? I still have not had a chance to troubleshoot why FS wont register to an asterisk extension, but I am pretty sure its something in the network config.
-
Ok, so I got a 57i plugged in, it registers, but it fails to make calls. everything is on the local lan, and this phone worked fine yesterday on asterisk. So i did a packet capture, and the packets looks like this:
1. SIP/SDP Request: INVITE
2. SIP Status: 100 Trying
3. SIP Status: 407 Proxy Authentication Required
4. SIP Request: ACK sip:9000@192.168.2.123:5060
5. IP Fragmented IP protocol (proto=UDP 0x11, off=0) [Reassembled in #6]
6. SIP/SDP Request: INVITE
7. same as packet 5I dont know if this Aastra specific, or freeswitch, but something keeps breaking the invite packets, they get reassembled in the next packet, but keep breaking. Softphones work fine, I even tried a different switch. At any rate I opened a ticket with aastra support, i will see if they can make anything of it.
@Adrian - How far did you get with your 9133?
-
It may help to monitor freeswitch you can use fs_cli (command line interface)
SSH to pfsense FreeSWITCH machine then:
cd /usr/local/freeswitch/bin
./fs_cli -H 192.168.0.1Replace 192.168.0.1 with pfsense LAN ip address.
Then you can watch what is going on in FreeSWITCH.
-
ya - thanks, I was just messing around at the cli. I am hoping these will work since they are listed on the FS interop page.
on another note - my Nokia N80 over wifi works flawless, actually better than the softphone;).
yet another: I cant figure out why this gateway that I deleted keeps popping up on the Status page under "sofia status" - is there more than one place I need to delete a gateway? I even tried rebooting.
-
Hi,
short question. Where can I find the current release of your freeswitch package?
Within the packages tab I can see only release 0.7 of freeswitch…thanks in advance
-
Within the packages tab I can see only release 0.7 of freeswitch…
That's the latest one as far as I know.
-
Hello mcrane…. I've finally setup another pfsense box to test out freeswitch. I'm a complete newb with a pap2(currently running 1 line with v-buzzer), but want to venture and try out a small SOHO setup.
I'm reading and reading, but I'm having a hard time with the initial setup. Is there a chance someone has a walkthrough for just the initial setup. I am sure that after I can get the system to at least talk to a phone and get the basics working, the rest is easy. The only way for me to figure out pfsense was to get the basic firewall working, and then one by one I learned how to setup and use the additional features (snort/proxy).
After I install the basic freeswitch package, what are the settings that have to be modified for a simple 2 phone system? How about settings for a pap2/spa942?
Funny thing was I originally thought I could do it by just some simple reading, and I was going to post a simple walkthough, as I know someone else who is interested. Instead it's me asking how..... -
Did you see this page?:
http://doc.pfsense.org/index.php/Category:FreeSWITCH -
Also Mcrane - I was able to finally get an Aastra 57i to work. evidentally it was generating packets that were exceeding the 1500 byte packet limit, so it was fragmenting the packets and for some reason pfsense/freeswitch was not able to reassemble them.
There is a fix for this on the phone: In the phone web-UI: Global SIP> Codec Preference List> Codec 1 >
change all to "Basic Codec", save settings and restart the phone.Or in cfg files for aastra set:
sip use basic codecs: 1
Not sure if there is a space for that in the wiki.
-
Did you see this page?:
http://doc.pfsense.org/index.php/Category:FreeSWITCHOf course. But there is nothing for a complete voip newb like me. If I just want my phone to talk to freeswitch to see that the connection is working, what do I need to setup?
The settings tab. Do I need to change anything in here?
Extensions. I am assuming that I need to setup one extension (ex 1001) and that is the username and password that the phone uses to connect to freeswitch?
Gateway. I assume that is where I setup my provider information.
I'm assuming that is all that I need minimum to get the SIP phone (spa942) to connect to freeswitch. After that I need to configure how the incoming calls are handled?
The page does not really get into what you need to get it running.I've tried the above and my SPA942 does not register with freeswitch..
Sorry but a lot of the terminology is way above a newb. I've been reading here and freeswitch site and there is just a lot for a new person to get into. It can't be that hard!!
If I ever get it running, I am going to make sure that I do a writeup for a newb. This system and what it can do should be easy to setup (at least for basic features). If it was easier, more people would use it. -
Of course. But there is nothing for a complete voip newb like me. If I just want my phone to talk to freeswitch to see that the connection is working, what do I need to setup?
The guide started out as a newb guide but I added more and more features too it.
Get phone to talk to FreeSWITCH…
1. Install the FreeSWITCH package
2. Setup the phone extension in the pfSense FreeSWITCH gui. Services -> FreeSWITCH -> Ext
3. Optional: If you are going to register the phone to the WAN IP of pfSense then skip this step.
If you to register to a domain then set the domain name under the 'Vars' tab with the variable 'domain'
domain=yourcustomdomaingoeshere.dyndns.org you can use dynamic dns if you have a dynamic ip address or a standard domain if you have a static ip address. If you changed the domain you might need to restart FreeSWITCH.
4. 'Status' click on reloadxml for FreeSWITCH to read the new changes to the configuration
5. Setup your phone or soft phone with the WAN IP or domain depending on what you chose on step 3.
6. Check the status page to see if your phone is registered.
7. Call extension 9999 which is music on hold.
8. Call your own extension and that will send you to voicemail. Or you can access voicemail for any extension at extension 4000.
9. Setup another extension and then try to call between extensions.The settings tab. Do I need to change anything in here?
You can set your 'area code' this is used if you want to use 7 digit dialing for outbound calls. The passwords on the settings page can be changed to make it more secure. The SMTP settings are for setting a mail server that will be delivering voice mails to email. Voicemail to email is optional there is standard voicemail saved that is saved on FreeSWITCH.
Extensions. I am assuming that I need to setup one extension (ex 1001) and that is the username and password that the phone uses to connect to freeswitch?
Yes, The username is the 'Extension' number and the password is the extensions 'Password'.
Gateway. I assume that is where I setup my provider information.
Yes, and then you can check to see if the Gateway/Provider is registered on the Status tab. If it is registered it will say 'reged'. On the 'Gateway' tab make sure to read the note next to the 'Dialplan Expression' tool. The Dialplan Expression is a shortcut that creates outbound routes on the 'Dialplan' tab. For the advanced user outbound routing can be handled directly from the 'Dialplan' tab without the 'Dialplan Expression'. I still use the 'Dialplan Expression' it works nicely as a shortcut. Note: don't expect anything to stay in the 'Dialplan Experssion' textarea shortcut the info is stored on the 'Dialplan' tab and not stored in the shortcut.
I'm assuming that is all that I need minimum to get the SIP phone (spa942) to connect to freeswitch.
I explained this pretty well in the 9 steps shown above.
After that I need to configure how the incoming calls are handled?
Incoming calls are handled with the 'Public' tab. There are notes inside this page that should help explain it.
First create the public 'Extension Name', make sure it is enabled, put a description on it like the phone number from the provider. Then add a condition to it 'destination_number' which will be the phone number that the provider has given you. This will usually be 11 digits but is sometimes 10 in the North America. For other areas I would ask the provider or experiment until you get it right. Then you need to add an action such as 'transfer'. On the transfer action you could put the extension number. If my main extension was 1001 then I would set it to '1001 XML default' or if you have setup an IVR at extension it would be '5002 XML default'If I ever get it running, I am going to make sure that I do a writeup for a newb. This system and what it can do should be easy to setup (at least for basic features). If it was easier, more people would use it.
You can get it running if you keep trying. Basic setup is really not that hard you probably are simply missing a few things.
Newb guides are always welcome the more the better. People learn best when they have multiples guides so that can pick the one that makes the most sense to them.
If you have any further questions then feel free to leave them here or ask them at #pfsense-freeswitch or #pfsense irc channels. If you try to reach me at #pfsense then make sure to prefix your question with 'mcrane: ' that way I'm alerted.
-
Hi,
short question. Where can I find the current release of your freeswitch package?
Within the packages tab I can see only release 0.7 of freeswitch…thanks in advance
0.7 is the current release for the pfSense FreeSWITCH. It doesn't follow the release number of the FreeSWITCH package.
However I am planning on rebuilding FreeSWITCH in the next day or two.I've also been working on a new 'follow me' feature that can ring multiple extensions simultaneously or ring them in order. The 'follow me' feature is working on 3 phone systems now but I'm either going to build a GUI for it or allow numbers to be entered through a phone.
-
thanks master! I vote too to change mcrane status to super hero menber or superman!
-
Thanks for the writeup mcrane!
I'll go over the whole thing step by step and see what I missed. I had basically done everything, but I now see my problem. On my original test machine, I could not get any voip phone connecting (even qutecom). I was totally fustrated after my post 2 days ago.. I then did another test machine with nothing but pfsense and freeswitch. I actually got the software to connect to freeswitch (ok, connecting, but nothing working). So I am on a roll, I know now I'll be able to get it running.
I now see the original problem as to why things were not working at all. On my original test setup I am running a whole bunch of services (snort/squid/squidguard/bandwidthd) and there must be a conflict somewhere. It finds my external ip ok, but for the internal it finds my external ip again. My test setup #2 has no issues and finds the correct ips.
One more thing… Any weird settings on a spa942? Trying to find the correct settings for a connection...Since my original test setup will be my final setup, I'll have to readup to see how freeswitch binds to the correct adapter.
And Again....
THANKS! It's nice to have the support base here. The freeswitch package will be a success just based on the great support. -
I now see the original problem as to why things were not working at all. On my original test setup I am running a whole bunch of services (snort/squid/squidguard/bandwidthd) and there must be a conflict somewhere.
I have snort and bandwidthd running on systems with the FreeSWITCH package and it runs fine. My guess if there is a conflict it will be with squid or squidguard.
It finds my external ip ok, but for the internal it finds my external ip again. My test setup #2 has no issues and finds the correct ips.
I suspect terminology is confusing you on this. FreeSWITCH binds by default to the WAN IP for both internal and external profiles. These SIP profiles are not exactly like a WAN and LAN. Internal is the SIP profile that handles SIP registrations. The external profiles handles anonymous calls that don't require registration. The external calls are routed using the 'Public' tab in the GUI.
You can make FreeSWITCH bind to the WAN or the LAN if you want it to bind to both you need to create an additional SIP profile.
One more thing… Any weird settings on a spa942? Trying to find the correct settings for a connection...
If your phone is behind NAT then on the extensions tab set NAT equal to yes. There is also changes needed on the SIP tab to make it handle NAT better. After I get some sleep I will look up these settings and document them here on the forum again (not sure where the link to it is on the forum but I believe I have mentioned it before).
-
@mcrane:
I have snort and bandwidthd running on systems with the FreeSWITCH package and it runs fine. My guess if there is a conflict it will be with squid or squidguard.
FWIW I am running freeswitch with snort, squid and bandwidthd. No squidguard here though.
-
Thanks again for the info. I got my spa942 running. Seems to be an issue with my 1001 extension (I setup what I thought was an identical 1002 extension and it connects to it). So it seems I just need to play with it.
I have dialtone and registration with my sip provider works, so I am sure it's just fiddling and a little reading. Thanks everyone! I hate getting spoonfed, but the initial issues were hard to get over when I don't know nothing :) Actually this is now the funpart and see what else it can do :)
So actually freeswitch is easy, I just ran into a few setup issues on my end right off the bat.As for my initial test machine, it sounds to me like I should play with my original setup and see why the connections are not working. You are right mcrane, the terminology is different. Internal to me means my "intranet", but freeswitch it means something else. Just more reading on my part to find out why that setup does not work. It has to be something trivial I overlooked.
Update.
Outbound calls working. Inbound not, but my working test machine is behind my main pfsense machine (nat behind a nat :). So I'm back to the original test machine and getting it running (where it will end up permanently). I can't get the phones to connect again on this setup. SO I checked the working pfsense settings. From the status tab….
internal profile sip:mod_sofia@192.168.0.8:5060
On the new one, it's the IP of my wan. So I decided to modify the internal setting and specify the rtp-ip and the sip-ip. Now my internal settings look like my working setup (local ip) except for the following line
68.XXX.XXX.XXX alias internal
I'm getting somewhere, as freeswitch is now listening to the right port. I know this since I am now getting items in the log (nothing before)
"Can't find user [1003@192.168.0.3]
You must define a domain called '192.168.0.3' in your directory and add a user with the id="1003" attribute
and you must configure your device to use the proper domain in it's authentication credentials."
So I'm assuming I'm missing something here. Something to do with the alias.
I'm also not sure why nobody else gets this problem. I'm also not sure why one test machine figures out the correct lan/wan while this one machine does not..Anyone have an idea? I think I'm down to my final item. Hopefully someone else will learn from my errors.
-
So I decided to modify the internal setting and specify the rtp-ip and the sip-ip.
The default doesn't need to be changed in most circumstances.
"Can't find user [1003@192.168.0.3]
Look on the status tab and see what IP the internal profile uses. That is the IP that your phone should use to register.
On the 'Internal' tab there is a variable called: force-register-domain if you uncomment that so that it is applied then all registrations that FreeSWITCH receives will be forced seen as that domain that is specified. This means the phone could register with the domain or the IP that the Internal profile is listening on. -
@mcrane:
So I decided to modify the internal setting and specify the rtp-ip and the sip-ip.
The default doesn't need to be changed in most circumstances.
"Can't find user [1003@192.168.0.3]
Look on the status tab and see what IP the internal profile uses. That is the IP that your phone should use to register.
On the 'Internal' tab there is a variable called: force-register-domain if you uncomment that so that it is applied then all registrations that FreeSWITCH receives will be forced seen as that domain that is specified. This means the phone could register with the domain or the IP that the Internal profile is listening on.I agree that it should not need to be changed, as my other test system had no issues with getting the correct interface, and working by default. This current(final) setup still reads in the sofia status
68.151.XXX.XXX alias internal ALIASED
While my other setup reads in that line, the IP of my internal network.The change you suggested works! I can now connect to freeswitch from the phones.
So the only conclusion I see here is that if you are unable to connect to freeswitch, watch the "sofia status profile internal" in the status tab. If it's the wrong one, you have to modify 3 items in the internal settings. The rtp-ip, the sip-ip and uncomment force-register-domain.Could there be an issue with it showing the WAN ip in the internal setting above that someone outside could connect to freeswitch as it's now listening on the wan? (I guess they would still need to know the extension and password)
Then again I understand that the terminology in freeswitch different from what I might perceive it to be…ANYWAYS!! Thanks! I'm on my final setup now, connecting, dialing out, and am down to getting inbound calls (plus playing with other items). I know the rest I can play/read.
-
I note that mod_openzap.so is missing in latest installation.