ausgehende Nummer setzen

iptelefonie

Neuer User
Mitglied seit
29 Mrz 2006
Beiträge
104
Punkte für Reaktionen
0
Punkte
0
Bei mir wird bei abgehenden Anrufen via Capi entweder keine, oder die Standardnummer übertragen. In der Readme von chan_capi habe ich dazu zwar etwas gefunden, aber hat nicht funktioniert.

Ich benutze Asterisk 1.2.23-BRIstuffed-0.3.0-PRE-1y-j mit chan_capi-0.3.5.

Meine capi.conf:

PHP:
[general]
nationalprefix=0
internationalprefix=00
rxgain=0.8
txgain=0.8
language=de          
defaultcid=[general]
nationalprefix=0
internationalprefix=00
rxgain=0.8
txgain=0.8
language=de                             ;set default language
defaultcid=7584932
;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=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
msn=7584932

defaultcid=7584932                ;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 to use
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=off                   ;in addition to softdtmf, you can use relaxed dtmf detection
accountcode=2004                                ;Asterisk accountcode to use in CDRs
context=incomming-custom                 ;context for incoming calls
holdtype=local                  ;when Asterisk puts the call on hold, ISDN HOLD will be used. If
                                                                                ;set to 'local' (default value), no hold is done and Asterisk 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
                                                                                ;(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
bridge=yes                                      ;native bridging (CAPI line interconnect) if available
;callgroup=1                            ;Asterisk call group
;language=de                            ;set language for this device (overwrites default language)
devices=2

;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=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
msn=7584932

defaultcid=[general]
nationalprefix=0
internationalprefix=00
rxgain=0.8
txgain=0.8
language=de                             ;set default language
defaultcid=7584932
;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=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
msn=7584932

defaultcid=7584932                ;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 to use
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=off                   ;in addition to softdtmf, you can use relaxed dtmf detection
accountcode=2004                                ;Asterisk accountcode to use in CDRs
context=incomming-custom                 ;context for incoming calls
holdtype=local                  ;when Asterisk puts the call on hold, ISDN HOLD will be used. If
                                                                                ;set to 'local' (default value), no hold is done and Asterisk 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
                                                                                ;(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
bridge=yes                                      ;native bridging (CAPI line interconnect) if available
;callgroup=1                            ;Asterisk call group
;language=de                            ;set language for this device (overwrites default language)
devices=2
                ;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 to use
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=off                   ;in addition to softdtmf, you can use relaxed dtmf detection
accountcode=2004                                ;Asterisk accountcode to use in CDRs
context=incomming-custom                 ;context for incoming calls
holdtype=local                  ;when Asterisk puts the call on hold, ISDN HOLD will be used. If
                                                                                ;set to 'local' (default value), no hold is done and Asterisk 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
                                                                                ;(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
bridge=yes                                      ;native bridging (CAPI line interconnect) if available
;callgroup=1                            ;Asterisk call group
;language=de                            ;set language for this device (overwrites default language)
devices=2

extensions.conf:


In diesem Context wird immer die default MSN (93845) bei ausgehenden Rufen angezeigt:
PHP:
[iax2]
;exten => _0.,1,Dial(CAPI/contr1/7584932:${EXTEN},30,r)
exten => _0.,1,Dial,CAPI/ISDN1/7584932:${EXTEN}|55|Ttr

Hier wird die Nummer immer unterdrückt:

PHP:
[ISDN1]
exten => _0.,1,Dial,CAPI/ISDN1/7584932:${EXTEN}|55|Ttr
;exten => _0.,1,Dial,CAPI/contr1/${EXTEN}|55|Ttr
exten => t,1,Hangup()

Ich möchte in verschiedenen Contexten verschiedene MSNs bei abgehenden Anrufen haben.

Danke und Frohe Ostern ;)
 
Ich empfehle mal ein update von chan_capi.

Armin
 
Ich empfehle mal ein update von chan_capi.

Armin

Ich habe jetzt mal ein Update durchgeführt:

Common ISDN API Driver (1.1.0) www.chan-capi.org
Contr1: 2 B channels total, 2 B channels free

Allerdings hat es trotzdem mit dem setzen der abgehenden Nummer noch nicht geklappt.

Folgendes habe ich eben noch ohne Erfolg getestet:

PHP:
exten => _0.,1,set(CALLERID(num)=7584932)
exten => _0.,n,Dial,CAPI/contr1/${EXTEN}|55|Ttr

und anstatt contr1 auch ISDN1 und noch mit 7584932:${EXTEN}.

Wieso klappt das nicht? :(
 
Was hast du überhaupt für einen Anschluss?
PtP? Zumindest ist es so konfiguriert.


Je nach abgehendem Rufnummerntyp (Internat.,National,Unbekannt) musst du da evtl. deine Vorwahl ohne führende "0" eintragen.

mit
Code:
capi debug
set verbose 3
kann man sehen, was gesendet wird...

Mario
 
-- Accepting overlap voice call from '7584932' to '01608563398' on channel 0/2, span 1
-- Starting simple switch on 'Zap/2-1'
-- Executing Dial("Zap/2-1", "CAPI/ISDN1/7584932:01608563398|55|Ttr") in new stack
> data = ISDN1/7584932:01608563398 format=8
> capi request for interface 'ISDN1'
== ISDN1#02: Call CAPI/ISDN1#02/01608563398-1 (pres=0x20, ton=0x01)
-- Called ISDN1/7584932:01608563398
-- ISDN1#02: received CONNECT_CONF PLCI = 0x101
-- chan_capi queue frame: [ TYPE: Control (4) SUBCLASS: Unknown control '15' (15) ] [ISDN1#02]
-- CAPI/ISDN1#02/01608563398-1 is proceeding passing it to Zap/2-1
-- Channel 0/2, span 1 got hangup request, cause 16
-- ISDN1#02: activehangingup (cause=0) for PLCI=0x101
== Spawn extension (default, 01608563398, 1) exited non-zero on 'Zap/2-1'
-- Hungup 'Zap/2-1'
== ISDN1#02: Interface cleanup PLCI=0x101

Das ist jetzt ein Anruf von einem via ZAP angeschlossenen ISDN-Telefon auf mein Handy. Dort ist die Nummer unterdrückt.
 
Folgendes funktioniert mittlerweile:

PHP:
[local]
exten => 22,1,set(CALLERID(num)=7584932)
exten => 22,n,Dial,CAPI/ISDN1/01608563398|55|Ttr

Wenn ich von einer anderen Extension, oder einem anderen Asterisk aus einen Call absetze habe ich entweder die Standard-Nr, oder die Nr. wird unterdrückt.
 
Zuletzt bearbeitet:
Kostenlos!

Statistik des Forums

Themen
249,052
Beiträge
2,309,531
Mitglieder
378,850
Neuestes Mitglied
IchBinEsDoch