Hallo zusammen,
ich bin am verzweifeln. Habe schon alles mögliche probiert und in den Foren gesucht.
Gigaset 3000 Handset (RNr 31)-> Basis 3035 -> Eicon diva -> Asterisk -> Sip telefon (RNr 51)
Wenn ich vom gigaset die Nebenstelle 51 rufe. klingelt das Telefon und wenn ich den Ruf annehme merk das gigaset nicht , dass das Gespräch angenommen wurde und nach ca. 12 sek. steht auf dem Display ungültige Rufnummer. Umgekehrt geht es ohne Probleme.
Das gleiche passiert ebenfalls in Richtung Festnetz über isdn.
Hier die Log Ausgabe capi debug on / verbose 6
capi.conf
sip.conf
extensions.conf
Ich hoffe jemand kennt den Fehler und kann mir weiterhelfen.
Gruß
Michael
ich bin am verzweifeln. Habe schon alles mögliche probiert und in den Foren gesucht.
Gigaset 3000 Handset (RNr 31)-> Basis 3035 -> Eicon diva -> Asterisk -> Sip telefon (RNr 51)
Wenn ich vom gigaset die Nebenstelle 51 rufe. klingelt das Telefon und wenn ich den Ruf annehme merk das gigaset nicht , dass das Gespräch angenommen wurde und nach ca. 12 sek. steht auf dem Display ungültige Rufnummer. Umgekehrt geht es ohne Probleme.
Das gleiche passiert ebenfalls in Richtung Festnetz über isdn.
Hier die Log Ausgabe capi debug on / verbose 6
Code:
CONNECT_IND ID=001 #0x04d8 LEN=0039
Controller/PLCI/NCCI = 0x2402
CIPValue = 0x10
CalledPartyNumber = <81>51
CallingPartyNumber = <00 80>31
CalledPartySubaddress = default
CallingPartySubaddress = default
BC = <80 90 a3>
LLC = default
HLC = <91 81>
AdditionalInfo
BChannelinformation = default
Keypadfacility = default
Useruserdata = default
Facilitydataarray = default
SendingComplete = default
-- CONNECT_IND (PLCI=0x2402,DID=51,CID=31,CIP=0x10,CONTROLLER=0x2)
> isdn2#02: msn='*' DNID='51' MSN
== isdn2#02: setting format alaw - 0x8 (alaw)
== isdn2#02: Incoming call '31' -> '51'
INFO_IND ID=001 #0x04d9 LEN=0018
Controller/PLCI/NCCI = 0x2402
InfoNumber = 0x70
InfoElement = <81>51
INFO_RESP ID=001 #0x04d9 LEN=0012
Controller/PLCI/NCCI = 0x2402
-- isdn2#02: info element CALLED PARTY NUMBER
> isdn2#02: INFO_IND DID digits not used in this state.
INFO_IND ID=001 #0x04da LEN=0021
Controller/PLCI/NCCI = 0x2402
InfoNumber = 0x28
InfoElement = LINK<3d>1
INFO_RESP ID=001 #0x04da LEN=0012
Controller/PLCI/NCCI = 0x2402
-- isdn2#02: info element DSP
INFO_IND ID=001 #0x04db LEN=0016
Controller/PLCI/NCCI = 0x2402
InfoNumber = 0x18
InfoElement = <81>
INFO_RESP ID=001 #0x04db LEN=0012
Controller/PLCI/NCCI = 0x2402
-- isdn2#02: info element CHANNEL IDENTIFICATION 81
INFO_IND ID=001 #0x04dc LEN=0015
Controller/PLCI/NCCI = 0x2402
InfoNumber = 0x8005
InfoElement = default
INFO_RESP ID=001 #0x04dc LEN=0012
Controller/PLCI/NCCI = 0x2402
-- isdn2#02: info element SETUP
-- isdn2#02: CAPI/isdn2#02/51-5: 51 matches in context capi-in2
== Started pbx on channel CAPI/isdn2#02/51-5
> CAPI devicestate requested for isdn2#02/51
-- Executing NoCDR("CAPI/isdn2#02/51-5", "") in new stack
Jul 2 12:29:29 WARNING[27836]: cdr.c:443 ast_cdr_free: CDR on channel 'CAPI/isdn2#02/51-5' not posted
Jul 2 12:29:29 WARNING[27836]: cdr.c:445 ast_cdr_free: CDR on channel 'CAPI/isdn2#02/51-5' lacks end
-- Executing Macro("CAPI/isdn2#02/51-5", "ruf|SIP|51") in new stack
-- Executing NoOp("CAPI/isdn2#02/51-5", "Wir sind im Macro ruf gelandet") in new stack
-- Executing GotoIf("CAPI/isdn2#02/51-5", "1?3:5") in new stack
-- Goto (macro-ruf,s,3)
-- Executing Dial("CAPI/isdn2#02/51-5", "SIP/51|30|r") in new stack
-- Called 51
== isdn2#02: Requested RINGING-Indication for CAPI/isdn2#02/51-5
SELECT_B_PROTOCOL_REQ ID=001 #0x03f4 LEN=0023
Controller/PLCI/NCCI = 0x2402
BProtocol
B1protocol = 0x1
B2protocol = 0x1
B3protocol = 0x0
B1configuration = default
B2configuration = default
B3configuration = default
GlobalConfiguration = default
ALERT_REQ ID=001 #0x03f5 LEN=0018
Controller/PLCI/NCCI = 0x2402
AdditionalInfo
BChannelinformation = default
Keypadfacility = default
Useruserdata = default
Facilitydataarray = default
SendingComplete = default
SELECT_B_PROTOCOL_CONF ID=001 #0x03f4 LEN=0014
Controller/PLCI/NCCI = 0x2402
Info = 0x0
ALERT_CONF ID=001 #0x03f5 LEN=0014
Controller/PLCI/NCCI = 0x2402
Info = 0x0
CONNECT_B3_IND ID=001 #0x04dd LEN=0013
Controller/PLCI/NCCI = 0x482402
NCPI = default
CONNECT_B3_RESP ID=001 #0x04dd LEN=0015
Controller/PLCI/NCCI = 0x482402
Reject = 0x0
NCPI = default
-- SIP/51-c444 is ringing
-- SIP/51-c444 answered CAPI/isdn2#02/51-5
== isdn2#02: Requested Indication-STOP for CAPI/isdn2#02/51-5
== isdn2#02: Answering for 51
----------Anmerkung--------------------------
Hier habe ich das Gespräch am SIP Telefon 51 angenommen.
Am Gigaset steht aber weiterhin ruft.... nach ca 12 Sek kommt am
Display "ungültige Rufnummer"
Ich kann aber im Log nichts finden???
----------------------------------------------
CONNECT_RESP ID=001 #0x04d8 LEN=0038
Controller/PLCI/NCCI = 0x2402
Reject = 0x0
BProtocol
B1protocol = 0x1
B2protocol = 0x1
B3protocol = 0x0
B1configuration = default
B2configuration = default
B3configuration = default
GlobalConfiguration = default
ConnectedNumber = <00 80>51
ConnectedSubaddress = default
LLC = default
AdditionalInfo
BChannelinformation = default
Keypadfacility = default
Useruserdata = default
Facilitydataarray = default
SendingComplete = default
> CAPI devicestate requested for isdn2#02/51
DISCONNECT_B3_IND ID=001 #0x04de LEN=0015
Controller/PLCI/NCCI = 0x482402
Reason_B3 = 0x0
NCPI = default
DISCONNECT_B3_RESP ID=001 #0x04de LEN=0012
Controller/PLCI/NCCI = 0x482402
DISCONNECT_IND ID=001 #0x04df LEN=0014
Controller/PLCI/NCCI = 0x2402
Reason = 0x0
DISCONNECT_RESP ID=001 #0x04df LEN=0012
Controller/PLCI/NCCI = 0x2402
-- CAPI queue frame:[0;3 [ TYPE: Control (4) SUBCLASS: Hangup (1) ] [isdn2#02]
== Spawn extension (macro-ruf, s, 3) exited non-zero on 'CAPI/isdn2#02/51-5' in macro 'ruf'
== Spawn extension (macro-ruf, s, 3) exited non-zero on 'CAPI/isdn2#02/51-5'
== isdn2#02: CAPI Hangingup for PLCI=0x2402 in state 4
== isdn2#02: Interface cleanup PLCI=0x2402
> CAPI devicestate requested for isdn2#02/51
> CAPI devicestate requested for isdn2#02/51
capi.conf
Code:
; CAPI config
; general section
[general]
nationalprefix=0
internationalprefix=00
rxgain=0.8
txgain=0.8
language=de ;set default language
;ulaw=yes ;set this, if you live in u-law world instead of a-law
; interface sections ...
[isdn1] ;this example interface gets name 'ISDN1' and may be any
;name not starting with 'g' or 'contr'.
;ntmode=yes ;if isdn card operates in nt mode, set this to yes
isdnmode=msn ;'MSN' (point-to-multipoint) or 'DID' (direct inward dial)
;when using NT-mode, 'DID' should be set in any case
;incomingmsn=* ; allow incoming calls to this list of MSNs/DIDs, * = any
controller=1 ;capi controller number to use
immediate=yes
bridge=yes
group=1 ;dialout group
softdtmf=on ;enable/disable software dtmf detection, recommended for AVM cards
relaxdtmf=on ;in addition to softdtmf, you can use relaxed dtmf detection
accountcode= ;PBX accountcode to use in CDRs
context=capi-in ;context for incoming calls
echocancel=yes ;EICON DIVA SERVER (CAPI) echo cancelation
;(possible values: 'no', 'yes', 'force', 'g164', 'g165')
devices=2 ;number of concurrent calls on this controller
;(2 makes sense for single BRI, 30 for PRI)
[isdn2] ;this example interface gets name 'ISDN1' and may be any
;name not starting with 'g' or 'contr'.
ntmode=yes ;if isdn card operates in nt mode, set this to yes
isdnmode=msn ;'MSN' (point-to-multipoint) or 'DID' (direct inward dial)
;when using NT-mode, 'DID' should be set in any case
incomingmsn=* ;allow incoming calls to this list of MSNs/DIDs, * = any
controller=2 ;capi controller number to use
immediate=yes
bridge=yes
group=2 ;dialout group
softdtmf=on ;enable/disable software dtmf detection, recommended for AVM cards
relaxdtmf=on ;in addition to softdtmf, you can use relaxed dtmf detection
accountcode= ;PBX accountcode to use in CDRs
context=capi-in2 ;context for incoming calls
echocancel=yes ;EICON DIVA SERVER (CAPI) echo cancelation
;(possible values: 'no', 'yes', 'force', 'g164', 'g165')
devices=2 ;number of concurrent calls on this controller
;(2 makes sense for single BRI, 30 for PRI)
sip.conf
Code:
; SIP Configuration example for Asterisk
;
[general]
port = 5060
bindaddr = 0.0.0.0
context = default
qualify=no
disable=all
allow=alaw
allow=alaw
allow=ulaw
allow=g729
allow=gsm
allow=slinear
srvlookup=yes
language=de
register => 32xxxxx:[email protected]/xxxxxx
[xxxxxxx]
type=peer
username=xxxx
fromuser=xxxxx
secret=xxxxx
host=sipgate.de
fromdomain=sipgate.de
insecure=very
canreinvite=no
nat=no
disallow=all
allow=ulaw
[sipgate_de_in]
type=peer
fromdomain=sipgate.de
host=sipgate.de
disallow=all
allow=ulaw
context=ankommend
[50]
type=friend
regexten=50
secret=xxxxxx
callerid="Michael" <50>
host=dynamic
nat=no
canreinvite=yes
disallow=all
allow=gsm
allow=ulaw
allow=alaw
dtmfmode=rfc2833
mailbox=50,31
[51]
type=friend
regexten=51
secret=xxxxxxx
callerid="Wohnzimmer" <51>
host=dynamic
nat=no
canreinvite=yes
disallow=all
allow=gsm
allow=ulaw
allow=alaw
dtmfmode=rfc2833
mailbox=51,31
[52]
type=friend
regexten=52
secret=xxxxx
callerid="Max" <52>
host=dynamic
nat=no
canreinvite=yes
disallow=all
allow=gsm
allow=ulaw
allow=alaw
dtmfmode=rfc2833
mailbox=52,32
[53]
type=friend
regexten=53
secret=xxxxxxx
callerid="Chris" <53>
host=dynamic
nat=no
canreinvite=yes
disallow=all
allow=gsm
allow=ulaw
allow=alaw
dtmfmode=rfc2833
mailbox=53,33
extensions.conf
Code:
;
; Static extension configuration file, used by
; the pbx_config module. This is where you configure all your
; inbound and outbound calls in Asterisk.
;
#include lcr/extensions.tsblcr
[general]
;
static=yes
writeprotect=no
autofallthrough=yes
clearglobalvars=no
priorityjumping=no
[globals]
CONSOLE=Console/dsp ; Console interface for demo
TRUNKMSD=1 ; MSD digits to strip (usually 1 or 0)
; --------------------------------------------------------------------
;
; hier kommt der default-Context, in dem alle Geraete in der
; Grundkonfiguration erstmal laufen.
; Alle Geraete können sich gegenseitig anrufen
[default]
include => lokal
include => lokal1
include => sipgate_out
include => isdn-out
include => isdn-out2
include => capi-in
include => capi-in2
include => mailbox
include => mailbox_own
include => echotest
include => tsblcrwithprefix
exten => s,1,answer()
exten => s,2,disa(no-password|default)
; include either [tsblcr] or [tsblcrwithprefix] and
; set Macro arguments properly, especially:
; LCRFILE i - filename of lcr routing table
; CALLERIDNUM - caller id number
; CALLERIDNAME - caller id name
; TRUNK - external "line" to use, e.g.
; Zap/g1 or CAPI (which will be extended to CAPI/callerid:b)
; SIPCONF - link to sip.conf file
; IAXCONF - link to iax.conf file
; RESTART - restart at context^exten^prio [is optional]
; (if called party hangs up, caller presses *, or all provider
; tried)
[tsblcrwithprefix]
; for simulating old pbx with needed 0 to start external call
exten => _0.,1,SetVar(varnn=${CALLERIDNUM})
exten => _0.,2,GotoIf($[${varnn}=31]?20:3)
exten => _0.,3,GotoIf($[${varnn}=51]?20:4)
exten => _0.,4,GotoIf($[${varnn}=32]?22:5)
exten => _0.,5,GotoIf($[${varnn}=52]?22:6)
exten => _0.,6,GotoIf($[${varnn}=33]?24:7)
exten => _0.,7,GotoIf($[${varnn}=53]?24:8)
exten => _0.,8,GotoIf($[${varnn}=39]?26:9)
exten => _0.,9,GotoIf($[${varnn}=50]?26:10)
exten => _0.,10,GotoIf($[${varnn}=30]?20:11)
exten => _0.,11,SetVar(varnn=51151)
exten => _0.,12,Goto(40)
exten => _0.,20,SetVar(varnn=511xx)
exten => _0.,21,Goto(40)
exten => _0.,22,SetVar(varnn=510xxx)
exten => _0.,23,Goto(40)
exten => _0.,24,SetVar(varnn=510xxx)
exten => _0.,25,Goto(40)
exten => _0.,26,SetVar(varnn=510xxx)
exten => _0.,27,Goto(40)
exten => _0.,40,Macro(tsblcr,${EXTEN:1},/etc/asterisk/lcr/tsblcr.routing,${varnn},${CALLERIDNAME},CAPI/g1,/etc/asterisk/sip.conf)
;exten => _X.,1,Macro(tsblcr,${EXTEN},${LCRFILE},${PSTNCALLERIDNUM},${PSTNCALLERIDNAME},${TRUNK},${SIPCONF},${IAXCONF},${RESTART})
[sipgate_out]
; Diesen Context verwenden wir zum waehlen von abgehenden
; Rufnummern über den Sipgate Account xxxxxx
;exten => _0.,1,Dial,SIP/${EXTEN:1}@3xxxxxxx|45|r
[isdn-out]
exten => _9.,1,Set(CALLERID(number)=510xxx)
exten => _9.,2,Dial(CAPI/g1/${EXTEN:1}/b)
[ankommend]
; alle Anrufe mit einer ID xxxxxxx sollen an das SIP Endgeraet 50
; signalisiert werden
exten => xxxxxxx,1,macro,ruf|SIP|50
[lokal]
; Erreichbarkeit der Nebenstellen 50-59
; untereinander herstellen
exten => _5X,1,NoCDR()
exten => _5X,n,macro,ruf|SIP|${EXTEN}
[lokal1]
; Erreichbarkeit der Nebenstellen 30-39
; untereinander herstellen
exten => _3X,1,NoCDR()
exten => _3X,n,macro,ruf|CAPI/g2|${EXTEN}
[capi-in]
; WZ
exten => 51151,1,agi(dbox2.pl|192.168.5.xx|80|popup|${CALLERID})
exten => 51151,2,System(echo "Anruf von ${CALLERID} um ${DATETIME}" > /tmp/as99999 )
exten => 51151,3,System(sendEmail -f asterisk@localhost -m asterisk -u $(cat /tmp/as99999) -t michael@localhost )
exten => 511xx,4,macro,ruf|capi/g2|31
; WZ
exten => 510xxx,1,macro,ruf|SIP|51
; WZ
exten => 510xxx,1,macro,ruf|capi/g2|31
; Max
exten => 510xxx,1,macro,ruf|capi/g2|32
; Test SIP
exten => 510776,1,macro,ruf|SIP|51
; Chris
exten => 510xxx,1,macro,ruf|capi/g2|33
; WZ
exten => 510xxx,1,hangup
; Arbeitszimmer ML
exten => 510xxx,1,macro,ruf|capi/g2|31
; Fax
exten => 510xxx,1,Wait(3)
exten => 510xxx,2,Macro(faxempfang)
exten => 510xxx,3,capicommand(receivefax|${FAXFILE}|+xxxxxx|xxxxxxch)
exten => 510xxx,4,System(sfftobmp -d -t "${FAXFILE}" -o "${FAXFILE}.tif")
exten => 510xxx,5,system("${SCRIPTFILE}" "${CALLERIDNUM}" "${MAILADDR}" "${FAXFILE}.tif")
exten => 510xxx,n,Hangup
[capi-in2]
include => lokal
include => lokal1
include => sipgate_out
include => isdn-out
include => isdn-out2
include => capi-in
include => capi-in2
include => mailbox
include => mailbox_own
include => echotest
include => tsblcrwithprefix
[isdn-out2]
exten => 3X,1,Set(CALLERID(number)=$CALLERIDNUM)
exten => 3X,2,Dial(CAPI/g2/${EXTEN}/b)
[mailbox]
exten => 80,1,answer
exten => 80,n,wait,1
exten => 80,n,voicemailmain
exten => 80,n,hangup
[mailbox_own]
exten => 88,1,answer
exten => 88,n,wait,1
exten => 88,n,voicemailmain,s${CALLERIDNUM}
exten => 88,n,hangup
[echotest]
exten => 81,1,answer
exten => 81,2,wait,1
exten => 81,3,playback,demo-echotest
exten => 81,4,echo
exten => 81,5,playback,demo-echodone
exten => 81,6,hangup
[macro-faxempfang]
exten => s,1,Set(SCRIPTFILE=/var/lib/asterisk/scripts/fax2mail)
exten => s,n,Set(FAXFILE=/var/spool/asterisk/fax/${UNIQUEID})
exten => s,n,Set(MAILADDR=michael@localhost)
[macro-ruf]
; Die Zeile 1 dient lediglich dazu, dass wir in der CLI eine Bestaetigung erhalten,
; dass wir an der richtigen Stelle angekommen sind
exten => s,1,NoOp(Wir sind im Macro ruf gelandet)
exten => s,2,GotoIf($[${ARG1}=SIP]?3:5)
exten => s,3,Dial,${ARG1}/${ARG2}|30|r
exten => s,4,Goto(6)
exten => s,5,Dial,${ARG1}/${ARG2}/b|30|r
exten => s,6,SetVar(varnn=${ARG2})
exten => s,7,GotoIf($[${varnn}=51]?20:8)
exten => s,8,GotoIf($[${varnn}=52]?22:9)
exten => s,9,GotoIf($[${varnn}=53]?24:41)
exten => s,12,Goto(41)
exten => s,20,SetVar(varnn=31)
exten => s,21,Goto(40)
exten => s,22,SetVar(varnn=32)
exten => s,23,Goto(40)
exten => s,24,SetVar(varnn=33)
exten => s,25,Goto(40)
exten => s,40,SetVar(ARG2=${varnn})
exten => s,41,Goto,s-${DIALSTATUS}|1
exten => s-BUSY,1,voicemail,b${ARG2}
exten => s-BUSY,n,Hangup
exten => s-NOANSWER,1,voicemail,u${ARG2}
exten => s-NOANSWER,n,Hangup
exten => s-CHANUNAVAIL,1,voicemail,u${ARG2}
exten => s-CHANUNAVAIL,n,Hangup
exten => s-NOROUTE,1,voicemail,u${ARG2}
exten => s-NOROUTE,n,Hangup
Ich hoffe jemand kennt den Fehler und kann mir weiterhelfen.
Gruß
Michael