FreeSWITCH package for pfSense 1.2.1 and 2.0 released. PBX or Proxy
-
I just want to say that having this package is awesome.
I've always been intimidated by SIP, except to get a PAP2 running at home.
I know a lot of us newbs looking at this are still overwhelmed, but I know after some more reading I will try it out. For a newb to sip, there are so many options that I don't exactly know where to start. Ok, ok, I do know, more reading :)I will say that making this available here is extremely encouraging. I am finally starting to see the light at then end of the tunnel.
Thank you for all your hard work "mcrane"
-
Sorry if this is a bit off topic…but is there a reason you (MCCRANE) chose FreeSWITCH vs something like sipXecs as a package?
-
scottnguyen:
sipXecs looked pretty good here is my reasons for not going with it.
1. sipXecs already has a GUI and a company backing it. I'm not sure what language the GUI was in by I wanted one in PHP.
2. I'm not an expert on sipXecs but my impression is its limited to SIP only.
3. sipXecs is LGPL which I like better than the GPL however I like the MPL even better than the LGPL.Spend some time to learn more about FreeSWITCH it will be worth your time.
FreeSWITCH configuration by default is XML. pfSense's config is stored in XML. So it seemed a good fit.
FreeSWITCH is also modular, extensible, scalable, multi-platform, can interface with multiple languages, remote access is possible over xml rpc, over a network socket, can be a VoIP SWITCH, Proxy, soft phone, and/or PBX.
-
tester_02: Configuring the linksys pap2t is a good start. Reading about FreeSWITCH here on the forum should help. In addition to that take a look at http://wiki.freeswitch.org. Do your best to read through the information then feel free to ask questions. Good Luck!
I mentioned this in a comment on the blog but want to make sure it gets noticed.
Voicemail.
To access your voicemail you can dial extension 4000 then your id (extension number) then the voicemail password. This can be accessed from any extension on the system or from any phone through the IVR (auto attendant).
In addition to that if your extension is 1001 and you were currently on that extension you simply call extension 1001 and it will go to your voicemail.
-
I'm pretty interested in this package. I've had an asterisk server running for … years? behind a pfsense box; it works great.
I'm a little leary of having to learn freeSwitch; I've got all my steps and knowledge down for installing ubuntu server and then asterisk / FreePBX on top of it.
But reducing the number of manchines running in my house by one is very appealing. My config is pretty simlpe too; so I don't forsee any problems migrating. I do have a couple 'if this line rings; call my cell / voip phone / house phone until one of them picks up' - I'd hate to lose that sort of functionality.
And with FreePBX just putting freeSwitch on their coming soon page; this could all get very interesting fast.
Just wanted to state my interest as well; I look forward to trying this out soon.
-
Installed the freeswitch package, upgraded to Rc3, saw these errors at the bottom of the page during the reinstall after upgrade:
Warning: fsockopen(): unable to connect to 76.11.76.41:8021 in /usr/local/pkg/freeswitch.inc on line 92 Warning: socket_set_blocking(): supplied argument is not a valid stream resource in /usr/local/pkg/freeswitch.inc on line 93 Warning: fsockopen(): unable to connect to 192.168.1.1:8021 in /usr/local/pkg/freeswitch.inc on line 92 Warning: socket_set_blocking(): supplied argument is not a valid stream resource in /usr/local/pkg/freeswitch.inc on line 93 no handle
I'm guessing this is just because there is no rule for the event socket. Solution is to surpress these warnings? Or warn that ports should be opened? Or option 3, I missed the mark completely.
-
Installed the freeswitch package, upgraded to Rc3, saw these errors at the bottom of the page during the reinstall after upgrade:
I'm guessing this is just because there is no rule for the event socket. Solution is to surpress these warnings? Or warn that ports should be opened? Or option 3, I missed the mark completely.
A rule is not necessary for the even socket unless there are strict rules for outbound access. Supressing the warning would hide the problem but not fix it.
The problem is that it tries to connect to the socket for only 1 second before giving up. In some cases 1 second isn't long enough. FreeSWITCH package 0.4.7 will now try for 3 seconds hopefully this will be sufficient. Also removed some necessary files from the default config.
-
adrianhensler, Freeswitch can do everything you're talking about with the bridge application in the dialplan…check it out! :)
http://wiki.freeswitch.org/wiki/Misc._Dialplan_Tools_bridgecall -
Okay, in for a penny in for a pound. I just disabled the asterisk and figured I'd go nuts.
The package works great and I got it set up and calling working between two phones (a local grandstream 2020 and a remote linksys voip router; also a remote pap2)
Having some issues that I'm sure someone can assist with - I've been dealing with voip for a long time but not ever with freeswitch.
1. Outgoing calling to a pots (cell phone in this case) results in crazy static as soon as the cell starts ringing - the phone line is all static; I don't hear a ring just noise. It continues after I answer the cell phone. I'm thinking codec mismatch but it's confusing to me - I thought the call would just fail in that case?
2. Trickier problem due to me not understanding where to fix this in freeswitch. I don't have a proper static IP. It's pretty close to static - but it's not static. I had a workaround in asterisk that seemed to work pretty well - a SynDNS dns name and the externip / externhost commands.
In freeswitch, how do I make this work correctly: if I edit the vars to force my domain to be a name; ie myDynDNSname.org instead of the default $${local_ip_v4} this happens (as seen in the logs):
I call in, I hear "goodbye" and my transfer to phone doesn't work because it is looking for 2000@123.123.123.123 which doesn't exist because the line is registered as 2000@myDynDNSname.org
If I leave it as the default; then the incoming call works to get to voicemail - but then my phone doesn't ring because it says it's not registered - it's registered as 2000@myDynDNSname.org and not as 2000@123.123.123.123.
If I change the external devices to register by IP rather than DynDNS name I think everything will work; but when my IP changes I'll haev to update all the devices so I think that the DynDNS name is the way to go.
Someone please show me the error of my ways. I'm so close.
The other interesting bit to this is that while outgoing calling connects but results in noise (problem #1 above) the incoming calling on the same gateway has audio but just doesn't connect correctly due to dns versus ip configurations.
Thanks for listening.
-
To fix your ip<->dns issue, set the phone to register as user 2000, and the ip of the phone server or proxy server (in the phone settings) to your dns name. Then set <x-pre-process cmd="set" data="domain=domaingoeshere.com">in the vars.xml.
I'm using DynDNS with this configuration, and it's working perfectly.
I've got no idea about issue 1 though…sorry! Out of curiousity, who's your provider?</x-pre-process>
-
To fix your ip<->dns issue, set the phone to register as user 2000, and the ip of the phone server or proxy server (in the phone settings) to your dns name. Then set <x-pre-process cmd="set" data="domain=domaingoeshere.com">in the vars.xml.
I'm using DynDNS with this configuration, and it's working perfectly.</x-pre-process>
Perfect answer! adrianhensler: make sure all your phones register with the domain. You can mix domains and IPs only if you enable 'force-register-domain' from the 'Internal' tab. That will make all registration attempts assume the 'force-register-domain' domain name. FreeSWITCH is designed to run as a VOIP SWITCH and therefore is designed for hosting more the one domain for multi-tenant uses.
The static problem you mentioned…
I suspect the problem that is occurring is specific to the provider you are using. I have setup several providers with FreeSWITCH and have not had the problem you described. What provider are you using?
On the Linksys phone you will get better audio quality if you go to the 'SIP' tab under admin advanced in the Linksys GUI and set the 'RTP Packet Size' to '0.020'.
-
Release FreeSWITCH pfSense package 0.4.9 today. Upgrading to this version is highly recommended. Make sure to do a backup from the 'Status' tab before removing and then reinstalling the package.
Over the past few days I have been working on a voicemail to email feature. You can configure this feature under the 'Settings' tab for the general settings to the email server. It is designed to define an email sever that delivers the email. It supports SMTP authentication, as well as TLS, and SSL encryption. Email addresses can be set from the 'Extensions' tab under the individual extensions. From the extensions you can also control whether the voicemail audio will be attached to the email. No attachment is useful if your email is being sent to a mobile phone as a text message.
From the 'Settings' tab 'SMTP Host' an additional backup SMTP host can be provided by seperating the hosts with a ';' semi-colon. An alternate SMTP port can be provided by using a colon and then the port after the host name. Example: mail.example.com:2525
The email is sent using PHP Mailer. http://phpmailer.codeworxtech.com/index.php?pg=tip_srvrs
-
My three registered devices use dns names. My two registered gateway (both with link2voip) use domain names.
The audio issue I'll deal with later, I'm more confused by the inability to get calls coming in through 'public' to get in.
They fail because they are still trying ext@ip.ip.ip.ip instead of ext@domainname.com
switch_core_session_execute_application() sofia/external/9024683007@111.111.111.111 Expanded String bridge(user/2000@222.222.222.222) 2008-12-17 14:12:21 [WARNING] mod_dptools.c:2025 user_outgoing_channel() Can't find user [2000@222.222.222.222] 2008-12-17 14:12:21 [ERR] switch_ivr_originate.c:1071 switch_ivr_originate() Cannot create outgoing channel of type [user] cause: [SUBSCRIBER_ABSENT] 2008-12-17 14:12:21 [DEBUG] switch_ivr_originate.c:1625 switch_ivr_originate() Originate Resulted in Error Cause: 20 [SUBSCRIBER_ABSENT] 2008-12-17 14:12:21 [INFO] mod_dptools.c:1869 audio_bridge_function() Originate Failed. Cause: SUBSCRIBER_ABSENT 2008-12-17 14:12:21 [DEBUG] mod_dptools.c:1890 audio_bridge_function() Continue on fail [true]: Cause: SUBSCRIBER_ABSENT
Why is it using the IP here and failing instead of my dns name?
The above is an incoming call through 'public'
condition destination_number adrianhensler action transfer 2000 XML default
(edit) Can't wait to try the voicemail to email!
-
Can you try changing this line in your public.xml file?
<extension name="set_domain" continue="true"><condition field="${domain_name}" expression="^$"><condition field="source" expression="mod_sofia"><condition field="${sip_req_params}" expression="domain_name=([A-Z-a-z0-9.]+)"><action application="export" data="domain_name=$1"><anti-action application="export" data="domain_name=${sip_req_host}"></anti-action></action></condition></condition></condition></extension>
Change the 3rd to last line to this:
<anti-action application="export" data="domain_name=YOUR_DOMAIN_NAME">Replace YOUR_DOMAIN_NAME with what your external dns name should be.It's a hack but it works for me.
Why is it using the IP here and failing instead of my dns name?
The above is an incoming call through 'public'
condition destination_number adrianhensler action transfer 2000 XML default
(edit) Can't wait to try the voicemail to email!</anti-action>
-
Nice, that worked.
Questions about the fix though:
I am confused – it worked even though I made a typo in my domain name? Then I typed just junk characters instead of my domain name and it still worked? I can even leave it blank and it works.
I've changed it to my domain name just to verify it does indeed work with that. Won't have a chance to test the remote devices until later.
switch_core_session_signal_state_change() Send signal sofia/internal/sip:2000@192.168.1.82:5060;transport=udp [BREAK]
It now contacts 2000@192.168.1.82 (the internal IP of my Grandstream SIP phone). Hm. I'll have to look at this more later, I'm confused.
-
adrianhensler: did you click on 'reload xml' on the status tab after each test?
You might also try 'force-register-domain' under the internal tab. This will force SIP to use this domain whether it is over the IP or the domain.
-
Example Settings for using the new Voicemail to Email feature with GMail TLS to send voicemail to any email address.
FreeSWITCH Settings tab:
SMTP Host: smtp.gmail.com:465
SMTP Secure: tls
SMTP Auth: true
SMTP Username: Use your gmail email address here.
SMTP Password: Use your gmail email password here.
SMTP From: Use your gmail email address here. It may support any valid email address but this has not been tested.
SMTP From Name: Can be anything you choose. For my example I used: voicemail.FreeSWITCH Extensions tab:
Select a specific extension.
Voicemail Mail To: Use any email address here.
Voicemail Attach File: true or false -
Some quick notes:
I meant to mention earlier - for the benefit of anyone reading this thread that the RTP packet size tip earlier in this thread is a great improvement. I had been aware of this - but it's a big difference in quality if this change is implemented.
Re: reload xml - I was pretty careful to do that every time. I was doing other stuff at the same time so may have inadvertently missed once but the results are as above - it works no matter what I put in:
<anti-action application="export" data="domain_name=${sip_req_host}"></anti-action>
Blank works( data="domain_name=" ) or ( data="domain_name=mydomainname.com" ) also works.
Does the line a few lines under that one:
<condition field="destination_number" expression="^(10[01][0-9])$" <="" pre="">… have to be edited as well to match my extensions? I've changed them to be in the 20xx range and edited the "local_extensions" as documented under the extensions tab. And finally, regarding the force-register-domain... Didn't seem to work. I uncommented it and left it as it was - I'm assuming that was the correct thing to do. Editing the public.xml does seem to do the trick though. I'm using 1.2.1-rc4 - are others running the 2.0 beta? Maybe it's not picking up my domain correctly? Again - editing public.xml seems to work so that's fine - maybe I'll figure out why my configuration is different while I look at other parts.' Thanks everyone the help, even though my asterisk configuration was doing everything I needed, it's nice to try something different. Now to try to fix that no-ring only static on outbound calls. I'll try another provider first and see what results I have with that; then I'll look at trying to fix the one I am currently using.</condition>
-
Just tested with les.net for outgoing and the call was fine.
Didn't hear the ringing of the pstn line from the sip-freeSwitch side - haven't looked into that yet. When the call was answered everything was fine; the caller could hear me very clearly but I could not hear the caller very clearly. Haven't tried anything at all to figure out why - suffice it to say that I've used these two providers for a year or more and the quality has been quite reasonable; and my cable modem is typically 15000 / 1200 for speeds.
Great work mcrane; it's not child's play to set it up but it's pretty close.
Now I have to set up my basic IVR and get some 'fake' extensions forwarding to remote lines.
Sorry - I really hijacked this thread. Didn't mean to - seemed the right place to ask questions but maybe I should have started a new thread. Keeps this one at the top anyways!
-
This thread can take it. A bug was found on the IVR today by 'tusc' I will get that fixed soon.
Mark