Metainformationen zur Seite
Lancom als SBC
Dieser Artikel ist noch unvollständig!
Für Telekom-Trunks bietet es sich an, einen Lancom-Router als SBC zu betreiben.
Lancom-Konfiguration
Der Telekom-SIP-Trunk kann per Assistent eingerichtet werden.
Weiterhin muss im Call-Router eine eingehende Route für alle Anrufe (#
) zur UCware und eine ausgehende Route zum Telekom-SIP-Trunk eingerichtet werden. Zusätzlich ist ein 1:1 SIP-Mapping von allen gewählten Rufnummern (#
) auf #
nötig.
Gateway-Konfiguration
In den erweiterten Einstellungen für das Gateway muss fromdomain = intern
gesetzt werden.
Durchwahl übermitteln
Lancom-Router erwarten die Durchwahl als P-Preferred-Identity-Header. Dazu in der /etc/ucware/ucware.php
Quirks aktivieren ($QUIRKS = true;
) und die folgende Datei auf der Anlage anlegen.
- /etc/ucware/asterisk/quirks-enabled/lancom.lua
local Channel = require 'core.channel' local Log = require 'core.logger' local realm = "intern" --- Add the P-Preferred-Identity SIP header. -- @param self caller object -- @param extension callee extension -- @param gateway gateway object with the following fields, {type, grpId, id, allowOut, extsource, host, name, title, dailstring} return function(self, extension, gateway) -- get callerid from channel local callerid = Channel["CALLERID(num)"] or 'anonymous' app.sipremoveheader("P-Preferred-Identity") app.sipaddheader(("P-Preferred-Identity: <sip:%s@%s>"):format(callerid, realm)) end
Troubleshooting
- Registrierung wird mit 401 Unauthorized abgelehnt: Im Voice Call Manager des Lancom-Routers Lokale Authentifizierung erzwingen deaktivieren
Beispielkonfiguration
Das folgende Lancom-Konfigurationsskript kann als Basis für eine eigene Konfiguration genutzt werden.
- callmanager.lcs
# Script (10.20.0175 / 27.09.2018) (0x0420011c,IDs:2,3,4,8,15,1a,2b;0x00000003) lang English flash No set /Setup/Voice-Call-Manager/Operating Yes set /Setup/Voice-Call-Manager/General/Overlap-Timeout 3 set /Setup/Voice-Call-Manager/General/Local-authentication No set /Setup/Voice-Call-Manager/General/Country Germany set /Setup/Voice-Call-Manager/Users/SIP-User/Extern-Cln-Prefix "0" cd /Setup/Voice-Call-Manager/Users/ISDN-User/Interfaces # Name Ifc Active Area-Code Comment # =======----------------------------------------------------------------------------------------------------- set "ISDN" {Ifc} S0-1 {Active} Yes {Area-Code} "0351" {Comment} "" cd / cd /Setup/Voice-Call-Manager/Users/ISDN-User/Users del * # Number/Name MSN/DDI Ifc Display-Name Auth-Name Secret Domain Device-Type DialCompl CLIR Parallel-Call Active Comment # =============================================---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- add "123#" "123#" {Ifc} S0-1 {Display-Name} "" {Auth-Name} "" {Secret} "" {Domain} "" {Device-Type} Auto {DialCompl} Manual {CLIR} No {Parallel-Call} No {Active} Yes {Comment} "" add "DEFAULT" "#" {Ifc} S0-1 {Display-Name} "" {Auth-Name} "" {Secret} "" {Domain} "" {Device-Type} Auto {DialCompl} Manual {CLIR} No {Parallel-Call} No {Active} Yes {Comment} "" cd / cd /Setup/Voice-Call-Manager/Lines/SIP-Provider/Line del * # Name Mode Domain Rtg-tag Port User-id Auth-Name Display-Name Secret Registrar Cln-Prefix Number/Name Refer-forwarding Local-Port (Re)Registration Registration-interval Line-control-method Line-control-interval Trusted Privacy-Method User-Id-Field remove-FROM-usertype Active Trunk-Inc-Cld-In-ToHeader Dtmf-Method Transport Fallback Verify-Server-Certificate SRTP SRTP-Ciphers SRTP-Message-Auth-Tags Strict-Mode Allow-Inbound-UDP-From Overlap-Dialing Loopback-Address Allow-SIP302-Forwarding Comment # ===================================-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- add "WIZ_T-123" {Mode} trunk {Domain} "sip-trunk.telekom.de" {Rtg-tag} 401 {Port} 5060 {User-id} "+49123" {Auth-Name} "55123" {Display-Name} "" {Secret} "geheim" {Registrar} "reg.sip-trunk.telekom.de" {Cln-Prefix} "" {Number/Name} "123" {Refer-forwarding} No {Local-Port} 0 {(Re)Registration} Yes {Registration-interval} 480 {Line-control-method} Auto {Line-control-interval} 60 {Trusted} Yes {Privacy-Method} RFC3325 {User-Id-Field} PPI {remove-FROM-usertype} No {Active} Yes {Trunk-Inc-Cld-In-ToHeader} No {Dtmf-Method} RTP-Event {Transport} TCP {Fallback} No {Verify-Server-Certificate} Telekom-Shared-Business-CA4 {SRTP} Ignore {SRTP-Ciphers} AES-CM-128,AES-CM-192,AES-CM-256,F8-128 {SRTP-Message-Auth-Tags} HMAC-SHA1-32,HMAC-SHA1-80 {Strict-Mode} Yes {Allow-Inbound-UDP-From} LAN,VPN,WAN {Overlap-Dialing} No {Loopback-Address} "" {Allow-SIP302-Forwarding} No {Comment} "" cd / cd /Setup/Voice-Call-Manager/Lines/SIP-Provider/Mapping del * # SIP-Provider Ext-Number/Name Number/Name Length CLIR Active Comment # ================================================================================---------------------------------------------------------------------------------------- add "WIZ_T-315529" "#" "#" {Length} 0 {CLIR} No {Active} Yes {Comment} "" cd / cd /Setup/Voice-Call-Manager/Lines/SIP-PBX/PBX del * # Name Domain Rtg-tag Port Secret Registrar Cln-Prefix Line-Prefix Local-Port (Re)Registration Line-control-method Line-control-interval Trusted Privacy-Method Active Dtmf-Method Strict-Mode Allow-Inbound-UDP-From Comment # ===================-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- add "UCWARE" {Domain} "intern" {Rtg-tag} 0 {Port} 5060 {Secret} "" {Registrar} "172.17.2.1" {Cln-Prefix} "" {Line-Prefix} "" {Local-Port} 0 {(Re)Registration} No {Line-control-method} Auto {Line-control-interval} 60 {Trusted} Yes {Privacy-Method} RFC3325 {Active} Yes {Dtmf-Method} RTP-Event {Strict-Mode} Yes {Allow-Inbound-UDP-From} LAN {Comment} "" cd / cd /Setup/Voice-Call-Manager/Lines/ISDN/Interfaces # Name Ifc Domain Cln-Prefix Active Comment # ===================------------------------------------------------------------------------------------------------------------------------------------------------------------- set "ISDN" {Ifc} S0-1 {Domain} "isdn" {Cln-Prefix} "" {Active} No {Comment} "" cd / cd /Setup/Voice-Call-Manager/Call-Router/Call-Routing del * # Called-Id Cld-Domain Calling-Id Cln-Domain Src-Line Dest-Calling-Id Dest-Id-1 Dest-Line-1 Dest-Id-2 Dest-Line-2 Dest-Id-3 Dest-Line-3 Prio Active Comment # ===================================================================================================================================================================================================================---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- add "#" "" "+49#" "" "WIZ_T-123" {Dest-Calling-Id} "0#" {Dest-Id-1} "#" {Dest-Line-1} "UCWARE" {Dest-Id-2} "" {Dest-Line-2} "" {Dest-Id-3} "" {Dest-Line-3} "" {Prio} 4 {Active} Yes {Comment} "" add "#" "" "0049#" "" "WIZ_T-123" {Dest-Calling-Id} "0#" {Dest-Id-1} "#" {Dest-Line-1} "UCWARE" {Dest-Id-2} "" {Dest-Line-2} "" {Dest-Id-3} "" {Dest-Line-3} "" {Prio} 4 {Active} Yes {Comment} "" add "#" "" "" "" "WIZ_T-123" {Dest-Calling-Id} "" {Dest-Id-1} "#" {Dest-Line-1} "UCWARE" {Dest-Id-2} "" {Dest-Line-2} "" {Dest-Id-3} "" {Dest-Line-3} "" {Prio} 3 {Active} Yes {Comment} "Eingehende Anrufe" add "00#" "" "" "" "" {Dest-Calling-Id} "" {Dest-Id-1} "+#" {Dest-Line-1} "WIZ_T-123" {Dest-Id-2} "" {Dest-Line-2} "" {Dest-Id-3} "" {Dest-Line-3} "" {Prio} 0 {Active} Yes {Comment} "Auslandsgespraech" add "0#" "" "" "" "" {Dest-Calling-Id} "" {Dest-Id-1} "+49#" {Dest-Line-1} "WIZ_T-123" {Dest-Id-2} "" {Dest-Line-2} "" {Dest-Id-3} "" {Dest-Line-3} "" {Prio} 0 {Active} Yes {Comment} "Inlandsgespraech" add "110" "" "" "" "" {Dest-Calling-Id} "" {Dest-Id-1} "110" {Dest-Line-1} "WIZ_T-123" {Dest-Id-2} "" {Dest-Line-2} "" {Dest-Id-3} "" {Dest-Line-3} "" {Prio} 0 {Active} Yes {Comment} "Notruf" add "112" "" "" "" "" {Dest-Calling-Id} "" {Dest-Id-1} "112" {Dest-Line-1} "WIZ_T-123" {Dest-Id-2} "" {Dest-Line-2} "" {Dest-Id-3} "" {Dest-Line-3} "" {Prio} 0 {Active} Yes {Comment} "Notruf" add "#" "" "" "" "" {Dest-Calling-Id} "" {Dest-Id-1} "+49351#" {Dest-Line-1} "WIZ_T-123" {Dest-Id-2} "" {Dest-Line-2} "" {Dest-Id-3} "" {Dest-Line-3} "" {Prio} 0 {Active} Yes {Comment} "Ortsgespraech" cd / flash Yes # done exit