[Freeswitch-users] Installation: good, but some issues

David Baggett freeswitch at baggett.org
Tue Aug 12 15:31:17 PDT 2008


I've gotten FreeSWITCH running on this config:

- Intel Atom D945GCLF in 1U rackmount
- RedHat FC8
- Xorcom USB Astribank-8 (FXO)
- Xorcom USB Astribank-8 (FXS)
- Trunk FreeSWITCH code from a few days ago
- zaptel-1.4.9.2.xpp.r5566
- Grandstream BT-100 SIP phones
- Grandstream GXV-3000 SIP videophones
- Various analog phone extensions

First I tried installing on FC9. This didn't work because FC9 couldn't 
deal with the on-board NIC card on the D945GCLF. FC8 installed fine, 
though, so I just used that instead.

Overall I am very impressed with FreeSWITCH. It is vastly easier to set 
up than Asterisk, and much cleaner. The XML config files are *so* much 
better than the ad hoc Asterisk config syntax.

I like that I can make it run like a regular RedHat service, though I 
could not get it to run as user freeswitch -- it seems to want to run as 
root. I read through a bunch of the code and it is really well done. 
Thanks for a great open source project!

Most things work: I set up the SIP phones and added the analog 
extensions, and can dial out on any phone over my POTS lines via 
Astribank FXO. I can receive incoming calls as well. I can 
videoconference between the videophones by using the code in the sample 
dialplan (default.xml) for "intercom" mode. Neat!

Problems:

Weirndess with FXS-originated calls
-----------------------------------

If I call from an analog (FXS) extension to a BT-100, it rings normally. 
But if I then pick up the SIP phone, I can hear the ring on the analog 
extension get choppy. Soon after, the call is dropped.

If I call from an analog (FXS) extension to a GXV-3000, it rings 
normally, but when I pick up the SIP phone, I get an immediate busy on 
the analog extension.

If I call from an analog (FXS) extension to an X-Lite SoftPhone, it 
rings normally, but when I pick up the SIP phone, no audio comes through 
from the analog extension.

If I call from either a BT-100, a GXV-3000, or an X-Lite SoftPhone *to* 
an analog (FXS) extension, it works fine.

The dialplan is simple (note that I have 1- and 2-digit extensions):

 
 
 
                                                 <!-- dial an OpenZAP 
channel number to get the corresponding analog extension --> 
 
 

   <extension name="OpenZAP extensions"> 
 
 

     <condition field="destination_number" expression="^(9|1[0-6])$"> 
 
 

       <action application="set" data="dialed_ext=$1"/> 
 
 

       <action application="bridge" data="OpenZAP/${dialed_ext}/1"/> 
 
 

     </condition> 
 
 

   </extension> 
 
 

 
 
 

   <!-- dial a number in the directory to get the corresponding SIP 
extension; use video if possible --> 
 

   <extension name="local-extension"> 
 
 

     <condition field="destination_number" expression="^([3-6]\d)$"> 
 
 

       <action application="set" data="dialed_ext=$1"/> 
 
 

       <action 
application="export"><![CDATA[sip_h_Call-Info=<sip:$${domain}>;answer-after=0]]></action> 
 
 

       <action application="export" 
data="sip_invite_params=intercom=true"/> 
 
 

       <action application="export" data="sip_auto_answer=true"/> 
 
 

       <action application="bridge" 
data="user/${dialed_ext}@$${domain}"/> 
 
 

     </condition> 
 
 

   </extension> 
 
 


In general, I found it a bit strange that you can't (it seems) put 
analog extensions into the directory. Is it true that you have to define 
analog extensions manually in the dialplan? That's kind of 
counterintuitive, especially for Asterisk users; the Asterisk Now GUI 
makes analog and SIP extensions look the same for all practical purposes.

Echo
----

I was getting massive distortion on analog connections involving any 
GXV-3000 before I changed echo_cancel_level in /etc/openzap/zt.conf. The 
default value was 64. I changed it to 0 and the distortion went away, 
but of course I get lots of annoying echo now. Other SIP phones don't 
seem to have this problem. I have read in earlier posts to this list 
that the GXV-3000 has known problems. But the interesting thing is that 
it was working fine with Asterisk and the Astribanks (though on a 
different CPU & M/B).

The Astribank seems to have its own EC, but I can't figure out how to 
turn it on. And I have no idea what to set the value in zt.conf to; 32 
seems to work better than either 16 or 64 (!).

I tried fxotune but that didn't do anything: it ran for a long time and 
generated an /etc/fxotone that seemed to have all zero values.

Basically, it would be great to have an "echo cancellation HOWTO" for 
OpenZap users since EC seems to be offered in several different layers. 
I also notice a bunch of different EC modes in the OpenZap code -- does 
anyone know how to try different ones out?

FAX detection
-------------

This just doesn't seem to work. Here's the relevant code from my 
diaplan. (It looks a little odd because I send all unanswered calls from 
my POTS lines to the ext. 31 voicemail box.)

   <!-- ring all extensions for 20 seconds, then send to voicemail for 
extension 31 --> 
 

   <!-- we answer immediately to prevent the alarm from emitting a 
fax/modem tone in some cases before a previous call has settled --> 
 

   <extension name="incoming-astribank"> 
 
 

     <condition field="destination_number" expression="^([1-4])$"> 
 
 

       <action application="answer" /> 
 
 

       <action application="tone_detect" data="fax 1100 r +5000 transfer 
fax XML default" /> 
 

       <action application="set" data="dialed_ext=31"/> 
 
 

       <action application="export" data="dialed_ext=31"/> 
 
 

       <action application="bind_meta_app" data="1 b s 
execute_extension::dx XML features"/> 
 

       <action application="bind_meta_app" data="2 b s 
record_session::$${base_dir}/recordings/${caller_id_number}.${strftime(%Y-%m-%d-%H-%M-%S)}.wav"/> 
 

       <action application="bind_meta_app" data="3 b s 
execute_extension::cf XML features"/> 
 

       <action application="set" data="transfer_ringback=${us-ring}"/> 
 
 

       <action application="set" data="hangup_after_bridge=true"/> 
 
 

       <action application="set" data="continue_on_fail=true"/> 
 
 

       <action application="db" 
data="insert/call_return/${dialed_ext}/${caller_id_number}"/> 
 
 

       <action application="set" data="call_timeout=20"/> 
 
 

       <action application="sleep" data="1000"/> 
 
 

       <action application="bridge" 
data="user/30@$${domain},user/31@$${domain},user/33@$${domain},user/36@$${domain},user/37@$${domain},OpenZAP/9/1,OpenZAP/10/1,OpenZAP/11/1"/> 
 

       <action application="sleep" data="1000"/> 
 
 

       <action application="voicemail" data="default $${domain} 
${dialed_ext}"/> 
 

     </condition> 
 
 

   </extension> 
 
 

 
 
 

   <!-- called when the tone_detect above triggers --> 
 
 

   <extension name="fax"> 
 
 

     <condition field="destination_number" expression="^fax$"> 
 
 

       <action application="set" data="transfer_ringback=${us-ring}"/> 
 
 

       <action application="set" data="hangup_after_bridge=true"/> 
 
 

       <action application="set" data="call_timeout=20"/> 
 
 

       <action application="bridge" data="OpenZAP/12/1"/> 
 
 

     </condition> 
 
 

   </extension>

Thanks for any help with these issues.

Dave





More information about the FreeSWITCH-users mailing list