chan_capi Incoming Calls *GELÖST*

achilles87

Neuer User
Mitglied seit
18 Jan 2008
Beiträge
15
Punkte für Reaktionen
0
Punkte
0
Hallo,

ich schaffe es leider nicht einkommende Calls an einen internen SIP Teilnehmer weiterzuleiten. Kann mir jemand einen Tip geben?

capi.conf
Code:
;
; CAPI config
;
;

; general section

[general]
nationalprefix=0
internationalprefix=00
rxgain=1.0       ;linear receive gain (1.0 = no change)
txgain=1.0       ;linear transmit gain (1.0 = no change)
language=de      ;set default language
;ulaw=yes        ;set this, if you live in u-law world instead of a-law

;jb.....         ;with Asterisk 1.4 you can configure jitterbuffer,
                 ;see Asterisk documentation for all jb* setting available.
;mohinterpret=default ;Asterisk 1.4: default music on hold class when placed on hold.


; interface sections ...

[ISDN1]          ;this example interface gets name 'ISDN1' and may be any
                 ;name not starting with 'g' or 'contr'.
                 ;Use one interface section for each isdn port!
;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
;defaultcid=123  ;set a default caller id to that interface for dial-out,
                 ;this caller id will be used when dial option 'd' is set.
;controller=0    ;ISDN4BSD default
;controller=7    ;ISDN4BSD USB default
controller=1     ;capi controller number of this interface/port
group=1          ;dialout group
;prefix=0        ;set a prefix to calling number on incoming calls
softdtmf=on      ;enable/disable software dtmf detection, recommended for AVM cards
relaxdtmf=on     ;in addition to softdtmf, you can use relaxed dtmf detection
faxdetect=off    ;enable faxdetection and redirection to EXTEN 'fax' for incoming and/or
                 ;outgoing calls. (default='off', possible values: 'incoming','outgoing','both')
accountcode=     ;PBX accountcode to use in CDRs
;amaflags=default;AMA flags for CDR ('default', 'omit', 'billing', or 'documentation')
context=capi-in  ;context for incoming calls
;holdtype=hold   ;when the PBX puts the call on hold, ISDN HOLD will be used. If
                 ;set to 'local' (default value), no hold is done and the PBX may
                 ;play MOH.
;immediate=yes   ;DID: immediate start of pbx with extension 's' if no digits were
                 ;     received on incoming call (no destination number yet)
                 ;MSN: start pbx on CONNECT_IND and don't wait for SETUP/SENDING-COMPLETE.
                 ;     info like REDIRECTINGNUMBER may be lost, but this is necessary for
                 ;     drivers/pbx/telco which does not send SETUP or SENDING-COMPLETE.
;echosquelch=1   ;_VERY_PRIMITIVE_ echo suppression
;echocancel=yes  ;EICON DIVA SERVER (CAPI) echo cancelation (yes=g165)
                 ;(possible values: 'no', 'yes', 'force', 'g164', 'g165')
echocancelold=yes;use facility selector 6 instead of correct 8 (necessary for older eicon drivers)
;echotail=64     ;echo cancel tail setting (default=0 for maximum)
;echocancelnlp=1 ;activate non-linear-processing; this improves echo cancel ratio, but might
                 ;incorporate variable gain in the signal path.
;bridge=yes      ;native bridging (CAPI line interconnect) if available
;callgroup=1     ;PBX call group
;pickupgroup=1   ;PBX pickup group (which call groups are we allowed to pickup)
;language=de     ;set language for this device (overwrites default language)
;disallow=all    ;RTP codec selection (valid with Eicon DIVA Server only)
;allow=all       ;RTP codec selection (valid with Eicon DIVA Server only)
devices=2        ;number of concurrent calls (b-channels) on this controller
                 ;(2 makes sense for single BRI, 30/23 for PRI/T1)
;jb.....         ;with Asterisk 1.4 you can configure jitterbuffer,
                 ;see Asterisk documentation for all jb* setting available.
;mohinterpret=default ;Asterisk 1.4: default music on hold class when placed on hold.
;qsig=1           ;enable use of Q.SIG extensions. ECMA Variant
;qsig_prnum=1234  ;enable inbound bridging - this should be an QSIG-network-wide unique number

extensions.conf
Code:
[globals]

[general]
autofallthrough=yes

