FreeSWITCH package for pfSense 1.2.1 and 2.0 released. PBX or Proxy
-
It's locked because of spammers…email the coreteam for an account, or have someone who has an account make the change.
-
This may be a dumb question but I have an existing Asterisk box behind the firewall with all the required port forwarding and static NAT mapping. To use Freeswitch do I need to turn all of these off?
Thanks,
Mike
-
You will almost certainly need to either turn them off or use non-standard ports and NAT with Freeswitch.
-
Your choice is to run it on a different Internet IP address, or have fun trying to switch things to non standard ports on one of the other systems.
New IRC channel #pfsense-freeswitch
-
You could possibly make a sip trunk from freeswitch to the LAN pbx depending on what your needs are; if you are looking to run both at the same time.
I just shut my asterisk box off in my case; but my needs were pretty simple. That's not to say that the freeswitch package won't suit your needs; it's just taking me a bit of time to get where I want it to be - but it's working great so far.
-
If I am troubleshooting outbound calling; how can I tell what gateway is in use when I make the call?
The log doesn't seem to show that information, I just see that it is using " New Channel sofia/external/19024466245 [8be3f58d-d7de-dd11-998b-00508df13a9d]" for example.
I had a heck of a time getting dialing to go out over one of my gateways - I was testing by calling my cell phone - but it kept using the wrong gateway every time no matter how I dialed. Eventually I tried another number and it worked correctly. I'm still not sure what is going on there. I'm thinking I need to set up a freeswitch server outside of pfsense just so I can understand the flow better….
-
If I am troubleshooting outbound calling; how can I tell what gateway is in use when I make the call?
On the 'Status' tab during a phone call you can see call information in the 'show channels' scroll through the info and you will see the gateway that is being used.
I had a heck of a time getting dialing to go out over one of my gateways - I was testing by calling my cell phone - but it kept using the wrong gateway every time no matter how I dialed. Eventually I tried another number and it worked correctly. I'm still not sure what is going on there.
Directing outbound calls to the appropriate gateway can be quite easy. I will add additional information on this topic here and on the wiki to help you and other understand how calls are directed to Gateways.
The 'Dialplan' is used to direct calls out the Gateways (aka SIP trunks, Providers.) You can make the required entries to directly to the dialplan from the 'Dialplan' tab. However there is an easier way using the 'Dialplan Expression' tool that is available on the 'Gateways' tab. It can make the dialplan entries for you. After using the 'Dialplan Expression' tool you can see what it added to the dialplan by viewing them from the 'Dialplan' tab. If you plan on calling with 7 digit dialing you need to provide the 'Default Area Code' on the 'Settings' tab. FreeSWITCH determines the outbound route based on conditions. The conditions are written with 'regular expressions'. FreeSWITCH uses regular expressions throughout its config. The 'Dialplan Expression' tool is a text area box where the regular expressions are placed one per line. To simplify this there is a select box which allows you to choose what type of outbound calls are routed to this gateway. There are several choices my favorites are 7, 10, and 11 digit dialing. For those that prefer dialing a 9 first there are choices for dialing a 9 with 7, 10, or 11 digits. I will be adding additional choices in the very near future such as dialing 8, and international.
In most cases the provider expects calls to be sent to them with 11 digits. If your provider is one of the exceptions then you will need to edit the dialplan entries that were made by the 'Dialplan Expression' tool so that it sends 10 digits rather than the default 11.
I'm thinking I need to set up a freeswitch server outside of pfsense just so I can understand the flow better….
The pfSense FreeSWITCH package has been designed to closely follow the FreeSWITCH config. The names of most things came from the xml config that FreeSWITCH uses. The paths are given in most cases. In short the design plan of the pfSense FreeSWITCH package has been to follow the default config so that knowledge gained from the pfSense FreeSWITCH interface or from the FreeSWITCH xml config can be interchangeable and mutually beneficial.
-
Thanks as always mcrane.
My issue was that I had created the two gateways but was having difficulty getting calls to go over the one I wanted. I had one set for 11 digit dialing and one set for 7 digit dialing; but every time I tried to call it would go over the 11 digit dialing one even if I had only entered 7 digits. I think my problem was that it was adding the area code automatically and then going over the gateway I had set as a default?
In any case, I just gave up on my configs after a bit and erased them and started over and everything seems to be working as expected - most of my problems exist between keyboard and chair. I realize now that the configs match very closely, I didn't realize they were that close when I wrote the email last night. Very nicely done.
I wanted some way to be able to look at the logs and see what had happened rather than just looking at the 'live' channels - is there no way to do that? There must be a way to view that information?
-
My issue was that I had created the two gateways but was having difficulty getting calls to go over the one I wanted. I had one set for 11 digit dialing and one set for 7 digit dialing; but every time I tried to call it would go over the 11 digit dialing one even if I had only entered 7 digits. I think my problem was that it was adding the area code automatically and then going over the gateway I had set as a default?
Sound like 'Dialplan Expression' tool was used and created a dialplan entry for 7 digits for both Gateways. If you have multiple gateways it is a good idea to see what you have already defined in the 'Dialplan' tab. If there are duplicates 7, 10, or 11 digit dialing it will choose the one that is assigned the lowest order. If there are ever duplicates there in the tab then I suggest removing them or editing them. You can add additional conditions such as an extension which would direct calls based on extension and on how many digits. If you have multiple gateways another approach is to make one gateway for 7 10 and 11 digit dialing and the other one requiring dialing a prefix number such as 8 or 9 and then the number.
I wanted some way to be able to look at the logs and see what had happened rather than just looking at the 'live' channels - is there no way to do that? There must be a way to view that information?
You can enabled SSH under PFSense -> Advanced and run FreeSWITCH from the console. If you are at the pfSense menu on the console or from SSH then choose option 8.
cd /usr/local/freeswitch/bin
./freeswitch -stop
./freesiwth startpressing F8 enables debug or F7 disables debug.
Or if you you can connect to it remotely from the LAN using the new fs_cli tool that the FreeSWITCH team has developed. I have attached the windows version to this post. You just need to remove the .txt extension from the file.
Run it from the command prompt with:
fs_cli.exe -H 192.168.1.1 -P 8021 -p ClueCon
Replace 192.168.1.1 with the LAN IP of your FreeSWITCH install. The port 8021 and the password: ClueCon are set from the 'Settings' tab.
-
Thanks mcrane. I think I have the outbound straightened out. I did have two gateways and both as 7 digit and I wanted that so that the second one would work if the first one failed.
I think it kept dialing my test number (my cell phone) using the wrong gateway because I have an extension set up for it? Not sure; I'll look at this a bit more.
Quick question about mod_dingaling for gtalk integration.
I get this error in the logs when I try to sing in:
"2009-01-10 22:31:17 [DEBUG] libdingaling.c:1175 on_stream() TLS NOT SUPPORTED IN THIS BUILD!"
My understanding is that gtalk requires tls? Is this correct or am I missing something. I enabled the module and stopped FS.
Edited client.xml to be this:
<profile type="client"><param name="name" value="gmail.com"> <param name="login" value="adrianhensler@myemail.ca/gtalk"> <param name="password" value="bigfatsecret"> <param name="server" value="talk.google.com"> <param name="dialplan" value="XML"> <param name="message" value="FreeSwitch (The Future of Telephony)"> <param name="rtp-ip" value="auto"> <param name="ext-rtp-ip" value="stun:stunserver.org"> <param name="auto-login" value="true"> <param name="auto-reply" value="Press *Call* to join my conference"> <param name="sasl" value="plain"> <param name="tls" value="true"> <param name="exten" value="2000"></profile>
But then I got the error as above.
-
"2009-01-10 22:31:17 [DEBUG] libdingaling.c:1175 on_stream() TLS NOT SUPPORTED IN THIS BUILD!"
I will work on enabling this on the next FreeSWITCH compile.
-
mcrane- First thing, You Rock! As do all the PFSense authors and support staff! Thanks to all of you!
Now to anyone else that knows… I thought I was able to dial from extension to extension when I first installed this package. I believe the reason I cant now is that both extensions exist on the same ATA as ports one and two. Its a Zoom in case it matters. I need to verify when I get a free moment but any comments...
I need to reread the thread here again in case its covered and I missed it but- my IVR message answers when I have the inbound pointed that way however when I press a number it hangs up. Im lost on this at this point.
Otherwise its working great! :) ;D
-
IVR seems to be working now… ;D :)
-
mcrane- First thing, You Rock! As do all the PFSense authors and support staff! Thanks to all of you!
Now to anyone else that knows… I thought I was able to dial from extension to extension when I first installed this package. I believe the reason I cant now is that both extensions exist on the same ATA as ports one and two. Its a Zoom in case it matters. I need to verify when I get a free moment but any comments...
pfSense ftw for sure.
I'll take a stab at your question - I think you'll have to use different ports for the extensions as they will be on the same IP? Does that help? Or is that what you meant by 'ports one and two' now that I reread your message. Never heard of Zoom so I won't be any help there. Maybe I'll set up my linksys pap2 later tonight and see if I can get both channels on that to work.
-
Thanks: I think thats my problem. It appears the adapter may not be specifying the ports to the pbx correctly.
http://zoom.com/ These guys have been around for years. I used to have a 33k modem made by them. (Now Im not sure I actually have a modem in my house anywhere, but thats for another post…)
Im setting up another ata right now as I post this to seperate them out for more controlled conditions...
:) ;D
-
For those with a linksys pap2 each phone port has a different port by default example line 1 5060 and line 2 5061. I don't have a zoom yet but I believe it would be the same.
What model of zoom are you using? I've been looking at one zoom that has both 1 fxs and 1 fxo. The feature that really caught my eye was ilbc support. Ilbc codec is comparable to G729 if not better with its audio compression.
-
I have a model 5822 that was never released fully by them. I was a beta tester for a voip company and they sent it to me. I can find only one setting for local sip port on it. I believe it will only be good for one port.
-
FreeSWITCH package minor update.
Add International option to the Dialplan Expression tool,
Minor wording changes
Hide Outbound Caller ID on the Extensions tab. Effective Caller ID is used by FreeSWITCH. -
New FreeSWITCH build 1.0.2 revision 11245. More modules have been compiled including mod_fax, mod_openzap, and mod_spidermonkey_odbc.
More info can be found on mod_fax at:
http://wiki.freeswitch.org/wiki/Mod_faxIn order to use fs_cli you would connect with ssh, then run the following commands. Replace the 192.168.1.1 with your own pfSense LAN IP address. The port and the password are settings that can be configured from the 'Settings' tab.
cd /usr/local/freeswitch/bin
./fs_cli -H 192.168.1.1 -P 8021 -p ClueConThe following is a list of modules that are available. # is a comment any module with this in front of it was not compiled.
loggers/mod_console
loggers/mod_logfile
loggers/mod_syslog
applications/mod_commands
applications/mod_conference
applications/mod_dptools
applications/mod_enum
applications/mod_fifo
#applications/mod_fax (trying to build this time: failed)
applications/mod_voicemail
#applications/mod_lcr
applications/mod_limit
applications/mod_expr
applications/mod_esf
#applications/mod_easyroute
applications/mod_fsv
applications/mod_soundtouch
applications/mod_rss
applications/mod_snom
applications/mod_vmd
asr_tts/mod_flite
asr_tts/mod_pocketsphinx
#asr_tts/mod_cepstral
codecs/mod_g723_1
codecs/mod_amr
codecs/mod_g729
codecs/mod_h26x
codecs/mod_voipcodecs
codecs/mod_ilbc
codecs/mod_speex
codecs/mod_siren
codecs/mod_celt
dialplans/mod_dialplan_directory
dialplans/mod_dialplan_xml
dialplans/mod_dialplan_asterisk
directories/mod_ldap
endpoints/mod_dingaling
endpoints/mod_iax
#endpoints/mod_portaudio
endpoints/mod_sofia
endpoints/mod_loopback
#endpoints/mod_alsa
#endpoints/mod_opal
../../libs/openzap/mod_openzap
event_handlers/mod_event_multicast
event_handlers/mod_event_socket
event_handlers/mod_cdr_csv
#event_handlers/mod_radius_cdr
formats/mod_native_file
formats/mod_sndfile
formats/mod_shout
formats/mod_local_stream
formats/mod_tone_stream
#languages/mod_python
languages/mod_spidermonkey
languages/mod_spidermonkey_teletone
languages/mod_spidermonkey_core_db
languages/mod_spidermonkey_socket
languages/mod_spidermonkey_odbc
languages/mod_lua
#languages/mod_perl
#languages/mod_yaml
xml_int/mod_xml_rpc
xml_int/mod_xml_curl
xml_int/mod_xml_cdr
#xml_int/mod_xml_ldap
say/mod_say_en
say/mod_say_de
say/mod_say_es
say/mod_say_fr
say/mod_say_it
say/mod_say_nl
say/mod_say_zh -
mcrane: You are putting features in faster than I can play with them.
What's the status on the mod_openzap - if I put a digium card or clone in my machine, will my chances of making it work be reasonable? I have an ebay X100 type clone.
I took a look at the freeswitch wiki and it looks promising, is everything in place in the pfsense package to make this work? Or do I have to manually get the zaptel OS level modules in pfsense? Sorry, seems like a newbie question - but to get a zaptel card in my pfsense box I have to remove the wireless or move pfsense to a different box due to having only the one PCI slot.
I'd rather not go through those steps if it's not something that will work anyways - and I'm tempted to just use all voip anyways and drop the analog line. Still up for debate. Can't wait to look at the fax module.