[Freeswitch-users] openzap / dialplan / Sangoma A204 questions

John Wehle john at feith.com
Mon Jun 30 17:29:46 PDT 2008


I have a A204 with hardware echo cancelling and two FXO modules
on FreeBSD 6.2 connected to tip-ring lines from a PBX.  ztcfg reports:

  Channel 01: FXS Kewlstart (Default) (Slaves: 01)
  Channel 02: FXS Kewlstart (Default) (Slaves: 02)
  Channel 03: FXS Kewlstart (Default) (Slaves: 03)
  Channel 04: FXS Kewlstart (Default) (Slaves: 04)

Hooking a plain old telephone to the tip-ring lines from the PBX
works fine.  On startup freeswitch reports:

  [DEBUG] zap_io.c:1951 load_config() found config for span
  [DEBUG] zap_io.c:1978 load_config() created span 1 of type zt
  [DEBUG] zap_io.c:1991 load_config() span 1 [name]=[OpenZAP]
  [DEBUG] zap_io.c:1991 load_config() span 1 [number]=[551]
  [DEBUG] zap_io.c:1991 load_config() span 1 [fxo-channel]=[1]
  [DEBUG] zap_io.c:2020 load_config() setting trunk type to 'FXO' start(KEWL)
  [WARNING] zap_zt.c:135 zt_open_range() this ioctl fails on older zaptel but is harmless if you used ztcfg
  [device /dev/zap/channel chan 1 fd 26 (Inappropriate ioctl for device)]
  [INFO] zap_zt.c:170 zt_open_range() configuring device /dev/zap/channel channel 1 as OpenZAP device 1:1 fd:25

Ultimately I want freeswitch to run a script when any of the FXO lines
receive a call.  Playing around produced some questions:

  1) I have a dialplan of:

    <extension name="outgoing-fxo">
      <condition field="destination_number" expression="^55[1-4]$">
        <action application="set" data="dialed_ext=482"/>
        <action application="bridge" data="openzap/1/1/${dialed_ext}"/>
      </condition>
    </extension>

    which I'm assuming will cause freeswitch to use the fxo to dial 482
    on the PBX when routing a call to 551.  When I dial 551 from a VoIP
    phone I see:

    [NOTICE] switch_channel.c:533 switch_channel_set_name() New Channel OpenZAP/1:1/482 [edf17e96-0247-dd11-9800-001fc6ab49e2]
    [WARNING] zap_analog.c:52 analog_fxo_outgoing_call() VETO Changing state on 1:1 from DOWN to DIALING
    [WARNING] zap_zt.c:356 zt_open() Echo training not available for 1:1

    however I don't hear anything on the VoIP phone (i.e. no ringing) and
    extension 482 which is right next to the VoIP doesn't ring.

  2) What would my dialplan look like so that dialing 551 bridges the call
     to the FXO with the FXO just going off hook ... not dialing?
     I.e. dialing 551 just gets me a PBX line with dialtone.

  3) What condition would I use in my dialplan to match an FXO line ringing?
     I.e. when the FXO line rings I want to invoke javascript.

-- John
-------------------------------------------------------------------------
|   Feith Systems  |   Voice: 1-215-646-8000  |  Email: john at feith.com  |
|    John Wehle    |     Fax: 1-215-540-5495  |                         |
-------------------------------------------------------------------------





More information about the FreeSWITCH-users mailing list