Update Debian Sarge auf Etch und CAPI

joe-voip

Neuer User
Mitglied seit
20 Apr 2004
Beiträge
55
Punkte für Reaktionen
0
Punkte
0
Hallo,

ich hoffe mir kann jemand helfen.
Habe mein Debian Sarge auf Etch hochgezogen.
Läuftsoweit alles gut, Asterisk funktioniert auch bei den SIP Telefonen, jedoch bekomme ich keine Verbindung mehr zwischen SIP Telefon und ISDN hin.

Folgende Konfig:

- Asterisk 1.2.13
- chan_capi 0.7.1
- AVM B1 an einer Telefonanlage.
- Analoges Telefon an einem Grandstream ATA 286

Ich kann von einem Softphone mit der Nummer 303 den Aparat am ATA mit der 302 anrufen, klingelt und Gespräch geht.

Wenn ich jedoch von der ISDN Anlage aus die interne Nummer 172 wähle, sehe ich zwar in der Logdatei dass sich was tut, aber es klingelt nicht und wenn ich trotzdem abhebe, kommt kein Gespräch zustande. Weiß langsam nicht mehr wo ich suchen soll, anbei mal ein Ausschnitt aus dem Log und aus den Konfigs.

modules.conf
Code:
;
; Asterisk configuration file
;
; Module Loader configuration file
;

[modules]
autoload=yes
;
; If you want, load the GTK console right away.  
; Don't load the KDE console since
; it's not as sophisticated right now.
;
noload => pbx_gtkconsole.so
;load => pbx_gtkconsole.so
noload => pbx_kdeconsole.so
;
; Intercom application is obsoleted by
; chan_oss.  Don't load it.
;
noload => app_intercom.so
;
;
; Load either OSS or ALSA, not both
; By default, load OSS only (automatically) and do not load ALSA
;
noload => chan_alsa.so
noload => chan_oss.so
noload => chan_zap.so
;

; joe
load => res_features.so
load => chan_capi.so
load => res_musiconhold.so

; Module names listed in "global" section will have symbols globally
; exported to modules loaded after them.
;

[global]
chan_capi.so=yes

capi.conf
Code:
;
; CAPI config
;
;
[general]
nationalprefix=0
internationalprefix=00
rxgain=0.8
txgain=0.8
isdnmode=MSN     ;'MSN' (point-to-multipoint) or 'DID' (direct inward dial)
immediate=yes

[ISDN1]

;test
msn=170
incomingmsn=170
controller=1
softdtmf=1
accountcode=
context=default
echocancel=yes
;echotail=64
;callgroup=1
;deflect=12345678
devices=2

;test1
msn=171
incomingmsn=171
controller=1
softdtmf=1
accountcode=
context=default
echocancel=yes
;echotail=64
;callgroup=1
;deflect=12345678
devices=2

;test2
msn=172
incomingmsn=172
controller=1
softdtmf=1
accountcode=
context=default
echocancel=yes
;echotail=64
;callgroup=1
;deflect=12345678
devices=2

