How To Libss7
How To Libss7
This How-To guide shows how to make a basic SS7 connection between two systems using a Sangoma Digital card (aka A10X series of cards). This guide was written using the following versions, other versions might work but there are no guarantees that they will compile against each other: -Asterisk-1.6.0.6 -LibSS7-1.0.2 -Dahdi-Linux-2.1.0.4 -Dahdi-Tools-2.1.0.2 -Wanpipe-3.3.16 Written by: Konrad Hammel [email protected]
Table of Contents:
1.) Installing all the Programs 2.) Configuring Wanpipe, Dahdi, and Asterisk 3.) Sample files for Back-to-Back Connection of Two Test Systems
to: ;Sangoma A102 port 1 [slot:2 bus:6 span:1] <wanpipe1> context=from-pstn group=0 echocancel=no signaling=ss7 ;this is ss7 signaling ss7type=itu ;using the ITU variant ss7_called_nai=dynamic ;NAI for outgoing calls ss7_calling_nai=dynamic ;NAI for incoming calls ss7_internationalprefix=00 ;international prefix value for incoming calls ss7_nationalprefix=0 ;national prefix value for incoming calls ss7_subscriberprefix= ;subscriber prefix value for incoming calls ss7_unknownprefix= ;unknown prefix value for incoming calls ss7_explictacm=yes ;ACM is send as soon as call enters the dial plan...may not accepted yet though linkset=1 ;arbitrary name for this set of channels pointcode=2 ;the point code for this system...aka SPC adjpointcode=1 ;the point code for the system that we are signaling to... aka APC defaultdpc=1 ;the point code for the system that the CICs will be negotiated with...aka DPC networkindicator=international ;NI value for MTP3 cicbeginswith=1 ;the starting value of the CICs channel=2-31 ;the channels that are CICs sigchan=1 ;the signaling channel 6. Restart Asterisk and Wanrouter asterisk rx stop now wanrouter restart asterisk asterisk r
------------------------------------------------------Wanpipe1.conf for System A-----------------------------------------------------#================================================ # WANPIPE1 Configuration File #================================================ # # Date: Wed Dec 6 20:29:03 UTC 2006 # # Note: This file was generated automatically # by /usr/local/sbin/setup-sangoma program. # # If you want to edit this file, it is # recommended that you use wancfg program # to do so. #================================================ # Sangoma Technologies Inc. #================================================ [devices] wanpipe1 = WAN_AFT_TE1, Comment [interfaces] w1g1 = wanpipe1, , TDM_VOICE, Comment [wanpipe1] CARD_TYPE = AFT S514CPU =A CommPort = PRI AUTO_PCISLOT = NO PCISLOT = 2 < --------- must be changed for your system PCIBUS = 6 < --------- must be changed for your system FE_MEDIA = E1 FE_LCODE = HDB3 FE_FRAME = CRC4 FE_LINE =1 TE_CLOCK = MASTER TE_REF_CLOCK = 0 TE_SIG_MODE = CCS TE_HIGHIMPEDANCE = NO LBO = 120OH FE_TXTRISTATE = NO MTU = 1500 UDPPORT = 9000 TTL = 255 IGNORE_FRONT_END = NO TDMV_SPAN =1 TDMV_DCHAN = 0 TDMV_HW_DTMF = NO [w1g1] ACTIVE_CH = ALL TDMV_ECHO_OFF = NO TDMV_HWEC = NO ------------------------------------------------------Wanpipe1.conf for System A ------------------------------------------------------
------------------------------------------------------system.conf for System A ---------------------------------------------------------#autogenerated by /usr/sbin/wancfg_dahdi do not hand edit #autogenrated on 2009-03-15 #Dahdi Channels Configurations #For detailed Dahdi options, view /etc/dahdi/system.conf.bak loadzone=us defaultzone=us #Sangoma A102 port 1 [slot:2 bus:6 span:1] <wanpipe1> span=1,0,0,ccs,hdb3,crc4 bchan=2-31 mtp2=1 ------------------------------------------------------system.conf for System A ----------------------------------------------------------
------------------------------------------------------chan_dahdi.conf for System A ---------------------------------------------------;autogenerated by /usr/sbin/wancfg_dahdi do not hand edit ;autogenrated on 2009-03-15 ;Dahdi Channels Configurations ;For detailed Dahdi options, view /etc/asterisk/chan_dahdi.conf.bak [trunkgroups] [channels] context=default usecallerid=yes hidecallerid=no callwaiting=yes usecallingpres=yes callwaitingcallerid=yes threewaycalling=yes transfer=yes canpark=yes cancallforward=yes callreturn=yes echocancel=yes echocancelwhenbridged=yes relaxdtmf=yes rxgain=0.0 txgain=0.0 group=1 callgroup=1 pickupgroup=1 immediate=no context=from-pstn group=0 echocancel=no signalling=ss7 ;this is ss7 signalling ss7type=itu ;using the ITU variant ss7_called_nai=dynamic ;NAI for outgoing calls ss7_calling_nai=dynamic ;NAI for incoming calls ss7_internationalprefix=00 ;internation prefix value for incoming calls ss7_nationalprefix=0 ;national prefix value for incoming calls ss7_subscriberprefix= ;subscriber prefix value for incoming calls ss7_unknownprefix= ;unknown prefix value for incoming calls ss7_explictacm=yes ;ACM is send as soon as call enters the dialplan...may not accepted yet though linkset=1 ;arbitary name for this set of channels pointcode=2 ;the point code for this system...aka SPC adjpointcode=1 ;the point code for the system that we are signalling to... aka APC defaultdpc=1 ;the point code for the system that the CICs will be negoiated with...aka DPC networkindicator=international ;NI value for MTP3 cicbeginswith=1 ;the starting value of the CICs channel=2-31 ;the channels that are CICs sigchan=1 ;the signalling channel ------------------------------------------------------chan_dahdi.conf for System A ----------------------------------------------------
------------------------------------------------------extension.conf for System A ------------------------------------------------------[from-sip] exten => _X.,1,answer() ;exten => _X.,n,playback(demo-congrats) exten => _X.,n,dial(dahdi/g0/123456789) exten => _X.,n,hangup() [from-pstn] exten => _X.,1,answer() exten => _X.,n,playback(demo-congrats) ;exten => _X.,n,dial(dahdi/g0/123456789) exten => _X.,n,hangup() ------------------------------------------------------extension.conf for System A -------------------------------------------------------
------------------------------------------------------Wanpipe1.conf for System B -----------------------------------------------------#================================================ # WANPIPE1 Configuration File #================================================ # # Date: Wed Dec 6 20:29:03 UTC 2006 # # Note: This file was generated automatically # by /usr/local/sbin/setup-sangoma program. # # If you want to edit this file, it is # recommended that you use wancfg program # to do so. #================================================ # Sangoma Technologies Inc. #================================================ [devices] wanpipe1 = WAN_AFT_TE1, Comment [interfaces] w1g1 = wanpipe1, , TDM_VOICE, Comment [wanpipe1] CARD_TYPE = AFT S514CPU =A CommPort = PRI AUTO_PCISLOT = NO PCISLOT = 2 < --------- must be changed for your system PCIBUS = 6 < --------- must be changed for your system FE_MEDIA = E1 FE_LCODE = HDB3 FE_FRAME = CRC4 FE_LINE =1 TE_CLOCK = NORMAL TE_REF_CLOCK = 0 TE_SIG_MODE = CCS TE_HIGHIMPEDANCE = NO LBO = 120OH FE_TXTRISTATE = NO MTU = 1500 UDPPORT = 9000 TTL = 255 IGNORE_FRONT_END = NO TDMV_SPAN =1 TDMV_DCHAN = 0 TDMV_HW_DTMF = NO [w1g1] ACTIVE_CH = ALL TDMV_ECHO_OFF = NO TDMV_HWEC = NO ------------------------------------------------------Wanpipe1.conf for System B ------------------------------------------------------
------------------------------------------------------system.conf for System B ---------------------------------------------------------#autogenerated by /usr/sbin/wancfg_dahdi do not hand edit #autogenrated on 2009-03-15 #Dahdi Channels Configurations #For detailed Dahdi options, view /etc/dahdi/system.conf.bak loadzone=us defaultzone=us span=1,0,0,ccs,hdb3,crc4 bchan=2-31 mtp2=1 ------------------------------------------------------system.conf for System B ----------------------------------------------------------
------------------------------------------------------chan_dahdi.conf for System B ---------------------------------------------------;autogenerated by /usr/sbin/wancfg_dahdi do not hand edit ;autogenrated on 2009-03-15 ;Dahdi Channels Configurations ;For detailed Dahdi options, view /etc/asterisk/chan_dahdi.conf.bak [trunkgroups] [channels] context=default usecallerid=yes hidecallerid=no callwaiting=yes usecallingpres=yes callwaitingcallerid=yes threewaycalling=yes transfer=yes canpark=yes cancallforward=yes callreturn=yes echocancel=yes echocancelwhenbridged=yes relaxdtmf=yes rxgain=0.0 txgain=0.0 group=1 callgroup=1 pickupgroup=1 immediate=no context=from-pstn group=0 echocancel=no signalling=ss7 ;this is ss7 signalling ss7type=itu ;using the ITU variant ss7_called_nai=dynamic ;NAI for outgoing calls ss7_calling_nai=dynamic ;NAI for incoming calls ss7_internationalprefix=00 ;internation prefix value for incoming calls ss7_nationalprefix=0 ;national prefix value for incoming calls ss7_subscriberprefix= ;subscriber prefix value for incoming calls ss7_unknownprefix= ;unknown prefix value for incoming calls ss7_explictacm=yes ;ACM is send as soon as call enters the dialplan...may not accepted yet though linkset=1 ;arbitary name for this set of channels pointcode=1 ;the point code for this system...aka SPC adjpointcode=2 ;the point code for the system that we are signalling to... aka APC defaultdpc=2 ;the point code for the system that the CICs will be negoiated with...aka DPC networkindicator=international ;NI value for MTP3 cicbeginswith=1 ;the starting value of the CICs channel=2-31 ;the channels that are CICs sigchan=1 ;the signalling channel ------------------------------------------------------chan_dahdi.conf for System B ----------------------------------------------------
------------------------------------------------------extension.conf for System B ------------------------------------------------------[from-sip] exten => _X.,1,answer() ;exten => _X.,n,playback(demo-congrats) exten => _X.,n,dial(dahdi/g0/123456789) exten => _X.,n,hangup() [from-pstn] exten => _X.,1,answer() exten => _X.,n,playback(demo-congrats) ;exten => _X.,n,dial(dahdi/g0/123456789) exten => _X.,n,hangup() ------------------------------------------------------extension.conf for System B -------------------------------------------------------