[default]
exten => s,1,Verbose(1|Unrouted call handler)
exten => s,n,Answer()
exten => s,n,Wait(1)
exten => s,n,Playback(tt-weasels)
exten => s,n,Hangup()

[incoming_calls]

[internal]
exten => 500,1,Verbose(1|Echo test application)
exten => 500,n,Echo()
exten => 500,n,Hangup()
;1000
exten => 1000,1,Verbose(1|Extension 1000)
exten => 1000,n,Dial(SIP/1000,30)
exten => 1000,n,Hangup()
;2000
exten => 2000,1,AGI(otrs.agi)
exten => 2000,n,Verbose(1|Extension 2000)
exten => 2000,n,Dial(SIP/2000,30)
exten => 2000,n,Hangup()

[phones]
include => internal

[conferences]
exten => 900,1,MeetMe(900)
exten => 901,1,MeetMe(901)
exten => 902,1,MeetMe(902)

[capi-in]
exten => _X.,1,Dial(SIP/2000,30)

Bei einem Anruf spuckt die CLI folgendes aus:

Code:
  == ISDN1#02: Incoming call '180' -> '2'
  == ISDN1#02: CAPI Hangingup for PLCI=0x101 in state 4


Mit freundlichen Grüßen
Thomas Janzen
 
Zuletzt bearbeitet:
Habe den Fehler selber lösen können. Anscheinend ist ASterisk nicht mit dem Platzhalter zurechtgekommen (_X.). Außerdem musste ich in der capi.conf den Parameter "isdnmode=MSN" auf "isdnmode=DID" ändern.
 
In deinem capi-in context wartest du auf mindestens zwei Ziffern 'X.', aber dein ISDN Anschluss
signalisiert nur eine Ziffer '2'. Also findet chan_capi kein match und ignoriert den Anruf.

Du hast in der capi.conf 'MSN' eingetragen, da aber nur eine '2' ankommt, vermute ich du hängst an einer Anlage, die dir einen Durchwahl-Anschluss bietet, dies waere dann also 'DID'.

Armin
 
Habe den Fehler selber lösen können. Anscheinend ist ASterisk nicht mit dem Platzhalter zurechtgekommen (_X.). Außerdem musste ich in der capi.conf den Parameter "isdnmode=MSN" auf "isdnmode=DID" ändern.

Du sagtest, du hast den Platzhalter verändert, nun wie?
Ich hab nämlich das gleiche Problem wie du!
Wenn ich die Nummer des ISDN Anschlusses wähle (direkt) ohne durchwahl bekomme ich immer den Fehler wie du oben angegeben hast.

Wenn ich dann eine Durchwahl dazugebe funktionierts.

Ich hab's schon folgend probiert, hat aber auch nix geholfen:
[capi-in]
exten => s,1,playback,asterisk-welcome

exten => s,n,SetMusicOnHold(manual)

exten => s,n,Dial,SIP/3000&SIP/3010|10|trm

exten => s,n,Hangup

danke im Voraus
Michael
 
habe die sachen auf der arbeit. am montag poste ich meine lösung
 
Danke!

Was mich noch interessieren würde, hast du deinen ISDN Anschluss auf Point-to-Multipoint oder auf Point-to-Point eingestellt und welche
isdnmode hast du unter Linux (DID oder MSN)

danke im Voraus
Michael
 
Hi,

also das ist meine Lösung:

capi.conf
Code:
;
; CAPI config
;
;

; general section

[general]
nationalprefix=0
internationalprefix=00
rxgain=1.0       ;linear receive gain (1.0 = no change)
txgain=1.0       ;linear transmit gain (1.0 = no change)
language=de      ;set default language
;ulaw=yes        ;set this, if you live in u-law world instead of a-law

;jb.....         ;with Asterisk 1.4 you can configure jitterbuffer,
                 ;see Asterisk documentation for all jb* setting available.
;mohinterpret=default ;Asterisk 1.4: default music on hold class when placed on hold.


; interface sections ...

[ISDN1]          ;this example interface gets name 'ISDN1' and may be any
                 ;name not starting with 'g' or 'contr'.
                 ;Use one interface section for each isdn port!
;ntmode=yes      ;if isdn card operates in nt mode, set this to yes
isdnmode=DID     ;'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
;defaultcid=123  ;set a default caller id to that interface for dial-out,
                 ;this caller id will be used when dial option 'd' is set.
