FreeSWITCH package for pfSense 1.2.1 and 2.0 released. PBX or Proxy
-
@mcrane:
New version FreeSWITCH 0.9.2.4 uses a new FreeSWITCH revision 13784.
1. Testing up to this time seems to indicate that latency problem may be resolved will be doing more testing tomorrow to confirm.
2. Repaired mod_fax that was broken in 0.9.2.3
3. Added a caller id name prefix to IVR (auto attendant) and the Hunt Groups. This make is possible to indicate where the call came from.I'm getting an immediate segfault attempting to recieve a fax in freeswitch with 0.9.2.4 running 1.2.3-RC2. It appears to be a library version issue with spandsp/mod_fax
Some troubleshooting follows:
/usr/local/bin/gdb66 –args /usr/local/freeswitch/bin/freeswitch -c -waste
GNU gdb 6.6 [GDB v6.6 for FreeBSD]
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i386-portbld-freebsd7.2"…
(gdb) run-----Freeswitch startup snipped----
2009-06-17 21:04:57.483533 [NOTICE] switch_channel.c:602 New Channel sofia/internal/1010@sip.od.donnellyclan.org [4548650a-a45b-de11-9aef-0017319ad0c8]
2009-06-17 21:04:57.498540 [INFO] mod_dialplan_xml.c:252 Processing Patrick H Donnelly->7100 in context default
2009-06-17 21:04:57.504619 [INFO] switch_core_session.c:1391 Sending early media
2009-06-17 21:04:57.514531 [INFO] mod_sofia.c:1493 Ring SDP:
v=0
o=FreeSWITCH 1245254783 1245254784 IN IP4 98.109.123.106
s=FreeSWITCH
c=IN IP4 98.109.123.106
t=0 0
m=audio 32314 RTP/AVP 0 101
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -
a=ptime:20
a=sendrecv2009-06-17 21:04:57.514531 [NOTICE] mod_sofia.c:1496 Pre-Answer sofia/internal/1010@sip.od.donnellyclan.org!
2009-06-17 21:04:57.555712 [NOTICE] mod_dptools.c:649 Channel [sofia/internal/1010@sip.od.donnellyclan.org] has been answeredProgram received signal SIGSEGV, Segmentation fault.
fax_rx (s=0x29567018, amp=0x0, len=4096) at fax.c:252
252 fax.c: No such file or directory.
in fax.c
(gdb) bt
#0 fax_rx (s=0x29567018, amp=0x0, len=4096) at fax.c:252
#1 0x28d50ce9 in process_fax (session=0x28e8f018, data=0x28603f00 "/usr/local/freeswitch/storage/fax/7100/inbox/1010-2009-06-17-21-04-59.tif", app_mode=FUNCTION_RX) at mod_fax.c:644
#2 0x28d51110 in spanfax_rx_function (session=0x28e8f018, data=0x28603f00 "/usr/local/freeswitch/storage/fax/7100/inbox/1010-2009-06-17-21-04-59.tif") at mod_fax.c:776
#3 0x280d741c in switch_core_session_exec (session=0x28e8f018, application_interface=0x28f84128, arg=0x294f5070 "/usr/local/freeswitch/storage/fax/7100/inbox/${last_fax}.tif")
at src/switch_core_session.c:1475
#4 0x280d7939 in switch_core_session_execute_application (session=0x28e8f018, app=0x294f5068 "rxfax", arg=0x294f5070 "/usr/local/freeswitch/storage/fax/7100/inbox/${last_fax}.tif")
at src/switch_core_session.c:1397
#5 0x280dd9c5 in switch_core_session_run (session=0x28e8f018) at src/switch_core_state_machine.c:166
#6 0x280d9445 in switch_core_session_thread (thread=0x28f7ab40, obj=0x28e8f018) at src/switch_core_session.c:1065
#7 0x2814bac6 in dummy_worker (opaque=0x28f7ab40) at threadproc/unix/thread.c:138
#8 0x28223741 in ?? () from /lib/libthr.so.3
#9 0x28f7ab40 in ?? ()
#10 0x00000000 in ?? ()–-------------------------
From the backtrace it's apparently dieing in fax_rx of fax.c in the spandsp module but it really shouldn't be. Line 252 is marked w/ an * here:
SPAN_DECLARE(int) fax_rx(fax_state_t *s, int16_t *amp, int len) { int i; #if defined(LOG_FAX_AUDIO) if (s->modems.audio_rx_log >= 0) write(s->modems.audio_rx_log, amp, len*sizeof(int16_t)); #endif for (i = 0; i < len; i++) amp[i] = dc_restore(&s->modems.dc_restore, amp[i]); * s->modems.rx_handler(s->modems.rx_user_data, amp, len); t30_timer_update(&s->t30, len); return 0; } From what I can tell, all the objects being referenced are valid, so we shouldn't be getting a SIGSEGV -------------- (gdb) print s $1 = (fax_state_t *) 0x29567018 (gdb) print s->modems $2 = {use_tep = 685042368, transmit_on_idle = 1, hdlc_tx = {crc_bytes = 2, underflow_handler = 0x28d6cc50 <hdlc_underflow_handler>, user_data = 0x29567018, inter_frame_flags = 2, progressive = 0, -----SNIP large amount of variables----- (gdb) print s->modems.rx_user_data $3 = (void *) 0x29578138 (gdb) print s->modems.rx_handler $4 = (span_rx_handler_t *) 0x28d6d920 <fsk_rx> ------- However, Here's where it gets somewhat interesting: s->modems.rx_handler is a function pointer for the current modem state; in this case, the function it's pointing to, fsk_rx, is defined thus: SPAN_DECLARE_NONSTD(int) fsk_rx(fsk_rx_state_t *s, const int16_t *amp, int len) Note that rx_user_data above is a void pointer, being implicitly cast to fsk_rx_state_t, casting it ourselves in GDB yields: -------- print (fsk_rx_state_t)s->modems.rx_user_data $5 = {baud_rate = 693641528, sync_mode = 685224400, put_bit = 0x29583cb0, put_bit_user_data = 0x0, status_handler = 0, status_user_data = 0x0, carrier_on_power = 300, carrier_off_power = 1, power = {shift = 0, reading = 0}, last_sample = 0, signal_present = 0, phase_rate = {0, 0}, phase_acc = {0, 0}, correlation_span = 0, window = {{{re = 0, im = 0}, {re = 8000, im = 0}, {re = 0, im = 0}, {re = 685655762, im = 685200768}, {re = 0, im = 0}, {re = 0, im = 0}, {re = 0, im = 0}, {re = 0, im = 685042368}, {re = 0, im = 693100568}, {re = 693081792, im = 692880944}, {re = 693650976, im = 672421184}, { re = 672422848, im = 693100568}, {re = 693081856, im = 693650984}, {re = 693651000, im = 672421184}, {re = 672422848, im = 0}, {re = 0, im = 0} <repeats 113="" times="">}, {{re = 0, im = 0} <repeats 128="" times="">}}, dot = {{re = 0, im = 0}, {re = 0, im = 0}}, buf_ptr = 0, baud_inc = 0, baud_pll = 0, lastbit = 0, scaling_shift = 0} ----- Aside from the odd baud rate, the data appears to be superficially valid for a first run, dot products are zeroed, last sample populated with data, etc, HOWEVER, opening fsk.h from rev. 13784 of freeswitch shows fsk_rx_state_t with different fields: baud_rate, framing mode, ... The 0.5 tarball from the spandsp site shows the same old variable names: baud_rate, sync_mode, etc. So apparently there's a disconnect somewhere. As a precaution I wiped all libspandsp files on my box and re-installed the pfsense base image and freeswitch, but the problem seems to persist. Do you have a version of freeswitch/spandsp compiled with full debugging symbols I could D/L to see if I can get some more info that way?[/i][/i]</repeats></repeats></fsk_rx></hdlc_underflow_handler>
-
FreeSWITCH package has been updated to version 0.9.3.
1. New version fixes problems with mod_fax
2. Strips invalid common characters from caller id number on the extensions.
3. New Extension option keep the local voicemail file after sending the email.
4. Add ring back option to hunt groups so it is possible to choose between music on hold or ring tone. -
Hey guys, first off I really appreciate all the work that has went into this and I like freeswitch a lot… but unfortunately it's looking like I am going to be forced to give up on freeswitch. In a nutshell, our business and clients have had enough with all the surprises that are cropping up with the pbx... so basically, I'm coming here seeking some general advice.
I running the 0.9.3 freeswitch package on pfsense.
Over the past couple months our small company decided to give freeswitch a try because we were already using pfsense and also we had experienced some asterisk NAT issues in the past that we wanted to completely eliminate. So the freeswitch pfsense package sounded like a great idea.... however now at this point it's looking like I will be unable to use freeswitch. I am just having problem after problem after problem for the past month and a half... seems like something new crops up everyday now.
So well, anyway, my point is that I just wanted to check with the users here to see if my situation sounds common or if possibly maybe this is just meant for test usage or a sandbox and not really for a business.
Don't get me wrong I fully appreciate the work and time that has been put into this and love the product and a sincere thanks to all involved... but I'm just trying to get a grip on reality here and see what others think about my situation.
-
My experience has been that when I have an issue it's usually because I've misconfigured something. Occasionally I can also blame the pfsense-freeswitch GUI for being vague or incomplete. I have yet to encounter a single issue stemming from the freeswitch engine itself.
That said, I have nothing but praise for mcrane and the team that supports him. Yeah, the GUI is incomplete and imperfect, but consider that A, it's the best if not only freeswitch GUI in existence, B, it's developing rapidly with a new release what, every week or so, and C, mcrane et al work hard to answer questions on the forum and in IRC.
In summary, yeah I've had issues, and yeah, I can understand if somebody feels the experience isn't smooth enough for their needs. Nevertheless, I feel strongly that freeswitch itself is production-ready, and the pfsense-freeswitch package is on course to be as well.
Sorry to hear it didn't work out for you this time.
db
-
So well, anyway, my point is that I just wanted to check with the users here to see if my situation sounds common or if possibly maybe this is just meant for test usage or a sandbox and not really for a business.
You need to explain your situation in order to get help either on the forum or on IRC. Your posting here only explains your frustration with no details.
I don't believe I have ever chatted with you on IRC unless you have a different nickname you use there.
-
New Version 0.9.3.1
FreeSWITCH package smtp auth and tls previously worked but plain smtp needed a bug fix, adjust huntgroup and ivr wording replace default with internal, fix a bug on huntgroup that prevented it from working completely when there is more than one huntgroup.https://rcs.pfsense.org/projects/pfsense-packages/repos/mainline/commits/b93e6a5e5e234af0fb4df61c989f6cc1e607707f
Also upgraded someone this evening that was on a version that was several months old. The upgrade went smoothly without a single problem. Over the past 3 work days I have gotten 3 new systems up and running. Upgrading another one right now. [Update] Just completed another upgrade and it went perfectly smooth like the one I did earlier.
If anyone is having problems feel free to ask on the forum on FreeNODE #pfsense-freeswitch channel, help is also available through pfSense official commercial support.
-
HI,
I just did a fresh install of pfSense 1.2.2 and Freeswitch (0.9.3.1) but Freeswitch won't start. If I go to the console and attempt to start it manually, I get:
Cannt lock pid file: /usr/local/freeswitch/log/freeswitch.pid
:(
-
Just a guess, is it a stale PID file? Just go delete that file and try to start freeSwitch again?
-
Just a guess, is it a stale PID file? Just go delete that file and try to start freeSwitch again?
Yeah, I tried that, but didn't help. The file get's recreated again without it ever starting. Strangely enough, it is empty, doesn't contain any PID. I also reinstalled the package and tried to reboot but also no luck. I always get that when I try to start FreeSwitch from the console.
Update: I talked to mcrane over the irc channel and he said I had to upgrade to 1.2.3 snapshot. After that, it all worked well. If someone has the same problem, probably they need to upgrade as well.
Thanks.
-
The FreeSWITCH package requires pfSense 1.2.3 RC1 or higher in other words FreeBSD 7.1 or FreeBSD 7.x.
-
FreeSWITCH Package new version 0.9.4.1
1. add ping parameter to advanced gateway options helps keep connections alive behind NAT
2. fix warning message when a gateway is disabled and later deleted
3. add sip-force-contact to advanced extension options
4. comment out the operator extension from the default dialplan
5. add ability to disable an extension without removing it
6. add effective_caller_id_name, effective_caller_id_number, outbound_caller_id_name, outbound_caller_id_number to the gateway
7. patched a bug found with suppress_cng -
Slow down man, I haven't tried 0.9.3.1 yet!
;)
-
Got a couple of questions:
I am just getting back to playing with pfsense/freeswitch after being pulled away for a couple of weeks. I upgraded the install.
When I dial my voicemail, I get "the person at extension 1001 is not available." When I dial 4000, I just get "goodbye". Same with 5000. What have I screwed up?
And - If a person wanted to completely delete all of freewitch from a firewall and reinstall from scratch, what are the file to get rid of?
Thanks again for all your hard work!
Library Mark
-
I am just getting back to playing with pfsense/freeswitch after being pulled away for a couple of weeks. I upgraded the install.
Welcome back!
When I dial my voicemail, I get "the person at extension 1001 is not available." When I dial 4000, I just get "goodbye". Same with 5000. What have I screwed up?
In the latest version all default FreeSWITCH feature codes have been moved behind the * so 4000 is now *4000, 5000 is now *5000, 9999 is now *9999 and so on. Another recent change is *4000 is the general voicemail box and *98 is the voicemail box that auto detects your extension so that it only need to ask for the password. The reason the feature codes have been moved behind the * is because this makes those number available for you and others so that they can use any 3 or 4 digit number for extensions, auto attendants(IVR), and hunt groups.
One other thing to note after doing an upgrade from an older version. The textareas in the GUI are handy because they give a lot of flexibility to you for advanced configuration. However it also creates an issue for the upgrade. That is that the installation does not update the textareas with the new default config. Why because I don't want to wipe out any of your customizations to those files. So to make it easier I created a 'Restore Default' on the bottom of each one of the textareas. So if you have no customizations simply click on those buttons to set it back to the default. You may need to do this for 'Vars' tab Public -> public.xml, 'Dialplan' tab -> default.xml, and occasionally for the Profiles tab for the internal, and the external profile. Please note this is not always necessary. It is only needed if the version of FreeSWITCH has changed and the default config has changed enough to conflict with your current settings.
And - If a person wanted to completely delete all of freewitch from a firewall and reinstall from scratch, what are the file to get rid of?
You would need to go to System -> Packages and Remove the FreeSWITCH package. This will remove the package files but not the configuration that is stored in pfsense's xml config file. To get rid of the config require manually to remove the freeswitch tags in the xml from the config.xml. Warning! you have to do this carefully or you can break pfsense and prevent it from loading.
Because of that I suggest you first backup the file to something like config.xml.bakYou can open the file with Diagnostics -> Edit File once you have loaded /cf/conf/config.xml change the path to /cf/conf/config.xml.bak and click on save. That will create a current backup. Next remove all tags that use 'freeswitch' anywhere in the tag name. Make sure to delete everything between the start and close tag.
Then to get pfsense to see the change delete the config.cache from the /tmp directory.
rm /tmp/config.cacheThanks again for all your hard work!
You're welcome.
-
Wow, mcrane - you just flat-out rock! Thanks for the info.
-
I'm not keeping up well with update changes so iced98lx has volunteered to update the pfSense FreeSWITCH wiki with the changes
http://doc.pfsense.org/index.php/FreeSWITCH#Change_Log_.2F_Revision_HistoryAlso commits to the package can be monitored here.
https://rcs.pfsense.org/users/mcraneand here
https://rcs.pfsense.org/projects/pfsense-packages
-
I just did a fresh install of pfsense 1.2.2. After which I installed freeswitch I looked at the service and it was not started. I attempted to start it which responded telling me it was started, however the icon showed stopped. I went into /usr/local/freeswitch/bin and tried to start it manually. The following is the error I get.
./freeswitch
Error: stacksize 240 is too large: run ulimit -s 240 or run ./freeswitch -waste.
auto-adjusting stack size for optimal performance….
Cannot lock pid file /usr/local/freeswitch/log/freeswitch.pid.This is likely because I'm not running 1.2.3-RC1? Is there a way to get this to run on 1.2.2? I tried 1.2.3-RC1 fresh install but it ran horribly on my system.
-
./freeswitch
Error: stacksize 240 is too large: run ulimit -s 240 or run ./freeswitch -waste.
auto-adjusting stack size for optimal performance….
Cannot lock pid file /usr/local/freeswitch/log/freeswitch.pid.This is likely because I'm not running 1.2.3-RC1?
Yes I guarantee that is the reason.
Is there a way to get this to run on 1.2.2? I tried 1.2.3-RC1 fresh install but it ran horribly on my system.
Current package requires 1.2.3 or pfsense 2.0. The reason why is that FreeSWITCH is compiled for freebsd 7.2. In order to get FreeSWITCH to work good on 1.2.x it has to be compiled for the version of freebsd that pfsense uses.
-
Thanks mcrane, I updated pfSense to 1.2.3-RC3 and it runs. However it looks like when running the fs_cli command via ssh it doesnt work. Here is the error I get.
./fs_cli
[ERROR] libs/esl/fs_cli.c:652 main() Error Connecting [Connection Error]
However in the GUI the status shows things correctly.
Any tips on this? Maybe I'm just missing a package?
-
pfsense by default blocks communication on 127.0.0.1 which is what fs_cli tries by default instead tell it to use your lan ip address.
./fs_cli -H 192.168.1.1