pfSense Gold Subscription

Author Topic: FreeSWITCH package for pfSense 1.2.1 and 2.0 released. PBX or Proxy  (Read 118121 times)

0 Members and 1 Guest are viewing this topic.

Offline tikid

  • Jr. Member
  • **
  • Posts: 88
    • View Profile
Re: FreeSWITCH package for pfSense 1.2.1 and 2.0 released. PBX or Proxy
« Reply #240 on: May 02, 2009, 09:55:40 pm »
Props to MCrane.  Donation sent.  Everybody should donate, considering how awesome the package is, and the support for it.

Offline Taras Savchuk

  • Newbie
  • *
  • Posts: 17
    • View Profile
    • www.1adm.ru
Re: FreeSWITCH package for pfSense 1.2.1 and 2.0 released. PBX or Proxy
« Reply #241 on: May 05, 2009, 09:31:20 am »
...
Added DISA (Direct Inward System Access) this version allows you to call in put in a pin code call internally or externally as desired. Disabled by default. Make sure to change the admin pin code on the 'Settings' tab before enabling it on the 'Dialplan' tab.
...

It seems there is error in disa.js or sound files are missing from package.
I have FreeSWITCH 0.8.5.3 on fresh pfSense 1.2.2 installed, but haven't /usr/local/freeswitch/sounds/custom/8000/please_enter_the_pin_number.wav and other files referenced in disa.js.

I have done DISA before on FreeSWITCH using IVR so it's very useful functionality for me. Thanks for adding DISA and other excellent work.

Offline bigboy

  • Newbie
  • *
  • Posts: 8
    • View Profile
Re: FreeSWITCH package for pfSense 1.2.1 and 2.0 released. PBX or Proxy
« Reply #242 on: May 05, 2009, 11:01:40 am »
MCrane,the OpenZap module is broken, I can not longer perform testing with Zaptel using version 0.8.5.3.

Offline mcrane

  • Sr. Member
  • ****
  • Posts: 495
    • View Profile
Re: FreeSWITCH package for pfSense 1.2.1 and 2.0 released. PBX or Proxy
« Reply #243 on: May 06, 2009, 05:47:41 am »
Released new version of the pfSense FreeSWITCH package.

1. New Build of FreeSWITCH
This includes a new build of FreeSWITCH. Is is now using FreeSWITCH 1.0.4 pre 6 revision 13238.

2. DISA audio files copied to correct location.

3. TLS support added to Gateways allows connecting multiple FreeSWITCH boxes over TLS.


Taras Savchuk: The DISA sound files were were copied to the wrong directory. I have committed a fix for that problem.

bigboy: Time is now 4:37am I have stayed up nearly all night creating a new build and testing it. Please test mod_openzap and report back the results.


Changes planned for the near future.

New 'Profiles' tab will move Internal and External to that tab and allow to manage as many SIP profiles as desired. Will be adding a SIP profile to bind to the LAN interface and maybe Optional interfaces if they exist. This making it easier for newbies and also make it possible to connect to FreeSWITCH over VPNs.

Modify IVR to allow for another digit to account for the * that was recently added to the feature codes.



Offline 0tt0

  • Full Member
  • ***
  • Posts: 257
    • View Profile
Re: FreeSWITCH package for pfSense 1.2.1 and 2.0 released. PBX or Proxy
« Reply #244 on: May 06, 2009, 11:05:00 am »
404 means the file is missing. Which is strange I'm using 8.5.1 and 'Features' tab is there on all of my test installs.
Diagnostics -> Command -> PHP Execute
Then run the following and it will download the features and move it to the proper location.

exec("cd /tmp/;fetch http://www.pfsense.com/packages/config/freeswitch/freeswitch_features.tmp");
exec("cp /tmp/freeswitch_features.tmp /usr/local/www/packages/freeswitch/freeswitch_features.php");
unlink_if_exists("/tmp/freeswitch_features.tmp");

Not being able to stop the service not sure what is causing it but I would ssh to your pfSense box and then run /usr/local/freeswitch/bin/./fs_cli -H 192.168.0.1 replace the 192.168 the ip of your LAN. If you are able to connect to it then you can stop it from inside the console.

Ok then, I'll give this another shot, but my patience is running out, still trying to recover from my problems here, and there's more to come it seems..

I tried to shutdown FreeSWITCH a few days ago and afterwards I then noted that swap increased drastically on 1st page and there was a large amount of FreeSWITCH related stuff in system log. I didn't take more detailed notice of the contents. I then noted, earlier today, that I now have almost all tabs in FreeSWITCH GUI yielding 404:s.

I then removed FreeSWITCH from package manager.

rebooted

Checked imspector status: RED
Can't start it, again.