;controller=0    ;ISDN4BSD default
;controller=7    ;ISDN4BSD USB default
controller=1     ;capi controller number of this interface/port
group=1          ;dialout group
;prefix=0        ;set a prefix to calling number on incoming calls
softdtmf=on      ;enable/disable software dtmf detection, recommended for AVM cards
relaxdtmf=on     ;in addition to softdtmf, you can use relaxed dtmf detection
faxdetect=off    ;enable faxdetection and redirection to EXTEN 'fax' for incoming and/or
                 ;outgoing calls. (default='off', possible values: 'incoming','outgoing','both')
accountcode=     ;PBX accountcode to use in CDRs
;amaflags=default;AMA flags for CDR ('default', 'omit', 'billing', or 'documentation')
context=capi-in  ;context for incoming calls
;holdtype=hold   ;when the PBX puts the call on hold, ISDN HOLD will be used. If
                 ;set to 'local' (default value), no hold is done and the PBX may
                 ;play MOH.
;immediate=yes   ;DID: immediate start of pbx with extension 's' if no digits were
                 ;     received on incoming call (no destination number yet)
                 ;MSN: start pbx on CONNECT_IND and don't wait for SETUP/SENDING-COMPLETE.
                 ;     info like REDIRECTINGNUMBER may be lost, but this is necessary for
                 ;     drivers/pbx/telco which does not send SETUP or SENDING-COMPLETE.
;echosquelch=1   ;_VERY_PRIMITIVE_ echo suppression
;echocancel=yes  ;EICON DIVA SERVER (CAPI) echo cancelation (yes=g165)
                 ;(possible values: 'no', 'yes', 'force', 'g164', 'g165') 
echocancelold=yes;use facility selector 6 instead of correct 8 (necessary for older eicon drivers)
;echotail=64     ;echo cancel tail setting (default=0 for maximum)
;echocancelnlp=1 ;activate non-linear-processing; this improves echo cancel ratio, but might
                 ;incorporate variable gain in the signal path.
;bridge=yes      ;native bridging (CAPI line interconnect) if available
;callgroup=1     ;PBX call group
;pickupgroup=1   ;PBX pickup group (which call groups are we allowed to pickup)
;language=de     ;set language for this device (overwrites default language)
;disallow=all    ;RTP codec selection (valid with Eicon DIVA Server only)
;allow=all       ;RTP codec selection (valid with Eicon DIVA Server only)
devices=2        ;number of concurrent calls (b-channels) on this controller
                 ;(2 makes sense for single BRI, 30/23 for PRI/T1)
;jb.....         ;with Asterisk 1.4 you can configure jitterbuffer,
                 ;see Asterisk documentation for all jb* setting available.
;mohinterpret=default ;Asterisk 1.4: default music on hold class when placed on hold.
;qsig=1           ;enable use of Q.SIG extensions. ECMA Variant
;qsig_prnum=1234  ;enable inbound bridging - this should be an QSIG-network-wide unique number

extensions.conf (capi-in):
habe ich vereinfacht damit es einfacher ist zu verstehen.
Code:
[capi-in]
exten => _X.,1,Answer
exten => _X.,2,Dial(SIP/1000)
exten => _X.,3,Hangup()

ausgehende anrufe:
Code:
[outgoing_calls]
exten => _X.,1,Dial(CAPI/contr1/${EXTEN})
exten => _X.,n,Hangup()

Ganz wichtig in der capi.conf ist "isdnmode=DID"!!

Grüße
Thomas
 
Das könnte so funktionieren, aber ist nicht wirklich richtig. Wenn du kein DID Anschluss hast, sollte DID auch nicht benutzt werden. Ein Answer() vor dem Dial() ist auch nicht unbedingt gut, denn da wird ja schon die Verbindung aufgebaut, obwohl der SIP Teilnehmer noch gerufen wird, oder gar Busy ist.

Armin
 
Hallo

Ich habe genau dasselbe Problem. Wie würdest du es denn lösen, Armin?
 
Eigentlich habe ich das Problem auch nicht verstanden. In dem Log oben steht, dass ein Anruf für '2' kommt. Wenn man nun auf _X. prüft, kann es nicht gehen, da hier auf zwei digits gewartet wird. Warum also nicht _X oder gleich
exten => 2,1,Dial()

Armin
 
