[Freeswitch-users] OpenZap issues with incoming and outgoing calls

Jingwei Yang jingwei.yang at gmail.com
Tue Dec 8 02:01:57 PST 2009


Problem solved. It's due to the lack of definition in tones.conf. In case
anyone else need it, here's the tone plan for Singapore.

[sg]
generate-dial => v=-7;%(1000,0,425)
detect-dial => 425

generate-ring => v=-7;%(2000,4000,425)
detect-ring => 425

generate-busy => v=-7;%(750,750,425)
detect-busy => 425

generate-attn => v=0;%(100,100,1400,2060,2450,2600)
detect-attn => 1400,2060,2450,2600

generate-callwaiting-sas => v=0;%(300,0,440)
detect-callwaiting-sas => 440

generate-callwaiting-cas => v=0;%(80,0,2750,2130)
detect-callwaiting-cas => 2750,2130

detect-fail1 => 913.8
detect-fail2 => 1370.6
detect-fail3 => 1776.7



On Thu, Dec 3, 2009 at 5:29 PM, Jingwei Yang <jingwei.yang at gmail.com> wrote:

> Hello All,
>
> I have a Digium TDM400P pci card with two FXO ports installed on my linux
> box. I've connected an external telephone line to the first FXO port. But I
> can't either make outgoing calls or receive incoming ones. Here are my
> setups, please let me know where goes wrong.
> *
> /etc/zaptel.conf*
>
> loadzone = sg
> defaultzone=sg
> fxsks=1,2
>
> */usr/local/freeswitch/conf/zt.conf* remains unchanged
>
> [defaults]
> codec_ms => 20
> wink_ms => 150
> flash_ms => 750
> echo_cancel_level => 64
> rxgain => 0.0
> txgain => 0.0
>
> */usr/local/freeswitch/conf/openzap.conf*
>
> [span zt]
> name => OpenZAP
> number => 1
> fxo-channel => 1
>
> [span zt]
> name => OpenZAP
> number => 2
> fxo-channel => 2
>
> */usr/local/freeswitch/conf/autoload_configs/openzap.conf.xml*
>
> <configuration name="openzap.conf" description="OpenZAP Configuration">
>   <settings>
>     <param name="debug" value="0"/>
>   </settings>
>   <!-- one entry here per openzap span -->
>   <analog_spans>
>     <span id="1">
>       <param name="tonegroup" value="sg"/>
>       <param name="digit-timeout" value="2000"/>
>       <param name="max-digits" value="11"/>
>       <param name="dialplan" value="XML"/>
>       <param name="context" value="default"/>
>     </span>
>     <span id="2">
>       <param name="tonegroup" value="sg"/>
>       <param name="digit-timeout" value="2000"/>
>       <param name="max-digits" value="1"/>
>       <param name="dialplan" value="XML"/>
>       <param name="context" value="default"/>
>     </span>
>   </analog_spans>
> </configuration>
>
> I defined an extension in dialplan/default.xml to receive bridge incoming
> calls to my skype instance. Frankly speaking, I'm not sure whether this
> definition is correct. How should I define the expression? When I dial the
> telephone number, the FS console has no response and I hear nother but busy
> tones.
>
>     <extension name="incoming_fxo">
>       <condition field="destination_number" expression="^(1)$">
>         <action application="bridge" data="skypiax/ANY/my_skype_account"/>
>       </condition>
>     </extension>
>
> For outgoing calls, I tried something like this: originate
> openzap/1/1/xxxxxxxx &echo, while "xxxxxxxx" is my handphone number. Again,
> my handphone has no response. Hopefully I've explained my situation clearly.
> Please kindly enlighten where the problem might be.
>
> Thanks,
> -Jingwei
>
> p.s. here is the outgoing log trace for your reference.
>
>
> freeswitch at localhost.localdomain> originate openzap/1/1/xxxxxxxx &echo
> 2009-12-03 17:21:04.664276 [INFO] ozmod_zt.c:636 Setting echo cancel to 64
> taps for 1:1
> 2009-12-03 17:21:04.664276 [DEBUG] mod_openzap.c:366 Set codec PCMU 20ms
> 2009-12-03 17:21:04.665278 [DEBUG] mod_openzap.c:1191 Connect outbound
> channel OpenZAP/1:1/xxxxxxxx
> 2009-12-03 17:21:04.665278 [NOTICE] switch_channel.c:613 New Channel
> OpenZAP/1:1/xxxxxxxx [6f843194-18ce-4525-862f-f5f4e96db5eb]
> 2009-12-03 17:21:04.665278 [DEBUG] mod_openzap.c:1203
> (OpenZAP/1:1/xxxxxxxx) State Change CS_NEW -> CS_INIT
> 2009-12-03 17:21:04.665278 [DEBUG] switch_core_session.c:999 Send signal
> OpenZAP/1:1/xxxxxxxx [BREAK]
> 2009-12-03 17:21:04.665278 [DEBUG] ozmod_analog.c:59 Changing state on 1:1
> from DOWN to DIALING
> 2009-12-03 17:21:04.665278 [DEBUG] ozmod_analog.c:279 ANALOG CHANNEL thread
> starting.
> 2009-12-03 17:21:04.665278 [INFO] ozmod_zt.c:636 Setting echo cancel to 64
> taps for 1:1
> 2009-12-03 17:21:04.665278 [DEBUG] ozmod_analog.c:450 Executing state
> handler on 1:1 for DIALING
> 2009-12-03 17:21:04.665278 [DEBUG] switch_core_state_machine.c:314
> (OpenZAP/1:1/xxxxxxxx) Running State Change CS_INIT
> 2009-12-03 17:21:04.665278 [DEBUG] switch_core_state_machine.c:338
> (OpenZAP/1:1/xxxxxxxx) State INIT
> 2009-12-03 17:21:04.665278 [DEBUG] mod_openzap.c:390 (OpenZAP/1:1/xxxxxxxx)
> State Change CS_INIT -> CS_ROUTING
> 2009-12-03 17:21:04.665278 [DEBUG] switch_core_session.c:999 Send signal
> OpenZAP/1:1/xxxxxxxx [BREAK]
> 2009-12-03 17:21:04.665278 [DEBUG] switch_core_state_machine.c:338
> (OpenZAP/1:1/xxxxxxxx) State INIT going to sleep
> 2009-12-03 17:21:04.665278 [DEBUG] switch_core_state_machine.c:314
> (OpenZAP/1:1/xxxxxxxx) Running State Change CS_ROUTING
> 2009-12-03 17:21:04.665278 [DEBUG] switch_core_state_machine.c:341
> (OpenZAP/1:1/xxxxxxxx) State ROUTING
> 2009-12-03 17:21:04.665278 [DEBUG] mod_openzap.c:413 OpenZAP/1:1/xxxxxxxx
> CHANNEL ROUTING
> 2009-12-03 17:21:04.665278 [DEBUG] switch_ivr_originate.c:66
> (OpenZAP/1:1/xxxxxxxx) State Change CS_ROUTING -> CS_CONSUME_MEDIA
> 2009-12-03 17:21:04.665278 [DEBUG] switch_core_session.c:999 Send signal
> OpenZAP/1:1/xxxxxxxx [BREAK]
> 2009-12-03 17:21:04.665278 [DEBUG] switch_core_state_machine.c:341
> (OpenZAP/1:1/xxxxxxxx) State ROUTING going to sleep
> 2009-12-03 17:21:04.665278 [DEBUG] switch_core_state_machine.c:314
> (OpenZAP/1:1/xxxxxxxx) Running State Change CS_CONSUME_MEDIA
> 2009-12-03 17:21:04.665278 [DEBUG] switch_core_state_machine.c:360
> (OpenZAP/1:1/xxxxxxxx) State CONSUME_MEDIA
> 2009-12-03 17:21:04.665278 [DEBUG] switch_core_state_machine.c:360
> (OpenZAP/1:1/xxxxxxxx) State CONSUME_MEDIA going to sleep
> 2009-12-03 17:21:34.114940 [DEBUG] skypiax_protocol.c:141 rev
> 15765M[(nil)|37     ][DEBUG_SKYPE  141  ][skypiax8  ][-1, 0, 0] READING:
> |||USER amanda8884 PHONE_HOME |||
> 2009-12-03 17:21:34.114940 [DEBUG] skypiax_protocol.c:141 rev
> 15765M[(nil)|37     ][DEBUG_SKYPE  141  ][skypiax8  ][-1, 0, 0] READING:
> |||USER amanda8884 PHONE_OFFICE |||
> 2009-12-03 17:21:34.114940 [DEBUG] skypiax_protocol.c:141 rev
> 15765M[(nil)|37     ][DEBUG_SKYPE  141  ][skypiax8  ][-1, 0, 0] READING:
> |||USER amanda8884 PHONE_MOBILE |||
> 2009-12-03 17:21:34.684709 [DEBUG] ozmod_analog.c:340 Changing state on 1:1
> from DIALING to BUSY
> 2009-12-03 17:21:34.704705 [DEBUG] ozmod_analog.c:450 Executing state
> handler on 1:1 for BUSY
> 2009-12-03 17:21:34.704705 [DEBUG] ozmod_analog.c:579 Changing state on 1:1
> from BUSY to DOWN
> 2009-12-03 17:21:34.724706 [DEBUG] ozmod_analog.c:450 Executing state
> handler on 1:1 for DOWN
> 2009-12-03 17:21:34.724706 [DEBUG] mod_openzap.c:1334 got FXO sig 1:1
> [STOP]
> 2009-12-03 17:21:34.724706 [NOTICE] mod_openzap.c:1352 Hangup
> OpenZAP/1:1/xxxxxxxx [CS_CONSUME_MEDIA] [NORMAL_CIRCUIT_CONGESTION]
> 2009-12-03 17:21:34.724706 [DEBUG] switch_channel.c:1912 Send signal
> OpenZAP/1:1/xxxxxxxx [KILL]
> 2009-12-03 17:21:34.724706 [DEBUG] switch_core_session.c:999 Send signal
> OpenZAP/1:1/xxxxxxxx [BREAK]
> 2009-12-03 17:21:34.724706 [DEBUG] switch_core_state_machine.c:314
> (OpenZAP/1:1/xxxxxxxx) Running State Change CS_HANGUP
> 2009-12-03 17:21:34.724706 [DEBUG] switch_core_state_machine.c:459 thread
> mismatch skipping state handler.
> 2009-12-03 17:21:34.724706 [DEBUG] zap_io.c:1234 channel done 1:1
> 2009-12-03 17:21:34.724706 [DEBUG] ozmod_analog.c:766 ANALOG CHANNEL 1:1
> thread ended.
> 2009-12-03 17:21:34.724706 [DEBUG] switch_core_state_machine.c:486
> (OpenZAP/1:1/xxxxxxxx) State HANGUP
> API CALL [originate(openzap/1/1/xxxxxxxx &echo)] output:
> -ERR NORMAL_CIRCUIT_CONGESTION
>
> 2009-12-03 17:21:34.724706 [DEBUG] switch_ivr_originate.c:2988 Originate
> Resulted in Error Cause: 34 [NORMAL_CIRCUIT_CONGESTION]
> 2009-12-03 17:21:34.725762 [WARNING] mod_openzap.c:474 VETO Changing state
> on 1:1 from DOWN to HANGUP
> 2009-12-03 17:21:34.725762 [DEBUG] mod_openzap.c:510 OpenZAP/1:1/xxxxxxxx
> CHANNEL HANGUP
> 2009-12-03 17:21:34.725762 [DEBUG] switch_core_state_machine.c:46
> OpenZAP/1:1/xxxxxxxx Standard HANGUP, cause: NORMAL_CIRCUIT_CONGESTION
> 2009-12-03 17:21:34.725762 [DEBUG] switch_core_state_machine.c:486
> (OpenZAP/1:1/xxxxxxxx) State HANGUP going to sleep
> 2009-12-03 17:21:34.725762 [DEBUG] switch_core_state_machine.c:333
> (OpenZAP/1:1/xxxxxxxx) State Change CS_HANGUP -> CS_REPORTING
> 2009-12-03 17:21:34.725762 [DEBUG] switch_core_session.c:999 Send signal
> OpenZAP/1:1/xxxxxxxx [BREAK]
> 2009-12-03 17:21:34.725762 [DEBUG] switch_core_state_machine.c:314
> (OpenZAP/1:1/xxxxxxxx) Running State Change CS_REPORTING
> 2009-12-03 17:21:34.725762 [DEBUG] switch_core_state_machine.c:577
> (OpenZAP/1:1/xxxxxxxx) State REPORTING
> 2009-12-03 17:21:34.725762 [DEBUG] switch_core_state_machine.c:53
> OpenZAP/1:1/xxxxxxxx Standard REPORTING, cause: NORMAL_CIRCUIT_CONGESTION
> 2009-12-03 17:21:34.725762 [DEBUG] switch_core_state_machine.c:577
> (OpenZAP/1:1/xxxxxxxx) State REPORTING going to sleep
> 2009-12-03 17:21:34.725762 [DEBUG] switch_core_state_machine.c:327
> (OpenZAP/1:1/xxxxxxxx) State Change CS_REPORTING -> CS_DESTROY
> 2009-12-03 17:21:34.725762 [DEBUG] switch_core_session.c:999 Send signal
> OpenZAP/1:1/xxxxxxxx [BREAK]
> 2009-12-03 17:21:34.725762 [DEBUG] switch_core_session.c:1136 Session 1
> (OpenZAP/1:1/xxxxxxxx) Locked, Waiting on external entities
> 2009-12-03 17:21:34.725762 [NOTICE] switch_core_session.c:1154 Session 1
> (OpenZAP/1:1/xxxxxxxx) Ended
> 2009-12-03 17:21:34.725762 [NOTICE] switch_core_session.c:1156 Close
> Channel OpenZAP/1:1/xxxxxxxx [CS_DESTROY]
> 2009-12-03 17:21:34.725762 [DEBUG] switch_core_state_machine.c:423
> (OpenZAP/1:1/xxxxxxxx) Running State Change CS_DESTROY
> 2009-12-03 17:21:34.725762 [DEBUG] switch_core_state_machine.c:434
> (OpenZAP/1:1/xxxxxxxx) State DESTROY
> freeswitch at localhost.localdomain> 2009-12-03 17:21:34.726741 [DEBUG]
> switch_core_state_machine.c:60 OpenZAP/1:1/xxxxxxxx Standard DESTROY
> 2009-12-03 17:21:34.726741 [DEBUG] switch_core_state_machine.c:434
> (OpenZAP/1:1/xxxxxxxx) State DESTROY going to sleep
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20091208/c98e19a7/attachment-0002.html 


More information about the FreeSWITCH-users mailing list