reboot again

still cant start imspector

So, imspector won't start due to libiconv.so.3 missing and pkg_info | grep libiconv yields response: "libiconv-1.11_1".

========
Adding:
And trying: "pkg_add -r libiconv" yields error about URLs being incorrect for both http and ftp for the FreeBSD 7.0 version.. files not available it says.
========

Some questions then:

. Why is packages obviously ripping shared files or configs pointers being used by others? This is not the first time I've seen this.
. Is FreeSWITCH to blame here somehow? Am I sitting with a mix of older version configs of FreeSWITCH causing this?
. How do I make sure absolutely everything related to FreeSWITH is removed from the system? One would think it should be possible to remove enough so that a perfectly clean re-install of this (or any other package) is possible?

Initially I wanted FreeSWITCH for my VoIP needs but since I actually never have gotten it to work ok I have for now moved to another solution. In addition to these more "real" errors messing up my install I have actually also had strangely difficult time to get config running ok (this was like before the real problems started). I'm not new to PBXes though, I've run 3 or 4 different ones earlier, both on Win32 and Linux and I actually installed Asterisk yesterday and that install is running perfectly. Therefore it's quite frustrating that I never got FreeSWITCH running ok.

Also I think I may have misunderstood some of the config, and turning to guides online can be a bit confusing since they often tend to target installations without any GUI components, only directly editing config files. Are such guides relevant 100% to pfSense version of FreeSWITCH?

When installing FreeSWITCH in pfSense, the config options of editing XML directly and using the nice GUI to manually adding/editing stuff - which is the case on several tabs - is either of them optional or not etc, this is not apparent from GUI and I guess some errors are present in some installations if XML is not edited at all?

I don't get the feeling that it's clear whether or not editing the GUI is just another way of editing the XML or not.

After having spoken with a friend I realized that the above type of questions are not all to uncommon.
I would still use FreeSWITCH instead - if not for other reasons so that I can retire a PC - if I can get it to run normally; can you perhaps give me some short comments to the last questions just above here?

TIA,

« Last Edit: May 06, 2009, 11:19:38 am by 0tt0 »

Offline mcrane

  • Sr. Member
  • ****
  • Posts: 495
    • View Profile
Re: FreeSWITCH package for pfSense 1.2.1 and 2.0 released. PBX or Proxy
« Reply #245 on: May 06, 2009, 01:02:02 pm »
I tried to shutdown FreeSWITCH a few days ago and afterwards I then noted that swap increased drastically on 1st page and there was a large amount of FreeSWITCH related stuff in system log. I didn't take more detailed notice of the contents. I then noted, earlier today, that I now have almost all tabs in FreeSWITCH GUI yielding 404:s.

I then removed FreeSWITCH from package manager.

rebooted

Checked imspector status: RED
Can't start it, again.

reboot again

still cant start imspector

So, imspector won't start due to libiconv.so.3 missing and pkg_info | grep libiconv yields response: "libiconv-1.11_1".

Your symptoms of loosing files could be explained by failing data storage (Hard Drive, or Compact Flash.)

========
Adding:
And trying: "pkg_add -r libiconv" yields error about URLs being incorrect for both http and ftp for the FreeBSD 7.0 version.. files not available it says.
========

If you are using 1.2.1, 1.2.2 they are FreeBSD 7.0. I suggest that you use pfSense 1.2.3 RC1 because it is running FreeBSD 7.1 and has security patches as well as additional fixes that you will benefit from.

. Why is packages obviously ripping shared files or configs pointers being used by others? This is not the first time I've seen this.

The package does add files to /usr/local/lib but does not remove them on when the package is removed because I don't know if some other package is dependent on them.

Is FreeSWITCH to blame here somehow?

I don't think so.

Am I sitting with a mix of older version configs of FreeSWITCH causing this?

I mix of older configs being stored in the pfsense config can make it harder to get working.
The configs that could cause problems is the pages that use textareas.

How do I make sure absolutely everything related to FreeSWITH is removed from the system? One would think it should be possible to remove enough so that a perfectly clean re-install of this (or any other package) is possible?

The correct process to upgrade is:
1. Backup the package from the status page
2. Remove the package. The settings for packages persist in the config.xml.
3. Then install the package again.