Das könnte so funktionieren, aber ist nicht wirklich richtig. Wenn du kein DID Anschluss hast, sollte DID auch nicht benutzt werden. Ein Answer() vor dem Dial() ist auch nicht unbedingt gut, denn da wird ja schon die Verbindung aufgebaut, obwohl der SIP Teilnehmer noch gerufen wird, oder gar Busy ist.

Armin

ich habe aber einen DID Anschluss. und den Answer() Aufruf mache ich, weil ich den Anrufer in eine Warteschlange setze.
 
Und hättest du eine Idee wie ich das bei Trixbox lösen könnte?

Dort sehen die Files wie folgt aus:

extensions_custom.conf
Code:
[capi-in]
include => from-pstn

extensions.conf
Code:
[from-pstn]
include => from-pstn-custom
include => ext-did
include => ext-did-catchall
include => from-did-direct
exten => fax,1,Goto(ext-fax,in_fax,1)

[from-did-direct]
include => ext-findmefollow
include => ext-local

extensions_additional.conf
Code:
[ext-did]
include => ext-did-custom
exten => fax,1,Goto(ext-fax,in_fax,1)
exten => s,1,Set(__FROM_DID=${EXTEN})
exten => s,n,GotoIf($[ "${CALLERID(name)}" != "" ] ?cidok)
exten => s,n,Set(CALLERID(name)=${CALLERID(num)})
exten => s,n(cidok),Noop(CallerID is ${CALLERID(all)})
exten => s,n,Set(FAX_RX=disabled)
exten => s,n,Goto(from-did-direct,200,1)

[ext-did-catchall]
include => ext-did-catchall-custom
exten => _X.,1,Noop(Catch-All DID Match - Found ${EXTEN} - You probably want a DID for this.)
exten => _X.,n,Goto(ext-did,s,1)

[ext-local]
include => ext-local-custom
exten => 200,1,Macro(exten-vm,200,200)
exten => 200,n,Hangup
exten => 200,hint,SIP/200
exten => ${VM_PREFIX}200,1,Macro(vm,200,DIRECTDIAL)
exten => ${VM_PREFIX}200,n,Hangup
exten => vmb200,1,Macro(vm,200,BUSY)
exten => vmb200,n,Hangup
exten => vmu200,1,Macro(vm,200,NOANSWER)
exten => vmu200,n,Hangup
exten => vms200,1,Macro(vm,200,NOMESSAGE)
exten => vms200,n,Hangup

Die Files sind natürlich vereinfacht dargestellt - sprich: nur der nötige Content.
 
Es funktioniert jetzt. Ich habe die folgenden Anpassungen durchgeführt:

extensions_additional.conf (Die beiden roten Zeilen entfernt)

Code:
[ext-did-catchall]
include => ext-did-catchall-custom
[COLOR="Red"]exten => _X.,1,Noop(Catch-All DID Match - Found ${EXTEN} - You probably want a DID for this.)
exten => _X.,n,Goto(ext-did,s,1)[/COLOR]

extensions_custom.conf (Folgende Einträge neu hinzugefügt)

Code:
[ext-did-catchall-custom]
exten => _.,1,Noop(Catch-All DID Match - Found ${EXTEN} - You probably want a DID for this.)
exten => _.,n,Goto(ext-did,s,1)

Dies deshalb, weil Änderungen in der _additional.conf nach einem Neustart des Systems überschrieben werden, nicht aber in der _custom.conf.

Nun zur Lösungserklärung. Das Suffix "_X." wartet auf mindestens zwei Ziffern. Da in diesem Falle aber nur eine Ziffer gesendet wird, muss es auf "_." angepasst werden.
 

Neueste Beiträge

Statistik des Forums

Themen
244,896
Beiträge
2,220,465
Mitglieder
371,635
Neuestes Mitglied
Bigpapi
Holen Sie sich 3CX - völlig kostenlos!
Verbinden Sie Ihr Team und Ihre Kunden Telefonie Livechat Videokonferenzen

Gehostet oder selbst-verwaltet. Für bis zu 10 Nutzer dauerhaft kostenlos. Keine Kreditkartendetails erforderlich. Ohne Risiko testen.

3CX
Für diese E-Mail-Adresse besteht bereits ein 3CX-Konto. Sie werden zum Kundenportal weitergeleitet, wo Sie sich anmelden oder Ihr Passwort zurücksetzen können, falls Sie dieses vergessen haben.