Dear John,<br><br>Appreciate the long time you took in putting down your queries. I'd like to help but unfortunately don't have domain expertise in the areas you're having problems.<br><br>Your mail is more likely to be read if it was shorter. May I suggest you use <a href="http://pastebin.freeswitch.org/">http://pastebin.freeswitch.org/</a> to paste all your debug messages and configurations.<br>
<br>Please ignore this message if you don't agree with the strategy.<br><br>Thanks,<br><br>Sidharth<br><br><div class="gmail_quote">On Tue, Jun 7, 2011 at 3:06 AM, John <span dir="ltr"><<a href="mailto:freeswitch@earthspike.net">freeswitch@earthspike.net</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hello,<br>
<br>
I have just set up a FreeSWITCH box with a Sangoma B700 connected to 2 x<br>
ISDN2e lines (each 2B+D, so 4 voice channels) in UK, so supplied by BT<br>
Openreach. There are a number of anomalies that I am trying to solve.<br>
[One of these is that 1 line is dead, but that is for BT Openreach to<br>
resolve rather than anyone on this list.]<br>
<br>
I have a few questions, but as they are all related, I hope you don't<br>
mind them in one post. Some basics first. The box is an Atom dual-core<br>
with 2GB of memory and a Sangoma B700 card. It's built with Ubuntu<br>
10.04.2 LTS server 64-bit, patched and up to date, and also runs dhcpd,<br>
lighttpd and sshd. I built the Sangoma ISDN libraries and FreeSWITCH<br>
using the latest git versions I could ('make current' about 2 weeks<br>
ago). We have incoming and outgoing calls working, but some incoming<br>
calls ring in the caller's ear, but nothing appears on the FreeSWITCH<br>
console, and others fail. Rebooting the server cures this. We have had<br>
problems with lines being disconnected and then reconnected, and it<br>
seems that FreeTDM/wanrouter/whatever doesn't recognise previously<br>
disconnected lines coming back into use, because a reboot finds lines<br>
that were previously reported disconnected ('wanrouter status' or 'ftdm<br>
list'). We have ongoing problems with one line that is 'disconnected'<br>
(wanpipe2/wp2) but the queries I am describing below apply equally when<br>
both lines are connected and working.<br>
<br>
1. There seems to be a lot of ISDN 'chatter' with channels going up and<br>
down all the time even when the switch is completely idle. Is this<br>
normal? Here is my /log 7 showing two of the cycles (which appear to be<br>
about 50s apart):<br>
<br>
2011-06-06 22:01:54.992467 [DEBUG] ftmod_sangoma_isdn_stack_rcv.c:681<br>
[SNGISDN Q921] wp1: Protocol: Data Link connection DN(4): Disconnect<br>
initiated(263)<br>
2011-06-06 22:02:29.952464 [WARNING] ftmod_sangoma_isdn_stack_rcv.c:748<br>
[SNGISDN Q931] s1: Interface: Down(261): Dchan(285)<br>
2011-06-06 22:02:29.952464 [DEBUG] ftmod_sangoma_isdn_cntrl.c:43<br>
[s1c1][1:1] Signalling link status changed to DOWN<br>
2011-06-06 22:02:29.952464 [DEBUG] ftmod_sangoma_isdn_cntrl.c:43<br>
[s1c2][1:2] Signalling link status changed to DOWN<br>
2011-06-06 22:02:29.952464 [DEBUG] ftmod_sangoma_isdn_cntrl.c:43<br>
[s1c3][1:3] Signalling link status changed to DOWN<br>
2011-06-06 22:02:29.952464 [DEBUG] ftmod_sangoma_isdn_support.c:200<br>
[s1c1][1:1] Setting availability rate to:5<br>
2011-06-06 22:02:29.952464 [DEBUG] mod_freetdm.c:2268 got clear channel<br>
sig [SIGSTATUS_CHANGED]<br>
2011-06-06 22:02:29.952464 [DEBUG] ftmod_sangoma_isdn_support.c:186<br>
[s1c1][1:1] Setting availability rate to:5<br>
2011-06-06 22:02:29.952464 [DEBUG] ftmod_sangoma_isdn_support.c:200<br>
[s1c2][1:2] Setting availability rate to:5<br>
2011-06-06 22:02:29.952464 [INFO] mod_freetdm.c:2345 1:1 signalling<br>
changed to :DOWN<br>
2011-06-06 22:02:29.952464 [DEBUG] ftmod_sangoma_isdn_support.c:186<br>
[s1c2][1:2] Setting availability rate to:5<br>
2011-06-06 22:02:29.952464 [DEBUG] mod_freetdm.c:2268 got clear channel<br>
sig [SIGSTATUS_CHANGED]<br>
2011-06-06 22:02:29.952464 [DEBUG] ftmod_sangoma_isdn_support.c:200<br>
[s1c3][1:3] Setting availability rate to:5<br>
2011-06-06 22:02:29.952464 [INFO] mod_freetdm.c:2345 1:2 signalling<br>
changed to :DOWN<br>
2011-06-06 22:02:29.952464 [DEBUG] ftmod_sangoma_isdn_support.c:186<br>
[s1c3][1:3] Setting availability rate to:5<br>
2011-06-06 22:02:29.952464 [DEBUG] mod_freetdm.c:2268 got clear channel<br>
sig [SIGSTATUS_CHANGED]<br>
2011-06-06 22:02:29.952464 [INFO] mod_freetdm.c:2345 1:3 signalling<br>
changed to :DOWN<br>
2011-06-06 22:02:29.952464 [INFO] ftmod_sangoma_isdn_stack_rcv.c:631<br>
Received RESTART CFM (dChan:1 ces:0 type:1)<br>
2011-06-06 22:02:29.952464 [DEBUG] ftmod_sangoma_isdn_stack_hndl.c:1179<br>
Receved RESTART, but Restart Indicator IE not present<br>
2011-06-06 22:02:29.972464 [DEBUG] ftmod_sangoma_isdn_stack_rcv.c:681<br>
[SNGISDN Q921] wp1: Protocol: Data Link connection UP(3): UA frame with<br>
F-bit = 1(258)<br>
2011-06-06 22:02:29.972464 [INFO] ftmod_sangoma_isdn_stack_rcv.c:631<br>
Received RESTART CFM (dChan:1 ces:0 type:0)<br>
2011-06-06 22:02:29.972464 [INFO] ftmod_sangoma_isdn_stack_rcv.c:729<br>
[SNGISDN Q931] s1: Interface: UP(260): Dchan(285)<br>
2011-06-06 22:02:29.972464 [DEBUG] ftmod_sangoma_isdn_cntrl.c:43<br>
[s1c1][1:1] Signalling link status changed to UP<br>
2011-06-06 22:02:29.972464 [DEBUG] ftmod_sangoma_isdn_cntrl.c:43<br>
[s1c2][1:2] Signalling link status changed to UP<br>
2011-06-06 22:02:29.972464 [DEBUG] ftmod_sangoma_isdn_cntrl.c:43<br>
[s1c3][1:3] Signalling link status changed to UP<br>
2011-06-06 22:02:29.972464 [DEBUG] ftmod_sangoma_isdn_support.c:200<br>
[s1c1][1:1] Setting availability rate to:10<br>
2011-06-06 22:02:29.972464 [DEBUG] ftmod_sangoma_isdn_support.c:186<br>
[s1c1][1:1] Setting availability rate to:10<br>
2011-06-06 22:02:29.972464 [DEBUG] ftmod_sangoma_isdn_support.c:200<br>
[s1c2][1:2] Setting availability rate to:10<br>
2011-06-06 22:02:29.972464 [DEBUG] ftmod_sangoma_isdn_support.c:186<br>
[s1c2][1:2] Setting availability rate to:10<br>
2011-06-06 22:02:29.972464 [DEBUG] ftmod_sangoma_isdn_support.c:200<br>
[s1c3][1:3] Setting availability rate to:10<br>
2011-06-06 22:02:29.972464 [DEBUG] ftmod_sangoma_isdn_support.c:186<br>
[s1c3][1:3] Setting availability rate to:10<br>
2011-06-06 22:02:29.972464 [DEBUG] ftmod_sangoma_isdn_stack_hndl.c:1179<br>
Receved RESTART, but Restart Indicator IE not present<br>
2011-06-06 22:02:29.972464 [DEBUG] mod_freetdm.c:2268 got clear channel<br>
sig [SIGSTATUS_CHANGED]<br>
2011-06-06 22:02:29.972464 [INFO] mod_freetdm.c:2345 1:1 signalling<br>
changed to :UP<br>
2011-06-06 22:02:29.972464 [DEBUG] mod_freetdm.c:2268 got clear channel<br>
sig [SIGSTATUS_CHANGED]<br>
2011-06-06 22:02:29.972464 [INFO] mod_freetdm.c:2345 1:2 signalling<br>
changed to :UP<br>
2011-06-06 22:02:29.972464 [DEBUG] mod_freetdm.c:2268 got clear channel<br>
sig [SIGSTATUS_CHANGED]<br>
2011-06-06 22:02:29.972464 [INFO] mod_freetdm.c:2345 1:3 signalling<br>
changed to :UP<br>
2011-06-06 22:03:19.912462 [DEBUG] ftmod_sangoma_isdn_stack_rcv.c:681<br>
[SNGISDN Q921] wp1: Protocol: Data Link connection DN(4): Disconnect<br>
initiated(263)<br>
2011-06-06 22:03:19.932483 [DEBUG] ftmod_sangoma_isdn_stack_rcv.c:681<br>
[SNGISDN Q921] wp1: Protocol: Data Link connection UP(3): UA frame with<br>
F-bit = 1(258)<br>
2011-06-06 22:03:19.932483 [INFO] ftmod_sangoma_isdn_stack_rcv.c:631<br>
Received RESTART CFM (dChan:1 ces:0 type:0)<br>
2011-06-06 22:03:19.932483 [DEBUG] ftmod_sangoma_isdn_stack_hndl.c:1179<br>
Receved RESTART, but Restart Indicator IE not present<br>
2011-06-06 22:03:19.932483 [INFO] ftmod_sangoma_isdn_stack_rcv.c:729<br>
[SNGISDN Q931] s1: Interface: UP(260): Dchan(285)<br>
2011-06-06 22:03:19.932483 [DEBUG] ftmod_sangoma_isdn_cntrl.c:43<br>
[s1c1][1:1] Signalling link status changed to UP<br>
2011-06-06 22:03:19.932483 [DEBUG] ftmod_sangoma_isdn_cntrl.c:43<br>
[s1c2][1:2] Signalling link status changed to UP<br>
2011-06-06 22:03:19.932483 [DEBUG] ftmod_sangoma_isdn_cntrl.c:43<br>
[s1c3][1:3] Signalling link status changed to UP<br>
2011-06-06 22:03:19.932483 [DEBUG] ftmod_sangoma_isdn_support.c:200<br>
[s1c1][1:1] Setting availability rate to:10<br>
2011-06-06 22:03:19.932483 [DEBUG] ftmod_sangoma_isdn_support.c:186<br>
[s1c1][1:1] Setting availability rate to:10<br>
2011-06-06 22:03:19.932483 [DEBUG] ftmod_sangoma_isdn_support.c:200<br>
[s1c2][1:2] Setting availability rate to:10<br>
2011-06-06 22:03:19.932483 [DEBUG] ftmod_sangoma_isdn_support.c:186<br>
[s1c2][1:2] Setting availability rate to:10<br>
2011-06-06 22:03:19.932483 [DEBUG] ftmod_sangoma_isdn_support.c:200<br>
[s1c3][1:3] Setting availability rate to:10<br>
2011-06-06 22:03:19.932483 [DEBUG] ftmod_sangoma_isdn_support.c:186<br>
[s1c3][1:3] Setting availability rate to:10<br>
2011-06-06 22:03:19.932483 [DEBUG] mod_freetdm.c:2268 got clear channel<br>
sig [SIGSTATUS_CHANGED]<br>
2011-06-06 22:03:19.932483 [INFO] mod_freetdm.c:2345 1:1 signalling<br>
changed to :UP<br>
2011-06-06 22:03:19.932483 [DEBUG] mod_freetdm.c:2268 got clear channel<br>
sig [SIGSTATUS_CHANGED]<br>
2011-06-06 22:03:19.932483 [INFO] mod_freetdm.c:2345 1:2 signalling<br>
changed to :UP<br>
2011-06-06 22:03:19.932483 [DEBUG] mod_freetdm.c:2268 got clear channel<br>
sig [SIGSTATUS_CHANGED]<br>
2011-06-06 22:03:19.932483 [INFO] mod_freetdm.c:2345 1:3 signalling<br>
changed to :UP<br>
freeswitch@internal> ftdm list<br>
+OK<br>
span: 1 (wp1)<br>
type: Sangoma (ISDN)<br>
physical_status: ok<br>
signaling_status: UP<br>
chan_count: 3<br>
dialplan: XML<br>
context: public<br>
dial_regex:<br>
fail_dial_regex:<br>
hold_music:<br>
analog_options: none<br>
+OK<br>
span: 2 (wp2)<br>
type: Sangoma (ISDN)<br>
physical_status: alarmed<br>
signaling_status: DOWN<br>
chan_count: 3<br>
dialplan: XML<br>
context: public<br>
dial_regex:<br>
fail_dial_regex:<br>
hold_music:<br>
analog_options: none<br>
+OK<br>
span: 3 (FXS)<br>
type: analog<br>
physical_status: ok<br>
signaling_status: UP<br>
chan_count: 2<br>
dialplan: XML<br>
context: default<br>
dial_regex:<br>
fail_dial_regex:<br>
hold_music:<br>
analog_options: none<br>
<br>
<br>
# wanrouter status<br>
<br>
Devices currently active:<br>
wanpipe1 wanpipe2 wanpipe3<br>
<br>
<br>
Wanpipe Config:<br>
<br>
Device name | Protocol Map | Adapter | IRQ | Slot/IO | If's | CLK |<br>
Baud rate |<br>
wanpipe1 | N/A | A500/B700| 20 | 0 | 1 | N/A |<br>
0 |<br>
wanpipe2 | N/A | A500/B700| 20 | 0 | 1 | N/A |<br>
0 |<br>
wanpipe3 | N/A | A200/A400/B600/B700/B800| 20 | 0 |<br>
1 | N/A | 0 |<br>
<br>
Wanrouter Status:<br>
<br>
Device name | Protocol | Station | Status |<br>
wanpipe1 | AFT ISDN | N/A | Connected |<br>
wanpipe2 | AFT ISDN | N/A | Disconnected |<br>
wanpipe3 | A-ANALOG | N/A | Connected |<br>
<br>
<br>
# cat /etc/wanpipe/wanrouter.rc<br>
#!/bin/sh<br>
# .. comments snipped ...<br>
ROUTER_BOOT=YES<br>
WAN_CONF_DIR=/etc/wanpipe<br>
WAN_INTR_DIR=/etc/wanpipe/interfaces<br>
WAN_BIN_DIR=/usr/sbin<br>
WAN_LOG=/var/log/wanrouter<br>
WAN_LOCK=/var/lock/wanrouter<br>
WAN_LOCK_DIR=/var/lock<br>
WAN_IP_FORWARD=NO<br>
NEW_IF_TYPE=NO<br>
WAN_LIB_DIR=/etc/wanpipe/lib<br>
WAN_ADSL_LIST=/etc/wanpipe/wan_adsl.list<br>
WAN_ANNEXG_LOAD=NO<br>
WAN_SCTP_LOAD=NO<br>
WAN_LIP_LOAD=NO<br>
WAN_DYN_WANCONFIG=NO<br>
WAN_SCRIPTS_DIR=/etc/wanpipe/scripts<br>
WAN_FIRMWARE_DIR=/etc/wanpipe/firmware<br>
WAN_DEVICES_REV_STOP_ORDER=YES<br>
WAN_DEVICES="wanpipe1 wanpipe2 wanpipe3 "<br>
<br>
# cat /etc/wanpipe/wanpipe1.conf<br>
#================================================<br>
# WANPIPE1 Configuration File<br>
#================================================<br>
#<br>
# Note: This file was generated automatically<br>
# by /usr/local/sbin/setup-sangoma program.<br>
#<br>
# If you want to edit this file, it is<br>
# recommended that you use wancfg program<br>
# to do so.<br>
#================================================<br>
# Sangoma Technologies Inc.<br>
#================================================<br>
<br>
<br>
<br>
<br>
[devices]<br>
wanpipe1 = WAN_AFT_ISDN_BRI, Comment<br>
<br>
[interfaces]<br>
w1g1 = wanpipe1, , TDM_VOICE_API, Comment<br>
<br>
[wanpipe1]<br>
CARD_TYPE = AFT<br>
S514CPU = A<br>
CommPort = PRI<br>
AUTO_PCISLOT = NO<br>
PCISLOT = 0<br>
PCIBUS = 5<br>
FE_MEDIA = BRI<br>
FE_LINE = 1<br>
TDMV_LAW = ALAW<br>
RM_BRI_CLOCK_MASTER = NO<br>
MTU = 1500<br>
UDPPORT = 9000<br>
TTL = 255<br>
IGNORE_FRONT_END = NO<br>
TDMV_SPAN = 1<br>
TE_AIS_MAINTENANCE = NO #NO: defualt YES: Start port in AIS<br>
Blue Alarm and keep line down<br>
#wanpipemon -i w1g1 -c Ttx_ais_off to<br>
disable AIS maintenance mode<br>
#wanpipemon -i w1g1 -c Ttx_ais_on to<br>
enable AIS maintenance mode<br>
TDMV_HW_DTMF = YES # YES: receive dtmf events from hardware<br>
TDMV_HW_FAX_DETECT = YES # YES: receive fax 1100hz events from<br>
hardware<br>
HWEC_OPERATION_MODE = OCT_NORMAL # OCT_NORMAL: echo cancelation<br>
enabled with nlp (default)<br>
# OCT_SPEECH: improves software<br>
tone detection by disabling NLP (echo possible)<br>
# OCT_NO_ECHO:disables echo<br>
cancelation but allows VQE/tone functions.<br>
HWEC_DTMF_REMOVAL = NO # NO: default YES: remove dtmf out of<br>
incoming media (must have hwdtmf enabled)<br>
HWEC_NOISE_REDUCTION = NO # NO: default YES: reduces noise on the<br>
line - could break fax<br>
HWEC_ACUSTIC_ECHO = NO # NO: default YES: enables acustic echo<br>
cancelation<br>
HWEC_NLP_DISABLE = NO # NO: default YES: guarantees software<br>
tone detection (possible echo)<br>
HWEC_TX_AUTO_GAIN = 0 # 0: disable -40-0: default tx audio<br>
level to be maintained (-20 default)<br>
HWEC_RX_AUTO_GAIN = 0 # 0: disable -40-0: default tx audio<br>
level to be maintained (-20 default)<br>
HWEC_TX_GAIN = 0 # 0: disable -24-24: db values to be<br>
applied to tx signal<br>
HWEC_RX_GAIN = 0 # 0: disable -24-24: db values to be<br>
applied to tx signal<br>
<br>
[w1g1]<br>
ACTIVE_CH = ALL<br>
TDMV_HWEC = YES<br>
MTU = 80<br>
<br>
... and wanpipe2 was also automatically generated so just has '2' for<br>
FE_LINE and TDMV_SPAN instead of '1'.<br>
<br>
# cat /usr/local/freeswitch/conf/freetdm.conf<br>
[span wanpipe wp1]<br>
trunk_type => bri<br>
group=1<br>
b-channel => 1:1-2<br>
d-channel => 1:3<br>
<br>
[span wanpipe wp2]<br>
trunk_type => bri<br>
group=1<br>
b-channel => 2:1-2<br>
d-channel => 2:3<br>
<br>
[span wanpipe FXS]<br>
name => freetdm<br>
trunk_type => fxs<br>
group => grp2<br>
fxs-channel => 3:1<br>
<br>
trunk_type => fxs<br>
group => grp2<br>
fxs-channel => 3:2<br>
<br>
# cat /usr/local/freeswitch/conf/autoload_configs/freetdm.conf.xml<br>
<configuration name="freetdm.conf" description="Freetdm Configuration"><br>
<settings><br>
<param name="debug" value="0"/><br>
<!--<param name="hold-music" value="$${moh_uri}"/>--><br>
<!--<param name="enable-analog-option" value="call-swap"/>--><br>
<!--<param name="enable-analog-option" value="3-way"/>--><br>
</settings><br>
<br>
<config_profiles><br>
<br>
<profile name="my_bri_te_1"><br>
<param name="switchtype" value="euroisdn" /><br>
<param name="interface" value="cpe"/><br>
<param name="facility" value="no" /><br>
</profile><br>
<br>
</config_profiles><br>
<br>
<sangoma_bri_spans><br>
<br>
<span name="wp1" cfgprofile="my_bri_te_1"><br>
<param name="dialplan" value="XML"/><br>
<param name="context" value="public"/><br>
</span><br>
<br>
<span name="wp2" cfgprofile="my_bri_te_1"><br>
<param name="dialplan" value="XML"/><br>
<param name="context" value="public"/><br>
</span><br>
<br>
</sangoma_bri_spans><br>
<br>
<br>
<analog_spans><br>
<br>
<span name="FXS"><br>
<!--<param name="hold-music" value="$${moh_uri}"/>--><br>
<param name="dialplan" value="XML"/><br>
<param name="context" value="default"/><br>
<!-- regex to stop dialing when it matches --><br>
<!--<param name="dial-regex" value="5555"/>--><br>
<!-- regex to stop dialing when it does not match --><br>
<!--<param name="fail-dial-regex" value="^5"/>--><br>
</span><br>
<br>
</analog_spans><br>
<br>
</configuration><br>
<br>
What other config files do I need to supply? I don't want to deluge the<br>
list any more in my first post!<br>
<br>
2. We have 2 Single Number DDI numbers configured over the 4 channels.<br>
I want to set up outgoing calls so that they can appear to come from<br>
either of the two numbers, but at present the outgoing CLI appears to be<br>
overridden by the telco (BT) to only use one of the numbers. Has anyone<br>
got this working in UK, and what is the format for the<br>
outbound_caller_id_number: last 6 digits or full 11 digits? I note that<br>
the inbound called number is only the last 6 digits.<br>
<br>
3. I have built FreeSWITCH from git and installed at /usr/local/... and<br>
then followed the steps on the Ubuntu page in the Wiki to set up the run<br>
control scripts, etc, and run FS non-root as freeswitch:daemon. With<br>
FreeTDM, I have discovered that the /dev/wan* devices are owned by<br>
root:root, and so are inaccessible to FS running as non-root. So for<br>
now I have added a line in /etc/init.d/freeswitch to 'chgrp freeswitch<br>
/dev/wan*'. This is not the most elegant solution, because 'wanrouter<br>
restart' (which seems to be my best friend at the moment) resets the<br>
ownership to root:root. I have tried grepping to see where the mknods<br>
are for these devices, but have been unsuccessful. Is there a better<br>
place to 'permanently' change the device ownership?<br>
<br>
Thanks for all the great support I have already got just from editing my<br>
Wiki User page; this is a friendly group!<br>
<br>
John<br>
<br>
_______________________________________________<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
</blockquote></div><br><br clear="all"><br><br><br>