When the package is removed it does the following.

   exec("killall -9 freeswitch");
   unlink_if_exists("/usr/local/pkg/freeswitch.xml");
   unlink_if_exists("/usr/local/pkg/freeswitch.inc");
   unlink_if_exists("/usr/local/pkg/freeswitch_dialplan.xml");
   unlink_if_exists("/usr/local/pkg/freeswitch_extensions.xml");
   unlink_if_exists("/usr/local/pkg/freeswitch_external.xml");
   unlink_if_exists("/usr/local/pkg/freeswitch_internal.xml");
   unlink_if_exists("/usr/local/pkg/freeswitch_modules.xml");   
   unlink_if_exists("/usr/local/pkg/freeswitch_public.xml");
   unlink_if_exists("/usr/local/pkg/freeswitch_vars.xml");   
   
   exec("rm -R /usr/local/freeswitch/");
   exec("rm -R /usr/local/www/freeswitch/");
   exec("rm -R /usr/local/www/packages/freeswitch/");
   unlink_if_exists("/usr/local/etc/rc.d/freeswitch.sh");
   unlink_if_exists("/tmp/freeswitch.tar.gz");
   unlink_if_exists("/tmp/pkg_mgr_FreeSWITCH.log");

Also I think I may have misunderstood some of the config, and turning to guides online can be a bit confusing since they often tend to target installations without any GUI components, only directly editing config files. Are such guides relevant 100% to pfSense version of FreeSWITCH?

This documentation is related to the pfSense FreeSWITCH package interface.
http://doc.pfsense.org/index.php/FreeSWITCH#IP_address_or_Domain

Standard FreeSWITCH documentation that is related to the config.
http://wiki.freeswitch.org/wiki/Main_Page

One thing to note about the pfSense FreeSWITCH interface is that the names used are the same names in the config. The GUI gives you paths to the config files that are being edited. The goal of this interface is to make it easier to setup FreeSWITCH and at the same time educate the user. Making it possible for the knowledge gained from the config or the interface would be as interchangeable as possible.

When installing FreeSWITCH in pfSense, the config options of editing XML directly and using the nice GUI to manually adding/editing stuff - which is the case on several tabs - is either of them optional or not etc, this is not apparent from GUI and I guess some errors are present in some installations if XML is not edited at all?

You can install the package and not use the GUI if desired. Or you can use the GUI and still modify xml files that the GUI does not use.

I don't get the feeling that it's clear whether or not editing the GUI is just another way of editing the XML or not.

GUI reads the pfSense config for information and then writes certain xml files but does not write every single xml file. It starts with a default configuration and the GUI modifies areas that are noted in the GUI.

Offline 0tt0

  • Full Member
  • ***
  • Posts: 257
    • View Profile
Re: FreeSWITCH package for pfSense 1.2.1 and 2.0 released. PBX or Proxy
« Reply #246 on: May 06, 2009, 02:22:17 pm »
Thanks for your thorough answer, I'll try to make some wise re-install choices.

Cheers,


Offline 0tt0

  • Full Member
  • ***
  • Posts: 257
    • View Profile
Re: FreeSWITCH package for pfSense 1.2.1 and 2.0 released. PBX or Proxy
« Reply #247 on: May 06, 2009, 02:27:04 pm »

Your symptoms of loosing files could be explained by failing data storage (Hard Drive, or Compact Flash.)

Always a valid point, I'll try to do some checking on that, perhaps boot a "ultimate boot cd"/Hirens/etc boot cd and do some HD tests and read out SMART data, if available. I do however use other packages that write/read to disk, like lightsquid, so if so I should get some weird behaviour or errors from other parts of the system I think. I will still check it out though.

Thanks,

« Last Edit: May 06, 2009, 02:30:08 pm by 0tt0 »

Offline hadice

  • Newbie
  • *
  • Posts: 3
    • View Profile
unable to call from one profile to another
« Reply #248 on: May 07, 2009, 01:19:50 pm »
Hello, I'm quite new here so sorry for my question if it's lame... I have a following configuration:

(X-Lite clients-LAN)----(LAN-Pfsense-WAN)----(Internet)----(someNAT)----(X-Lite clients)

I don't need to call outside using a provider, I just need some inter-company communication.

I have allowed this on the firewall on the WAN interface:
TCP/UDP 5060 - 5090
UDP 16384 - 32768

Then I have added 3 users (extersions), all the same user context and group (default)

And to get SIP server listening on both interfaces I have copied the whole Internal profile tab and pasted it over to External profile tab with these changes:
Internal:
<param name="rtp-ip" value="192.168.0.84"/>
<param name="sip-ip" value="192.168.0.84"/>
(192.168.0.84 is my LAN IP on pfsense)
External:
<profile name="external">

The problem:
Communication of LAN-LAN users works great, WAN-WAN as well, calling from LAN to a user who is connected to WAN works as well, but (!!) when a WAN-connected user wants to call a user connected to LAN he gots "the person at extension xxxx is not available"

Any suggestions? I havent touched any other config files, have version 0.8.5.4

