📜 ⬆️ ⬇️

Asterisk chan_ss7 "12 threads"

Task:


Connection to the City Telephone Station GTS using the N7 signaling system (General alarm No. 7 (SS7 or SS7)

The decision on the stages:




Server:

I know little about the server, I set everything up remotely and did not see it, but all I needed was I saw.
Percent:
[root@ss7 ~]# cat /proc/cpuinfo |grep "model name"
model name : Pentium(R) Dual-Core CPU E5700 @ 3.00GHz
model name : Pentium(R) Dual-Core CPU E5700 @ 3.00GHz

Memory:
[root@ss7 ~]# free -m
total used free shared buffers cached
Mem: 4051 3899 152 0 142 3628
-/+ buffers/cache: 128 3923
Swap: 5247 0 5247

Screw:
2 screws in the ride 250 GB each, regular SATA
Motherboard:
The model and the manufacturer did not interest me. I only needed to know if there was no USB or ETH for one interrupt with the DIGIUM boards.
[root@ss7 ~]# cat /proc/interrupts
....
58: 6425 2287054760 IO-APIC-level ata_piix, wct4xxp
74: 2285708690 4349 IO-APIC-level wct4xxp
82: 4161 2285686641 IO-APIC-level wct4xxp
....

the fact that one of the boards for one interrupt with a screw (ata_piix, wct4xxp) is a problem, but all that was done did not work.
Stream boards:
[root@ss7 ~]# dahdi_hardware
pci:0000:05:00.0 wct4xxp+ d161:1405 Wildcard TE405P (5th Gen)
pci:0000:05:01.0 wct4xxp+ d161:0405 Wildcard TE405P (4th Gen)
pci:0000:05:02.0 wct4xxp+ d161:0405 Wildcard TE405P (4th Gen)

Three DIGIUM TE405 PCI slots are used.

System and software

Before starting this task, I searched a lot on the Internet for a better solution. Here’s a list that I found:

The choice fell on asterisk and chan_ss7 it is the easiest in my setup and very well displays debugs that are very necessary for such connections. The system was upgraded to Centos 5.5. Further DAHDI and Asterisk were assembled from the sourse after it downloaded chan_ss7-2.0.0 .

Connection setup

Streams have been filed through specials. modems to the server, you only need to connect a regular E1 cable. Dahdi config:
[root@ss7 asterisk]# cat /etc/dahdi/system.conf
span=1,1,0,ccs,hdb3,crc4
bchan=1-31
echocanceller=mg2,1-31

span=2,2,0,ccs,hdb3,crc4
bchan=32-62
echocanceller=mg2,32-62

span=3,3,0,ccs,hdb3,crc4
bchan=63-93
echocanceller=mg2,63-93

span=4,4,0,ccs,hdb3,crc4
bchan=94-124
echocanceller=mg2,94-124

span=5,5,0,ccs,hdb3,crc4
bchan=125-155
echocanceller=mg2,125-155

span=6,6,0,ccs,hdb3,crc4
bchan=156-186
echocanceller=mg2,156-186

span=7,7,0,ccs,hdb3,crc4
bchan=187-217
echocanceller=mg2,187-217

span=8,8,0,ccs,hdb3,crc4
bchan=218-248
echocanceller=mg2,218-248

span=9,9,0,ccs,hdb3,crc4
bchan=249-279
echocanceller=mg2,249-279

span=10,10,0,ccs,hdb3,crc4
bchan=280-310
echocanceller=mg2,280-310

span=11,11,0,ccs,hdb3,crc4
bchan=311-341
echocanceller=mg2,311-341

span=12,12,0,ccs,hdb3,crc4
bchan=342-372
echocanceller=mg2,342-372

loadzone = us
defaultzone = us


Config chan_ss7:
[root@ss7 ~]# cat /etc/asterisk/ss7.conf
[linkset-mtc]
enabled => yes
enable_st => yes
use_connect => no
hunting_policy => even_mru
context => ss7
language => ru
t35 => 15000,timeout
subservice => 8

[link-mtcl1]
linkset => mtc
channels => 2-31
schannel => 1
firstcic => 1
enabled => yes
echocancel => allways
echocan_train => 350
echocan_taps => 128

[link-mtcl2]
linkset => mtc
channels => 1-31
schannel =>
firstcic => 33
enabled => yes
echocancel => allways
echocan_train => 350
echocan_taps => 128

[link-mtcl3]
linkset => mtc
channels => 1-31
schannel =>
firstcic => 65
enabled => yes
echocancel => allways
echocan_train => 350
echocan_taps => 128

[link-mtcl4]
linkset => mtc
channels => 1-31
schannel =>
firstcic => 97
enabled => yes
echocancel => allways
echocan_train => 350
echocan_taps => 128

[link-mtcl5]
linkset => mtc
channels => 1-31
schannel =>
firstcic => 129
enabled => yes
echocancel => allways
echocan_train => 350
echocan_taps => 128

[link-mtcl6]
linkset => mtc
channels => 1-31
schannel =>
firstcic => 161
enabled => yes
echocancel => allways
echocan_train => 350
echocan_taps => 128

[link-mtcl7]
linkset => mtc
channels => 1-31
schannel =>
firstcic => 193
enabled => yes
echocancel => allways
echocan_train => 350
echocan_taps => 128

[link-mtcl8]
linkset => mtc
channels => 1-31
schannel =>
firstcic => 225
enabled => yes
echocancel => allways
echocan_train => 350
echocan_taps => 128

[link-mtcl9]
linkset => mtc
channels => 1-31
schannel =>
firstcic => 257
enabled => yes
echocancel => allways
echocan_train => 350
echocan_taps => 128

[link-mtcl10]
linkset => mtc
channels => 1-31
schannel =>
firstcic => 289
enabled => yes
echocancel => allways
echocan_train => 350
echocan_taps => 128

[link-mtcl11]
linkset => mtc
channels => 1-31
schannel =>
firstcic => 321
enabled => yes
echocancel => allways
echocan_train => 350
echocan_taps => 128

[link-mtcl12]
linkset => mtc
channels => 1-31
schannel =>
firstcic => 353
enabled => yes
echocancel => allways
echocan_train => 350
echocan_taps => 128

[host-ss7.host.ru]
enabled => yes
opc => 0x62
dpc => mtc:0x0d
links => mtcl1:1,mtcl2:2,mtcl3:3,mtcl4:4,mtcl5:5,mtcl6:6,mtcl7:7,mtcl8:8,mtcl9:9,mtcl10:10,mtcl11:11,mtcl12:12


Problems and solutions

1) How to connect streams (physically):
When connecting physical links, you need to synchronously plug them into port 1 of the GTS - 1 DIGUM, 2 -2 ... this was the first problem because the streams were first switched on as hit.
2) CRC4 - GTS on day 3 of the settings said that their CRC4 was turned off when I had DIGIUM turned on and affected the operation of the signal channel. I do not know how it happened I think that this is also for modems, so I asked the CTA to enable CRC4.
Log: [May 24 11:46:48] NOTICE[6229] mtp.c: Failover not possible, no other signalling link and no other host available.
[May 24 11:46:48] WARNING[6229] chan_ss7.c: MTP is now DOWN on link 'mtcl1'.
[May 24 11:46:50] WARNING[6229] chan_ss7.c: MTP is now UP on link 'mtcl1'.
[May 24 11:46:50] NOTICE[6229] mtp.c: Sending TRA to peer on link 'mtcl1'....
[May 24 11:46:48] NOTICE[6229] mtp.c: Failover not possible, no other signalling link and no other host available.
[May 24 11:46:48] WARNING[6229] chan_ss7.c: MTP is now DOWN on link 'mtcl1'.
[May 24 11:46:50] WARNING[6229] chan_ss7.c: MTP is now UP on link 'mtcl1'.
[May 24 11:46:50] NOTICE[6229] mtp.c: Sending TRA to peer on link 'mtcl1'....

3) When connecting more than one stream, usually only one signal link is used that is selected for this in the first stream. Therefore, in my link-mtcl1 settings, schannel => 1 is specified and voice channels are from 2 to 31 and the remaining streams are used for voice from 1 to 31 (all).
')
Testing

Signal Link Status Check:
*CLI> ss7 link status
linkset mtc, link mtcl1/1 INSERVICE, sls 0, total: 3173888, 3173904

Check channel status:
ss7*CLI> ss7 show channels
Linkset: mtc
CIC 2 Idle
CIC 3 Idle
CIC 4 Idle
.
.
.
CIC 382 Idle
CIC 383 Idle

The maximum number of channels that I managed to catch:
root@ss7 ~]# asterisk -rx "core show channels"
….
1069 active channels
362 active calls


PS If you need details on setting up or write help :)

Source: https://habr.com/ru/post/124325/


All Articles