sip.conf
Code:
;
; SIP Configuration for Asterisk
;
; Syntax for specifying a SIP device in extensions.conf is
; SIP/devicename where devicename is defined in a section below.
;
; You may also use 
; SIP/username@domain to call any SIP user on the Internet
; (Don't forget to enable DNS SRV records if you want to use this)
; 
; If you define a SIP proxy as a peer below, you may call
; SIP/proxyhostname/user or SIP/user@proxyhostname 
; where the proxyhostname is defined in a section below 
; 
; Useful CLI commands to check peers/users:
;   sip show peers		Show all SIP peers (including friends)
;   sip show users		Show all SIP users (including friends)
;   sip show registry		Show status of hosts we register with
;
;   sip debug			Show all SIP messages
;

[general]
context=default			; Default context for incoming calls
;recordhistory=yes		; Record SIP history by default 
				; (see sip history / sip no history)
;realm=mydomain.tld		; Realm for digest authentication
				; defaults to "asterisk"
				; Realms MUST be globally unique according to RFC 3261
				; Set this to your host name or domain name
port=5060			; UDP Port to bind to (SIP standard port is 5060)
bindaddr=0.0.0.0		; IP address to bind to (0.0.0.0 binds to all)
srvlookup=yes			; Enable DNS SRV lookups on outbound calls
				; Note: Asterisk only uses the first host 
				; in SRV records
				; Disabling DNS SRV lookups disables the 
				; ability to place SIP calls based on domain 
				; names to some other SIP users on the Internet
				
;pedantic=yes			; Enable slow, pedantic checking for Pingtel
				; and multiline formatted headers for strict
				; SIP compatibility (defaults to "no")
;tos=184                        ; Set IP QoS to either a keyword or numeric val
;tos=lowdelay                   ; lowdelay,throughput,reliability,mincost,none
;maxexpirey=3600		; Max length of incoming registration we allow
;defaultexpirey=120		; Default length of incoming/outoing registration
;notifymimetype=text/plain	; Allow overriding of mime type in MWI NOTIFY
;videosupport=yes		; Turn on support for SIP video

;disallow=all			; First disallow all codecs
;allow=ulaw			; Allow codecs in order of preference
;allow=ilbc			; Note: codec order is respected only in [general]
;musicclass=default		; Sets the default music on hold class for all SIP calls
				; This may also be set for individual users/peers
language=de			; Default language setting for all users/peers
				; This may also be set for individual users/peers
;relaxdtmf=yes			; Relax dtmf handling
;rtptimeout=60			; Terminate call if 60 seconds of no RTP activity
				; when we're not on hold
;rtpholdtimeout=300		; Terminate call if 300 seconds of no RTP activity
				; when we're on hold (must be > rtptimeout)
;trustrpid = no			; If Remote-Party-ID should be trusted
;progressinband=no		; If we should generate in-band ringing always
;useragent=Asterisk PBX		; Allows you to change the user agent string
;nat=no				; NAT settings 
                                ; yes = Always ignore info and assume NAT
                                ; no = Use NAT mode only according to RFC3581 
                                ; never = Never attempt NAT mode or RFC3581 support
				; route = Assume NAT, don't send rport (work around more UNIDEN bugs)
;promiscredir = no      ; If yes, allows 302 or REDIR to non-local SIP address
;                       ; Note that promiscredir when redirects are made to the
;                       ; local system will cause loops since SIP is incapable
;                       ; of performing a "hairpin" call.
;
; If regcontext is specified, Asterisk will dynamically 
; create and destroy a NoOp priority 1 extension for a given
; peer who registers or unregisters with us.  The actual extension
; is the 'regexten' parameter of the registering peer or its
; name if 'regexten' is not provided.  More than one regexten may be supplied
; if they are separated by '&'.  Patterns may be used in regexten.
;
;regcontext=iaxregistrations
;
; Asterisk can register as a SIP user agent to a SIP proxy (provider)
; Format for the register statement is:
;       register => user[:secret[:authuser]]@host[:port][/extension]
;
; If no extension is given, the 's' extension is used. The extension
; needs to be defined in extensions.conf to be able to accept calls
; from this SIP proxy (provider)
;
; host is either a host name defined in DNS or the name of a 
; section defined below.
;
; Examples:
;
;register => 1234:[email protected]	
;
;     This will pass incoming calls to the 's' extension
;
;
;register => 2345:password@sip_proxy/1234
;
;    Register 2345 at sip provider 'sip_proxy'.  Calls from this provider connect to local 
;    extension 1234 in extensions.conf default context, unless you define 
;    unless you configure a [sip_proxy] section below, and configure a context.
;	 Tip 1: Avoid assigning hostname to a sip.conf section like [provider.com]
;        Tip 2: Use separate type=peer and type=user sections for SIP providers
;                      (instead of type=friend) if you have calls in both directions
  

;externip = 200.201.202.203	; Address that we're going to put in outbound SIP messages
				; if we're behind a NAT

				; The externip and localnet is used
				; when registering and communicating with other proxies
				; that we're registered with
				; You may add multiple local networks.  A reasonable set of defaults
				; are:
;localnet=192.168.0.0/255.255.0.0; All RFC 1918 addresses are local networks
;localnet=10.0.0.0/255.0.0.0	; Also RFC1918
;localnet=172.16.0.0/12		; Another RFC1918 with CIDR notation
;localnet=169.254.0.0/255.255.0.0 ;Zero conf local network

;-----------------------------------------------------------------------------------
; Users and peers have different settings available. Friends have all settings,
; since a friend is both a peer and a user
;
; User config options:        Peer configuration:
; --------------------        -------------------
; context                     context
; permit                      permit
; deny                        deny
; secret                      secret
; md5secret                   md5secret
; dtmfmode                    dtmfmode
; canreinvite                 canreinvite
; nat                         nat
; callgroup                   callgroup
; pickupgroup                 pickupgroup
; language                    language
; allow                       allow
; disallow                    disallow
; insecure                    insecure
; trustrpid                   trustrpid
; progressinband              progressinband
; promiscredir                promiscredir
; callerid
; accountcode
; amaflags
; incominglimit
; restrictcid
;                             mailbox
;                             username
;                             template
;                             fromdomain
;                             regexten
;                             fromuser
;                             host
;                             mask
;                             port
;                             qualify
;                             defaultip
;                             rtptimeout
;                             rtpholdtimeout

;[sip_proxy]
; For incoming calls only. Example: FWD (Free World Dialup)
;type=user
;context=from-fwd

;[sip_proxy-out]
;type=peer          		; we only want to call out, not be called
;secret=guessit
;username=yourusername		; Authentication user for outbound proxies
;fromuser=yourusername		; Many SIP providers require this!
;host=box.provider.com

;===============================================================
;===============================================================
;===============================================================

;[300]
;Pocket
;type=friend
;username=300
;secret=pass
;host=dynamic
;nat=no
;context=170      ; Inbound calls from this host go here
;dtmfmode=rfc2833 
;canreinvite=no 
;mailbox=101

[301]
;Test1/171
type=friend
username=301
secret=pass
host=dynamic
nat=no
context=171      ; Inbound calls from this host go here
dtmfmode=rfc2833 
canreinvite=no 
mailbox=101


[302]
;Test2/172
language=de
type=friend
username=302
secret=pass
host=dynamic
nat=no
context=172      ; Inbound calls from this host go here
dtmfmode=rfc2833 
canreinvite=no 
mailbox=102

[303]
;Test3/303
language=de
type=friend
username=303
secret=pass
host=dynamic
nat=no
context=default
dtmfmode=rfc2833 
canreinvite=no 
mailbox=103

extensions.conf
Code:
;
; Static extension configuration files, used by
; the pbx_config module.
;
; The "General" category is for certain variables.  
;
[general]
static=yes       ; These two lines prevent the command-line interface
writeprotect=yes ; from overwriting the config file. Leave them here.


[default]
language=de

;SIP Telefone die angerufen werden

;Pocket
;exten => 300,1,Dial(SIP/300,30)
exten => 300,1,Dial(IAX2/300,30)
;exten => 301,2,Voicemail(u300)
;exten => 301,102,Voicemail(b300)
;exten => 301,103,Hangup

;Test1
exten => 301,1,Dial(SIP/301,30)
;exten => 301,2,Voicemail(u301)
;exten => 301,102,Voicemail(b301)
;exten => 301,103,Hangup

;Test2
exten => 302,1,Dial(SIP/302,30)
;exten => 302,2,Voicemail(u302)
;exten => 302,102,Voicemail(b302)
;exten => 302,103,Hangup

;Test3
exten => 303,1,Dial(SIP/303,30)
;exten => 303,2,Voicemail(u303)
;exten => 303,102,Voicemail(b303)
;exten => 303,103,Hangup


;
; Define a way so that users can dial a number to reach
; voicemail. Call the VoicemailMain application with the
; number of the caller already passed as a variable, so
; all the user needs to do is type in the password.
;

exten => 999,1,VoicemailMain(${CALLERIDNUM})



;
; Dial IN ISDN/MSN Teilnehmer, dann Voicemail
; (Von der Telefonanlage zu Asterisk/SIP telefonen)
;=============================================

;Test
;exten => 170,1,Dial(SIP/300,30,Ttr) 
exten => 170,1,Dial(IAX2/300,30,Ttr) 
;exten => 170,2,Voicemail(u300)
;exten => 170,102,Voicemail(b300)
;exten => 170,103,Hangup

;Test1
exten => 171,1,Dial(SIP/301,30,Ttr) 
;exten => 171,2,Voicemail(u301)
;exten => 171,102,Voicemail(b301)
;exten => 171,103,Hangup

;Test2
exten => 172,1,Dial(SIP/302,30,Ttr) 

;exten => 172,2,Voicemail(u302)
;exten => 172,102,Voicemail(b302)
;exten => 172,103,Hangup



; SIP ueber ISDN => zur Anlage (alle 200er Nummern)
; (SIP Telefone zur Telefonanlage über jeweilige MSN)
;====================================================

[170]
exten => _1X.,1,Dial,CAPI/170:bBYEXTENSION
exten => _2X.,1,Dial,CAPI/170:bBYEXTENSION
exten => _9X.,1,Dial,CAPI/170:bBYEXTENSION
exten => _0X.s,1,Dial,CAPI/170:bBYEXTENSION
;exten => 888,1,VoicemailMain(${CALLERIDNUM})

[171]
exten => _1X.,1,Dial,CAPI/171:bBYEXTENSION
exten => _2X.,1,Dial,CAPI/171:bBYEXTENSION
;exten => _9X.,1,Dial,CAPI/171:bBYEXTENSION
;exten => _0X.s,1,Dial,CAPI/171:bBYEXTENSION
;exten => 888,1,VoicemailMain(${CALLERIDNUM})

[172]
exten => _1X.,1,Dial,CAPI/ISDN1/172:bBYEXTENSION
exten => _2X.,1,Dial,CAPI/ISDN1/172:bBYEXTENSION
;exten => _9X.,1,Dial,CAPI/ISDN1/172:bBYEXTENSION
;exten => _0X.,1,Dial,CAPI/ISDN1/172:bBYEXTENSION
;exten => 888,1,VoicemailMain(${CALLERIDNUM})

Ausschitt aus dem Log
Code:
Jul  5 09:29:28 VERBOSE[497] logger.c:   == ISDN1#02: Incoming call '270' -> '172'
Jul  5 09:29:38 VERBOSE[497] logger.c:   == ISDN1#02: CAPI Hangingup for PLCI=0x101 in state 4
Jul  5 09:29:49 DEBUG[502] chan_sip.c: Setting NAT on RTP to 0
Jul  5 09:29:49 DEBUG[502] chan_sip.c: Stopping retransmission on '[email protected]' of Response 26647: Match Found
Jul  5 09:29:49 DEBUG[502] chan_sip.c: Setting NAT on RTP to 0
Jul  5 09:29:49 DEBUG[502] chan_sip.c: Checking SIP call limits for device 302
Jul  5 09:29:49 DEBUG[502] chan_sip.c: Stopping retransmission on '[email protected]' of Response 26648: Match Found
Jul  5 09:29:59 DEBUG[502] chan_sip.c: Setting NAT on RTP to 0
Jul  5 09:29:59 DEBUG[502] chan_sip.c: Stopping retransmission on '[email protected]' of Response 13830: Match Found
Jul  5 09:29:59 DEBUG[502] chan_sip.c: Setting NAT on RTP to 0
Jul  5 09:29:59 DEBUG[502] chan_sip.c: Checking SIP call limits for device 302
Jul  5 09:29:59 DEBUG[502] chan_sip.c: build_route: Contact hop: <sip:[email protected]>
Jul  5 09:29:59 VERBOSE[521] logger.c:     -- Executing Dial("SIP/302-081aaae0", "CAPI/ISDN1/172:bBYEXTENSION") in new stack
Jul  5 09:29:59 VERBOSE[521] logger.c:     -- Called ISDN1/172:b270
Jul  5 09:29:59 VERBOSE[521] logger.c:     -- CAPI/ISDN1/b270-1 is making progress passing it to SIP/302-081aaae0
Jul  5 09:30:10 VERBOSE[521] logger.c:   == ISDN1#02: CAPI Hangingup for PLCI=0x101 in state 5
Jul  5 09:30:10 DEBUG[521] app_dial.c: Exiting with DIALSTATUS=CANCEL.
Jul  5 09:30:10 VERBOSE[521] logger.c:   == Spawn extension (172, 270, 1) exited non-zero on 'SIP/302-081aaae0'
Jul  5 09:30:10 DEBUG[521] pbx.c: Function result is '"Test2" <302>'
Jul  5 09:30:10 DEBUG[521] pbx.c: Function result is '302'
Jul  5 09:30:10 DEBUG[521] pbx.c: Function result is '270'
Jul  5 09:30:10 DEBUG[521] pbx.c: Function result is '172'
Jul  5 09:30:10 DEBUG[521] pbx.c: Function result is 'SIP/302-081aaae0'
Jul  5 09:30:10 DEBUG[521] pbx.c: Function result is 'CAPI/ISDN1/b270-1'
Jul  5 09:30:10 DEBUG[521] pbx.c: Function result is 'Dial'
Jul  5 09:30:10 DEBUG[521] pbx.c: Function result is 'CAPI/ISDN1/172:bBYEXTENSION'
Jul  5 09:30:10 DEBUG[521] pbx.c: Function result is '2007-07-05 09:29:59'
Jul  5 09:30:10 DEBUG[521] pbx.c: Function result is '(null)'
Jul  5 09:30:10 DEBUG[521] pbx.c: Function result is '2007-07-05 09:30:10'
Jul  5 09:30:10 DEBUG[521] pbx.c: Function result is '11'
Jul  5 09:30:10 DEBUG[521] pbx.c: Function result is '0'
Jul  5 09:30:10 DEBUG[521] pbx.c: Function result is 'NO ANSWER'
Jul  5 09:30:10 DEBUG[521] pbx.c: Function result is 'DOCUMENTATION'
Jul  5 09:30:10 DEBUG[521] pbx.c: Function result is '(null)'
Jul  5 09:30:10 DEBUG[521] pbx.c: Function result is '1183620599.3'
Jul  5 09:30:10 DEBUG[521] pbx.c: Function result is '(null)'
Jul  5 09:30:10 ERROR[521] cdr_custom.c: Unable to re-open master file /var/log/asterisk/cdr-custom/Master.csv : No such file or directory
Jul  5 09:30:10 DEBUG[521] chan_sip.c: update_call_counter(302) - decrement call limit counter
Jul  5 09:30:10 DEBUG[502] chan_sip.c: Stopping retransmission on '[email protected]' of Response 13831: Match Found
Jul  5 09:31:21 VERBOSE[491] logger.c: Beginning asterisk shutdown....
Jul  5 09:31:21 VERBOSE[491] logger.c: Executing last minute cleanups
Jul  5 09:31:21 VERBOSE[491] logger.c:   == Destroying musiconhold processes
Jul  5 09:31:21 VERBOSE[491] logger.c: Asterisk cleanly ending (2).

Ich hoffe das passt alles so und ich habe beim posten nichts falsch gemacht.
Würde mich sehr freuen wenn mir jemand einen Tipp geben könnte.

Gruß, Jochen
 
Bei mir hat es geholfen, alles neu zu kompilieren. Asterisk mit allem drum und dran (zaptel usw), chan_capi usw. Evtl. auch noch den Kernel.
Es ist für die Stabilität von Vorteil wenn alles mit dem gleichen Compiler (der sicher mit dem update gewechselt hat) kompiliert wird.
 
Hi,

Danke für Deine Antwort.
Hilft mir jetzt aber nicht wirklich weiter, da ich es als Paket installiert habe und eigentlich nicht anfangen will das ganze Zeug zu kompilieren (zumindest wenn es sich vermeiden lässt) Ist schon komisch, es hat ja vor dem Update mit den Paketen auch geklappt....

Danke trotzdem,

Jochen
 
Kostenlos!

Statistik des Forums

Themen
248,464
Beiträge
2,292,023
Mitglieder
377,899
Neuestes Mitglied
tazmaniancj