edit: if I run whireshark at the LAN user I'm trying to reach from WAN he receives no packets, so the call gets lost somewhere in pfsense...
« Last Edit: May 07, 2009, 01:22:43 pm by hadice »

Offline 0tt0

  • Full Member
  • ***
  • Posts: 257
    • View Profile
Re: FreeSWITCH package for pfSense 1.2.1 and 2.0 released. PBX or Proxy
« Reply #249 on: May 08, 2009, 04:57:49 am »
The package does add files to /usr/local/lib but does not remove them on when the package is removed because I don't know if some other package is dependent on them.

BTW: I reinstalled FreeSWITCH and imspector starts again.

I guess that if I uninstall only FreeSWITCH now imspector shouldn't stop working if FreeSWITCH doesn't remove anything. I'll try that later and if imspector still stops working I'll report back.


Offline mcrane

  • Sr. Member
  • ****
  • Posts: 495
    • View Profile
Re: unable to call from one profile to another
« Reply #250 on: May 09, 2009, 11:17:48 am »
And to get SIP server listening on both interfaces I have copied the whole Internal profile tab and pasted it over to External profile tab with these changes:
Internal:
<param name="rtp-ip" value="192.168.0.84"/>
<param name="sip-ip" value="192.168.0.84"/>
(192.168.0.84 is my LAN IP on pfsense)
External:
<profile name="external">
The problem:
Communication of LAN-LAN users works great, WAN-WAN as well, calling from LAN to a user who is connected to WAN works as well, but (!!) when a WAN-connected user wants to call a user connected to LAN he gots "the person at extension xxxx is not available"


Internal profile is the profile that handles registrations. Most often used for extensions but can also be used to connect to by other devices such as FreeSWITCH.

External profile does not do registration.

Their names are a little misleading. By default FreeSWITCH binds to the WAN on pfSense for both Internal and External profiles. If you don't have a static IP address then you would need to use dynamic DNS with pfSense so that the location of the phone system would be constant. Phones on LAN can by default reach the WAN ip where FreeSWITCH is bound to without problem. Phones from the Internet need ports opened for the WAN interface but don't require NAT since its on the WAN.

Earlier this week others have requested ability to connect when using VPNs. To do that FreeSWITCH needs to be listening on an internal address that is reachable from the VPN. This will require copying a profile similar to what you have done. I don't suggest changing the External profile instead copy the internal profile and make a new one from it called something like 'LAN'. Inside the profile you would also need to change the name and remove the alias so that it doesn't conflict with the internal profile. Then restart freeSWITCH.

Soon as I have time I will be creating a new tab called 'Profiles' and will move the Internal and External tabs to that tab. Then will make it possible to manage profiles from there. I'm also thinking add a default to the new installs that include the LAN profile by default. Then people would be able to register to the LAN IP which is what most people are likely used to.

Offline tikid

  • Jr. Member
  • **
  • Posts: 88
    • View Profile
Re: FreeSWITCH package for pfSense 1.2.1 and 2.0 released. PBX or Proxy
« Reply #251 on: May 09, 2009, 11:43:23 am »
I for one would definitely be for binding to the LAN interface by default.

Offline hadice

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: unable to call from one profile to another
« Reply #252 on: May 09, 2009, 06:37:11 pm »
And to get SIP server listening on both interfaces I have copied the whole Internal profile tab and pasted it over to External profile tab with these changes:
Internal:
<param name="rtp-ip" value="192.168.0.84"/>
<param name="sip-ip" value="192.168.0.84"/>
(192.168.0.84 is my LAN IP on pfsense)
External:
<profile name="external">
The problem:
Communication of LAN-LAN users works great, WAN-WAN as well, calling from LAN to a user who is connected to WAN works as well, but (!!) when a WAN-connected user wants to call a user connected to LAN he gots "the person at extension xxxx is not available"

Internal profile is the profile that handles registrations. Most often used for extensions but can also be used to connect to by other devices such as FreeSWITCH.
...

yes, I know that, I just used the profile filename so I could edit it using the web interface. Just imagine I have the origin profile internal and it's copy running on another ip address, both are shown in status and running ok. The only problem is routing between these profiles when someone from WAN calls to LAN. Calling from LAN to WAN works.

Offline mcrane

  • Sr. Member
  • ****
  • Posts: 495
    • View Profile
Re: FreeSWITCH package for pfSense 1.2.1 and 2.0 released. PBX or Proxy
« Reply #253 on: May 10, 2009, 12:02:45 am »
What kind of phones are you using on the remote side?

Offline hadice

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: FreeSWITCH package for pfSense 1.2.1 and 2.0 released. PBX or Proxy
« Reply #254 on: May 10, 2009, 05:27:13 pm »
What kind of phones are you using on the remote side?
x-lite