当前位置: 首页 > 工具软件 > libss7 > 使用案例 >

asterisk+Libss7的配置

夹谷成龙
2023-12-01

转自:http://wanchengbuyi.blog.163.com/blog/static/16646183120106217357502/

Libss7的安装过程很简单,一般的步骤如下:

1. dahdi kernel install
2. dahdi tool install
3. libss7
4. asterisk

libss7安装后再编译asterisk。

这里就不再详述安装过程了。只说一下配置。

Elastix 1.6

==============system.conf==================

system.comf

# Autogenerated by /usr/sbin/dahdi_genconf on Tue Jun 1 10:15:52 2010
# If you edit this file and execute /usr/sbin/dahdi_genconf again,
# your manual changes will be LOST.
# Dahdi Configuration File
#
# This file is parsed by the Dahdi Configurator, dahdi_cfg
#
# Span 1: WCT1/0 "Digium Wildcard TE110P T1/E1 Card 0" (MASTER)
span=1,1,0,ccs,hdb3
# termtype: te
bchan=1-15,17-31
mtp2=16
#dchan=16
#echocanceller=oslec,1-15,17-31

# Global data

loadzone = us
defaultzone = us

=================chan_dahdi.conf=======================

; Auto-generated by /usr/sbin/hardware_detector
[trunkgroups]

[channels]
context=from-pstn
usecallerid=yes
callwaiting=yes
usecallingpres=yes
callwaitingcallerid=yes
threewaycalling=yes
transfer=yes
canpark=yes
cancallforward=yes
callreturn=yes
echocancel=no
echocancelwhenbridged=no
group=1
callgroup=1
pickupgroup=1

prilocaldialplan=national
signalling = ss7
ss7type = itu
linkset = 1
networkindicator=national
ss7_calling_nai=national
ss7_internationalprefix = 00
ss7_nationalprefix =

pointcode = 4251
adjpointcode = 3172
defaultdpc = 3172

cicbeginswith = 1
channel => 1-15
cicbeginswith = 17
channel => 17-31
sigchan = 16

========================================

elastix*CLI> dahdi show channels
Chan Extension Context Language MOH Interpret Blocked State
pseudo default default In Service
1 from-pstn default In Service
2 from-pstn default In Service
3 from-pstn default In Service
4 from-pstn default In Service
5 from-pstn default In Service
6 from-pstn default In Service
7 from-pstn default In Service
8 from-pstn default In Service
9 from-pstn default In Service
10 from-pstn default In Service
11 from-pstn default In Service
12 from-pstn default In Service
13 from-pstn default In Service
14 from-pstn default In Service
15 from-pstn default In Service
17 from-pstn default In Service
18 from-pstn default In Service
19 from-pstn default In Service
20 from-pstn default In Service
21 from-pstn default In Service
22 from-pstn default In Service
23 from-pstn default In Service
24 from-pstn default In Service
25 from-pstn default In Service
26 from-pstn default In Service
27 from-pstn default In Service
28 from-pstn default In Service
29 from-pstn default In Service
30 from-pstn default In Service
31 from-pstn default In Service
elastix*CLI>

=========================================
elastix*CLI> ss7 show linkset 1
SS7 linkset 1 status: Up

=========================================

elastix*CLI> ss7 show version
libss7 version: 1.0.2
=========================================
elastix*CLI> dahdi show version
DAHDI Version: 2.3.0.1 Echo Canceller:
elastix*CLI>
=========================================

[root@elastix asterisk]# asterisk -V
Asterisk 1.6.2.7

=========================================

[root@elastix asterisk]# dahdi_hardware
pci:0000:03:04.0 wcte11xp+ e159:0001 Digium Wildcard TE110P T1/E1 Board
[root@elastix asterisk]# dahdi_scan
[1]
active=yes
alarms=OK
description=Digium Wildcard TE110P T1/E1 Card 0
name=WCT1/0
manufacturer=Digium
devicetype=Digium Wildcard TE110P T1/E1
location=PCI Bus 03 Slot 05
basechan=1
totchans=31
irq=50
type=digital-E1
syncsrc=0
lbo=0 db (CSU)/0-133 feet (DSX-1)
coding_opts=HDB3
framing_opts=CCS,CRC4
coding=HDB3
framing=CCS
[root@elastix asterisk]#
[root@elastix asterisk]# cat /proc/interrupts
CPU0 CPU1
0: 4383015 3673819 IO-APIC-edge timer
1: 3 0 IO-APIC-edge i8042
7: 0 0 IO-APIC-edge parport0
8: 2 1 IO-APIC-edge rtc
9: 0 0 IO-APIC-level acpi
12: 2 2 IO-APIC-edge i8042
50: 3653294 4362231 IO-APIC-level wcte11xp
169: 97 92 IO-APIC-level uhci_hcd:usb5, HDA Intel
209: 0 0 IO-APIC-level uhci_hcd:usb4
217: 255439 255968 IO-APIC-level ehci_hcd:usb1, uhci_hcd:usb2
225: 54284 53932 IO-APIC-level uhci_hcd:usb3, ata_piix
233: 43302 0 PCI-MSI eth1
NMI: 0 0
LOC: 6709135 6709141
ERR: 0
MIS: 0
[root@elastix asterisk]#

==================extensions.conf============================

[from-in]
exten => 1,1,Dial(dahdi/g1/97xxxxxx)
exten => 1,n,Hangup()

==================sip.conf=================================

[100]
type=friend
username=100
secret=100
host=dynamic
context=from-in

========================================================

最开始dialplan是这样写的

exten => 1,1,Dial(dahdi/g1/10086)

结果一直打不通电话


控制台显示如下信息
===============================================
-- Executing [1@from-in:1] Dial("SIP/100-00000001", "dahdi/g1/10086") in new stack
-- Called g1/10086
-- Hungup 'DAHDI/1-1'
== Everyone is busy/congested at this time (1:0/0/1)
-- Executing [1@from-in:2] Hangup("SIP/100-00000001", "") in new stack
== Spawn extension (from-in, 1, 2) exited non-zero on 'SIP/100-00000001'

===============================================

因为此线路打不通10086,最后把dialplan改为:

exten => 1,1,Dial(dahdi/g1/97xxxxxx)

问题解决了。

以下为通话时的debug 信息

===========================================

-- Executing [1@from-in:1] Dial("SIP/100-00000000", "dahdi/g1/97xxxxxx") in new stack
-- Called g1/97577129
-- DAHDI/1-1 is proceeding passing it to SIP/100-00000000
-- DAHDI/1-1 is ringing
-- Hungup 'DAHDI/1-1'
== Spawn extension (from-in, 1, 1) exited non-zero on 'SIP/100-00000000'
-- Remote UNIX connection
-- Remote UNIX connection disconnected
== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
== Using SIP VRTP TOS bits 136
== Using SIP VRTP CoS mark 6
== Using UDPTL TOS bits 184
== Using UDPTL CoS mark 5
-- Executing [1@from-in:1] Dial("SIP/100-00000001", "dahdi/g1/97xxxxxx") in new stack
-- Called g1/97577129
-- DAHDI/1-1 is proceeding passing it to SIP/100-00000001
-- DAHDI/1-1 is ringing
-- DAHDI/1-1 answered SIP/100-00000001
-- Hungup 'DAHDI/1-1'
== Spawn extension (from-in, 1, 1) exited non-zero on 'SIP/100-00000001'
elastix*CLI> !

Powered by Zoundry Raven

 类似资料: