outbound über isdn geht nicht

bubblebob

Neuer User
Mitglied seit
10 Jul 2006
Beiträge
10
Punkte für Reaktionen
0
Punkte
0
hallo forum

nachdem nun endlich meine 2 hfc karten funktionieren kann ich auch eingehende anrufe problemlos entgegen nehmen, jedoch nicht raus telefonieren :(

log
PHP:
asterisk1*CLI>
    -- Executing Macro("SIP/11-89da", "dialout-trunk|1|0800800800||") in new stack
    -- Executing GotoIf("SIP/11-89da", "1?3:2") in new stack
    -- Goto (macro-dialout-trunk,s,3)
    -- Executing Macro("SIP/11-89da", "user-callerid") in new stack
    -- Executing GotoIf("SIP/11-89da", "0?report") in new stack
    -- Executing GotoIf("SIP/11-89da", "0?start") in new stack
    -- Executing Set("SIP/11-89da", "REALCALLERIDNUM=11") in new stack
    -- Executing NoOp("SIP/11-89da", "REALCALLERIDNUM is 11") in new stack
    -- Executing Set("SIP/11-89da", "AMPUSER=11") in new stack
    -- Executing Set("SIP/11-89da", "AMPUSERCIDNAME=bob") in new stack
    -- Executing GotoIf("SIP/11-89da", "0?report") in new stack
    -- Executing Set("SIP/11-89da", "CALLERID(all)=bob <11>") in new stack
    -- Executing NoOp("SIP/11-89da", "Using CallerID "bob" <11>") in new stack
    -- Executing Macro("SIP/11-89da", "record-enable|11|OUT") in new stack
    -- Executing GotoIf("SIP/11-89da", "0 > 0?2:4") in new stack
    -- Goto (macro-record-enable,s,4)
    -- Executing AGI("SIP/11-89da", "recordingcheck|20060724-150239|asterisk-27114-1153746159.12") in new stack
    -- Launched AGI Script /var/lib/asterisk/agi-bin/recordingcheck
  recordingcheck|20060724-150239|asterisk-27114-1153746159.12: Outbound recording not enabled
    -- AGI Script recordingcheck completed, returning 0
    -- Executing NoOp("SIP/11-89da", "No recording needed") in new stack
    -- Executing Macro("SIP/11-89da", "outbound-callerid|1") in new stack
    -- Executing GotoIf("SIP/11-89da", "1?start") in new stack
    -- Goto (macro-outbound-callerid,s,3)
    -- Executing NoOp("SIP/11-89da", "REALCALLERIDNUM is 11") in new stack
    -- Executing Set("SIP/11-89da", "USEROUTCID=0431234567") in new stack
    -- Executing Set("SIP/11-89da", "EMERGENCYCID=") in new stack
    -- Executing Set("SIP/11-89da", "TRUNKOUTCID=0431234567") in new stack
    -- Executing GotoIf("SIP/11-89da", "1?trunkcid") in new stack
    -- Goto (macro-outbound-callerid,s,11)
    -- Executing GotoIf("SIP/11-89da", "0?usercid") in new stack
    -- Executing Set("SIP/11-89da", "CALLERID(all)=0431234567") in new stack
    -- Executing GotoIf("SIP/11-89da", "0?report") in new stack
    -- Executing Set("SIP/11-89da", "CALLERID(all)=0431234567") in new stack
    -- Executing NoOp("SIP/11-89da", "CallerID set to "" <0431234567>") in new stack
    -- Executing Set("SIP/11-89da", "GROUP()=OUT_1") in new stack
    -- Executing GotoIf("SIP/11-89da", "0?108") in new stack
    -- Executing Set("SIP/11-89da", "DIAL_NUMBER=0800800800") in new stack
    -- Executing Set("SIP/11-89da", "DIAL_TRUNK=1") in new stack
    -- Executing AGI("SIP/11-89da", "fixlocalprefix") in new stack
    -- Launched AGI Script /var/lib/asterisk/agi-bin/fixlocalprefix
  fixlocalprefix: Could not parse /etc/asterisk/localprefixes.conf
    -- AGI Script fixlocalprefix completed, returning 0
    -- Executing Set("SIP/11-89da", "OUTNUM=0800800800") in new stack
    -- Executing Set("SIP/11-89da", "custom=ZAP/g0") in new stack
    -- Executing GotoIf("SIP/11-89da", "0?16") in new stack
    -- Executing Dial("SIP/11-89da", "ZAP/g0/0800800800|120|r") in new stack
    -- Requested transfer capability: 0x00 - SPEECH
    -- Called g0/0800800800
    -- Zap/1-1 is proceeding passing it to SIP/11-89da
    -- Channel 0/1, span 1 got hangup request
    -- Channel 0/1, span 1 received AOC-E charging 0 units
    -- Hungup 'Zap/1-1'
  == Everyone is busy/congested at this time (1:0/0/1)
    -- Executing Goto("SIP/11-89da", "s-CHANUNAVAIL|1") in new stack
    -- Goto (macro-dialout-trunk,s-CHANUNAVAIL,1)
    -- Executing NoOp("SIP/11-89da", "Dial failed due to CHANUNAVAIL") in new stack
    -- Executing Macro("SIP/11-89da", "outisbusy|") in new stack
    -- Executing Playback("SIP/11-89da", "all-circuits-busy-now") in new stack
    -- Playing 'all-circuits-busy-now' (language 'de')
    -- Executing Playback("SIP/11-89da", "pls-try-call-later") in new stack
    -- Playing 'pls-try-call-later' (language 'de')
    -- Executing Macro("SIP/11-89da", "hangupcall") in new stack
    -- Executing ResetCDR("SIP/11-89da", "w") in new stack
    -- Executing NoCDR("SIP/11-89da", "") in new stack
    -- Executing Wait("SIP/11-89da", "5") in new stack

wenn ich das richtig intepretiere wird die leitung gleich wieder aufgelegt (vom NT?) darum gehts nicht.

PHP:
    -- Executing Dial("SIP/11-293c", "ZAP/g0/0800800800|120|r") in new stack
    -- Requested transfer capability: 0x00 - SPEECH
    -- Called g0/0800800800
    -- Zap/1-1 is proceeding passing it to SIP/11-293c
    -- Channel 0/1, span 1 got hangup request
    -- Channel 0/1, span 1 received AOC-E charging 0 units
    -- Hungup 'Zap/1-1'



anschliessend versuchte ich das kabel zum nt ab auf die 2te karte zu legen, danach funktionierte weder das eine noch das andere (out/in)

ich bin mir fast sicher das die config der zap interfaces stimmt, mit ist nur nuicht klar warum gleich wieder aufgelegt wird, hier meine zapata.conf
PHP:
[channels]
language=de
switchtype=euroisdn
;If you connect to a hicom PBX set your ISDN Numbering Plan Identifier to unknown.
pridialplan=local
prilocaldialplan=local

;signalling = fxs_ks
rxwink=300

usecallerid=yes
hidecallerid=no
callwaiting=yes
usecallingpres=yes
callwaitingcallerid=yes
threewaycalling=yes
transfer=yes
cancallforward=yes
callreturn=yes
echocancel=yes
echocancelwhenbridged=yes
rxgain=0.0
txgain=0.0
nationalprefix = 0
internationalprefix = 00
faxdetect=incoming
immediate=no
;callgroup=1
;pickupgroup=1

group=0
signalling = bri_cpe_ptmp
context=from-pstn
channel => 1-2

;group=1
;signalling = bri_cpe_ptmp
;context=from-pstn
;channel => 4-5


karten:
PHP:
Zaptel Configuration
======================

SPAN 1: CCS/ AMI Build-out: 399-533 feet (DSX-1)
SPAN 2: CCS/ AMI Build-out: 399-533 feet (DSX-1)

Channel map:

Channel 01: Clear channel (Default) (Slaves: 01)
Channel 02: Clear channel (Default) (Slaves: 02)
Channel 03: D-channel (Default) (Slaves: 03)
Channel 04: Clear channel (Default) (Slaves: 04)
Channel 05: Clear channel (Default) (Slaves: 05)
Channel 06: D-channel (Default) (Slaves: 06)

6 channels configured.

konfiguriert habe ich meine voip server mit freepbx (trixbox)

was mach ich da falsch oder was läuft falsch?
leider fehlt mir hier die erfahrung (noch)

bin für jeden denkanstoss dankbar
 
Hi, hast du inzwischen eine lösung gefunden? ich stehe gerade vor genau dem selben problem

gruß carsten
 
Wenn ich das jetzt richtig betrachte, was sich bei mir ergeben hat, ist das Problem gelöst. Es liegt an der Option

priindication=passthrough

die hat bei mir gefehlt. Asterisk hat die ganze Zeit per "outofband" versucht, herauszufinden, ob die Leitung besetzt ist. Das funktioniert hier in Dtl aber nicht.

Jetzt funktioniert es auch mit dem Nachbarn *zwinker*

Gruß Carsten
 
hi carsten

leider ist das Problem bei mir noch nicht behoben, ich sitze heute schon den ganzen Abend wieder an diesem "Problem".

Leider hat das ändern/einfügen von priindication nichts bewirkt, der Eintrag war bei mir ebenfalls nicht vorhanden.

Kannst du ev. deine Konfiguration posten? Ich währe dir sehr dankbar

Grüsse bob
 
Hast du es mal ohne die führende 0 versucht ?
Hast du 2 ISDN Anschlüsse zum Amt?
In der zapata ist die group 1 auskommentiert.

Ro
 
Hi, ja ich habe 2 ISDN Anschlüsse und daher hatte ich 3 Karten im VoIP Server drinnen. Ich habe nun nur noch eine einzige Karte drin (zwecks Fehlersuche) und auch nur ein ISDN Anschluss angeschlossen.

Ich habe es mit führender Null versucht, ohne Null, mit 2 Nullen, ich habe alles mögliche versucht, bin nun schon seit mehr als 50 Stunden Total an diesem Problem dran. Ich habe auch schon den Server 4 mal komplett neu Installiert und ein Fehler meinerseits auszuschließen, ich habe mit sogar den Server von einem Freund noch Neuinstallieren lassen da ich dachte ich mache was falsch allerdings traten bei Ihm die selben Probleme (kommt nicht raus) auf :(

Die Hardware kann ich als Fehlerquelle ausschließen, da ich diese auch schon 2 mal ausgetauscht habe, ich bin echt ratlos :(

Weiß jemand einen Profi der mir das Problem für Geld beheben kann?

Meine Nerven sind langsam echt überstrapaziert, ich verstehe einfach nicht warum es nicht läuft, auf der alten Kiste lief es mit misdn ohne Probleme (dafür hatte ich andere Probs).

Grüße vom ratlosen bob

BTW: Ein Trixbox Update hat mir schon 2 mal die ganze Kiste zerschossen (Karten werden nicht mehr erkennet).
 
bubblebob schrieb:
Hi, ja ich habe 2 ISDN Anschlüsse und daher hatte ich 3 Karten im VoIP Server drinnen. Ich habe nun nur noch eine einzige Karte drin (zwecks Fehlersuche) und auch nur ein ISDN Anschluss angeschlossen.
Aber kein Anlagenanschluss, oder (signalling=bri_cpe_ptmp oder bri_cpe)?
Ich habe es mit führender Null versucht, ohne Null, mit 2 Nullen, ich habe alles mögliche versucht...
mal mit "bri debug span 1" etc. auf der Console probieren? Nomal spuckt das dann ISDN Causes aus, welche man z.B. http://de.opensuse.org/SDB:ISDN_Cause_Meldungen nachschlagen kann.

BTW: Ein Trixbox Update hat mir schon 2 mal die ganze Kiste zerschossen (Karten werden nicht mehr erkennet).
Deswegen HDD Image machen :)

Gruß Ripper
 
Meine zapata auf Test IPCOP 1.4.10.
Es funktioren ein und ausgehende Gespräche.

Zapata telephony interface
[channels]
language=de
overlapdial=yes
switchtype = euroisdn
; p2mp TE mode
signalling = bri_cpe_ptmp
priindication = outofband

nationalprefix = 0
internationalprefix = 00

usecallerid=yes

;echocancel=yes
;echotraining = 100
;echocancelwhenbridged=yes

immediate=no
;callerid=asreceived
group = 1
context=isdn-in
channel => 1-2

Welchen CODEC verwendest du am SIP Telefon? GSM?

50 Stunden hatte ich auch fast voll.....
Ro.
 
dasselbe

Ja bei mir auch dasselbe. Eingehend ok , aus - out is busy....
-------------------------------------------------------------
meine zapata.conf sieht auch so aus

priindication=passthrough oder outofband
zeigt keine diesbezügliche Reaktion nachdem ich es eingetragen hab.

ich hab was gefunden:
AOC- heisst AdviceOfCharge E End of Call / S Setup of Call / D During Call
ist beschrieben hier:
http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-211.pdf
Und nach den ersten 5 Min Studium ist dies nicht die Ursache...

Bei mir kommt wenigsten eine Meldung cause 42 - und die ist beschrieben:
Cause #42 2A In der Vermittlungsstelle, die diesen Grund absendet, ist zur Zeit aus Überlastgründen kein Kanal verfügbar.
Zeigt demnach ggf auf zaptel - ich versuch mich mal dort...
 
Zuletzt bearbeitet:
Ich bekomme die selbe Meldung, Cause 42 :(

Unterdessen habe ich die Kiste wieder zerschossen, die 6ste Neuinstallation beginnt in Kürze auch wenn mich die Sache unterdessen *** ;)

Ich bin echt "froh" das ich nicht der einzige mit diesem Problem bin, ich dachte schon ich sei ein totaler Vollidiot, beim ersten VoIP Server mit mISDN lief die Sache nach 2 Tagen vollumfänglich....

Als Client verwende ich X-Tapi (die kostenpflichtige Luxus Version), arbeitet wunderbar mit TwixTel zusammen, beim Anruf geht mein bzw. ging mein Twix (Server Version) auf und zeigte die Adresse des Anrufers an.

@riedere
Ich komme auch aus der Schweiz, mein Server hängt direkt am NT A/B der Swisscom ohne Zentrale oder so dazwischen
 
ICH HABS!!!! ES LÄUFT!!!!

Sorry fürs Gross-schreiben aber ich kanns kaum glauben das es nun endlich läuft, in and out. Ich wollte schon aufgeben, da dachte ich mir ich spiele ein wenig mit dem Webinterface rum und Bingo.

Natürlich will ich meine neuen Erkenntnisse mit euch teilen, meine zapata.conf:
PHP:
[channels]
language=de
overlapdial=yes
switchtype = euroisdn
; p2mp TE mode
signalling = bri_cpe_ptmp
priindication = passthrough

nationalprefix = 0
internationalprefix = 00

usecallerid=yes

;echocancel=yes
;echotraining = 100
;echocancelwhenbridged=yes

immediate=no
;callerid=asreceived
group = 0
context=from-pstn
channel => 1-2

Neue Einstellungen im Webinterface:
-> Outbound Routes:
route name: out
dial platterns: XXX.
trunk: zap/g0

-> Trunks: Trunk ZAP/g0:
outbound caller id: 123456 (meine msn)
dial rules: X|.
zap: g0

Keine Ahnung warum es jetzt geht, ich habe nur unter "Trunks" die dial rules und die msn eingefügt.

ABER
Beim abgehenden ruf wird leider die falsche MSN übertragen :(
Es wird immer die Haupt-MSN des ISDN Anschlusses raugeschickt, die Haupt MSN ist aber nicht unsere Hauptrufnummer. Ich möchte nun das die MSN welche ich eingetragen habe auch übertragen wird, wie kann ich das anstellen?

Laut log wird die richtige MSN übertagen (0434434343), auf dem Handy wird aber unsere Haupt MSN angezeigt (0439601234) :(

Hier das Log eines Anrufes auf mein Handy:
PHP:
Verbosity is at least 7
Core debug is at least 1
    -- Executing Macro("SIP/11-097a8998", "dialout-trunk|1|0781234567||") in new stack
    -- Executing GotoIf("SIP/11-097a8998", "1?3:2") in new stack
    -- Goto (macro-dialout-trunk,s,3)
    -- Executing Macro("SIP/11-097a8998", "user-callerid") in new stack
    -- Executing GotoIf("SIP/11-097a8998", "0?report") in new stack
    -- Executing GotoIf("SIP/11-097a8998", "0?start") in new stack
    -- Executing Set("SIP/11-097a8998", "REALCALLERIDNUM=11") in new stack
    -- Executing NoOp("SIP/11-097a8998", "REALCALLERIDNUM is 11") in new stack
    -- Executing Set("SIP/11-097a8998", "AMPUSER=11") in new stack
    -- Executing Set("SIP/11-097a8998", "AMPUSERCIDNAME=bob") in new stack
    -- Executing GotoIf("SIP/11-097a8998", "0?report") in new stack
    -- Executing Set("SIP/11-097a8998", "CALLERID(all)=bob <11>") in new stack
    -- Executing NoOp("SIP/11-097a8998", "Using CallerID "bob" <11>") in new stack
    -- Executing Macro("SIP/11-097a8998", "record-enable|11|OUT") in new stack
    -- Executing GotoIf("SIP/11-097a8998", "0 > 0?2:4") in new stack
    -- Goto (macro-record-enable,s,4)
    -- Executing AGI("SIP/11-097a8998", "recordingcheck|20060817-020327|asterisk-3554-1155773007.34") in new stack
    -- Launched AGI Script /var/lib/asterisk/agi-bin/recordingcheck
  recordingcheck|20060817-020327|asterisk-3554-1155773007.34: Outbound recording not enabled
    -- AGI Script recordingcheck completed, returning 0
    -- Executing NoOp("SIP/11-097a8998", "No recording needed") in new stack
    -- Executing Macro("SIP/11-097a8998", "outbound-callerid|1") in new stack
    -- Executing GotoIf("SIP/11-097a8998", "1?start") in new stack
    -- Goto (macro-outbound-callerid,s,3)
    -- Executing NoOp("SIP/11-097a8998", "REALCALLERIDNUM is 11") in new stack
    -- Executing Set("SIP/11-097a8998", "USEROUTCID=0434434343") in new stack
    -- Executing Set("SIP/11-097a8998", "EMERGENCYCID=") in new stack
    -- Executing Set("SIP/11-097a8998", "TRUNKOUTCID=4434343") in new stack
    -- Executing GotoIf("SIP/11-097a8998", "1?trunkcid") in new stack
    -- Goto (macro-outbound-callerid,s,11)
    -- Executing GotoIf("SIP/11-097a8998", "0?usercid") in new stack
    -- Executing Set("SIP/11-097a8998", "CALLERID(all)=4434343") in new stack
    -- Executing GotoIf("SIP/11-097a8998", "0?report") in new stack
    -- Executing Set("SIP/11-097a8998", "CALLERID(all)=0434434343") in new stack
    -- Executing NoOp("SIP/11-097a8998", "CallerID set to "" <0434434343>") in new stack
    -- Executing Set("SIP/11-097a8998", "GROUP()=OUT_1") in new stack
    -- Executing GotoIf("SIP/11-097a8998", "0?108") in new stack
    -- Executing Set("SIP/11-097a8998", "DIAL_NUMBER=0781234567") in new stack
    -- Executing Set("SIP/11-097a8998", "DIAL_TRUNK=1") in new stack
    -- Executing AGI("SIP/11-097a8998", "fixlocalprefix") in new stack
    -- Launched AGI Script /var/lib/asterisk/agi-bin/fixlocalprefix
  fixlocalprefix: Removed prefix.  New number: 781234567
    -- AGI Script fixlocalprefix completed, returning 0
    -- Executing Set("SIP/11-097a8998", "OUTNUM=781234567") in new stack
    -- Executing Set("SIP/11-097a8998", "custom=ZAP/g0") in new stack
    -- Executing GotoIf("SIP/11-097a8998", "0?16") in new stack
    -- Executing Dial("SIP/11-097a8998", "ZAP/g0/781234567|120|r") in new stack
1 -- Making new call for cr 144
    -- Requested transfer capability: 0x00 - SPEECH
1 > Protocol Discriminator: Q.931 (8)  len=38
1 > Call Ref: len= 1 (reference 16/0x10) (Originator)
1 > Message type: SETUP (5)
1 > [1 041  031  801  901  a31 ]
1 > Bearer Capability (len= 5) [ Ext: 1  Q.931 Std: 0  Info transfer capability: Speech (0)
1 >                              Ext: 1  Trans mode/rate: 64kbps, circuit-mode (16)
1 >                              Ext: 1  User information layer 1: A-Law (35)
1 > [1 181  011  811 ]
1 > Channel ID (len= 3) [ Ext: 1  IntID: Implicit, Other Spare: 0, Preferred Dchan: 0
1 >                        ChanSel: B1 channel
1                          ]
1 > [1 6c1  0c1  211  811  301  341  331  341  341  331  351  301  351  301 ]
1 > Calling Number (len=14) [ Ext: 0  TON: National Number (2)  NPI: ISDN/Telephony Numbering Plan (E.164/E.163) (1)
1 >                           Presentation: Presentation permitted, user number passed network screening (1) '0434434343' ]
1 > [1 701  0a1  a11  371  381  381  301  351  341  331  341  331 ]
1 > Called Number (len=12) [ Ext: 1  TON: National Number (2)  NPI: ISDN/Telephony Numbering Plan (E.164/E.163) (1) '781234567' ]
    -- Called g0/781234567
1 < Protocol Discriminator: Q.931 (8)  len=7
1 < Call Ref: len= 1 (reference 144/0x90) (Terminator)
1 < Message type: SETUP ACKNOWLEDGE (13)
1 < [1 181  011  891 ]
1 < Channel ID (len= 3) [ Ext: 1  IntID: Implicit, Other Spare: 0, Exclusive Dchan: 0
1 <                        ChanSel: B1 channel
1                          ]
1 -- Processing IE 24 (cs0, Channel Identification)
1 < Protocol Discriminator: Q.931 (8)  len=4
1 < Call Ref: len= 1 (reference 144/0x90) (Terminator)
1 < Message type: CALL PROCEEDING (2)
    -- Zap/1-1 is proceeding passing it to SIP/11-097a8998
1 < Protocol Discriminator: Q.931 (8)  len=8
1 < Call Ref: len= 1 (reference 144/0x90) (Terminator)
1 < Message type: PROGRESS (3)
1 < [1 1e1  021  821  881 ]
1 < Progress Indicator (len= 4) [ Ext: 1  Coding: CCITT (ITU) standard (0) 0: 0   Location: Public network serving the local user (2)
1 <                               Ext: 1  Progress Description: Inband information or appropriate pattern now available. (8) ]
1 -- Processing IE 30 (cs0, Progress Indicator)
    -- Zap/1-1 is making progress passing it to SIP/11-097a8998
1 < Protocol Discriminator: Q.931 (8)  len=8
1 < Call Ref: len= 1 (reference 144/0x90) (Terminator)
1 < Message type: ALERTING (1)
1 < [1 1e1  021  821  881 ]
1 < Progress Indicator (len= 4) [ Ext: 1  Coding: CCITT (ITU) standard (0) 0: 0   Location: Public network serving the local user (2)
1 <                               Ext: 1  Progress Description: Inband information or appropriate pattern now available. (8) ]
1 -- Processing IE 30 (cs0, Progress Indicator)
    -- Zap/1-1 is ringing
1 NEW_HANGUP DEBUG: Calling q931_hangup, ourstate Call Delivered, peerstate Call Received
1 > Protocol Discriminator: Q.931 (8)  len=8
1 > Call Ref: len= 1 (reference 16/0x10) (Originator)
1 > Message type: DISCONNECT (69)
1 > [1 081  021  811  901 ]
1 > Cause (len= 4) [ Ext: 1  Coding: CCITT (ITU) standard (0) 0: 0   Location: Private network serving the local user (1)
1 >                  Ext: 1  Cause: Unknown (16), class = Normal Event (1) ]
    -- Hungup 'Zap/1-1'
1 < Protocol Discriminator: Q.931 (8)  len=45
1 < Call Ref: len= 1 (reference 144/0x90) (Terminator)
1 < Message type: RELEASE (77)
1 < [1 1c1  1d1  911  a11  1a1  021  021  001  801  021  011  231  301  111  301  0f1  a11  0d1  811  031  461  521  2e1  a21  061  811  011  001  821  011  011 ]
1 < Facility (len=31, codeset=0) [ 1 0x91, 0xa1, 0x1a, 0x02, 0x02, 0x00, 0x80, 0x02, 0x01, 0x23, '0', 0x11, '0', 0x0f, 0xa1, 0x0d, 0x81, 0x03, 'FR', 0x2e, 0xa2, 0x06, 0x81, 0x01, 0x00, 0x82, 0x01, 0x011  ]
1 < [1 281  081  461  521  2e1  201  301  2e1  301  301 ]
1 < Display (len= 8) [ FR. 0.00 ]
1 -- Processing IE 28 (cs0, Facility)
1 Handle Q.932 ROSE Invoke component
1 -- Processing IE 40 (cs0, Display)
1 NEW_HANGUP DEBUG: Calling q931_hangup, ourstate Null, peerstate Release Request
1 > Protocol Discriminator: Q.931 (8)  len=8
1 > Call Ref: len= 1 (reference 16/0x10) (Originator)
1 > Message type: RELEASE COMPLETE (90)
1 > [1 081  021  801  901 ]
1 > Cause (len= 4) [ Ext: 1  Coding: CCITT (ITU) standard (0) 0: 0   Location: User (0)
1 >                  Ext: 1  Cause: Unknown (16), class = Normal Event (1) ]
1 NEW_HANGUP DEBUG: Calling q931_hangup, ourstate Null, peerstate Null
1 NEW_HANGUP DEBUG: Destroying the call, ourstate Null, peerstate Null
    -- Channel 0/1, span 1 received AOC-E charging 0 units

Das gleich "Problem" mit der MSN tritt bei der Warteschlange auf, sobald ein anrufer in die Warteschalnge kommt wird auf das ISDN Telefon des Anrufers unser Haupt MSN (nicht die Premium Nr.) übertragen.

Für heute bin ich mit dem erreichten mehr als zufrieden, outbound läuft mal auch wenns die falsche MSN ist, für heute ist gut :-o
 
bubblebob schrieb:
Kannst du ev. deine Konfiguration posten? Ich währe dir sehr dankbar

Grüsse bob

natürlich...
vielleicht bringt das erhellung:

Code:
/etc/zaptel.conf
loadzone=de
defaultzone=de
# qozap span definitions
# most of the values should be bogus because we are not really zaptel
span=1,1,3,ccs,ami
span=2,2,3,ccs,ami
span=3,0,3,ccs,ami
span=4,0,3,ccs,ami

bchan=1,2
dchan=3
bchan=4,5
dchan=6
bchan=7,8
dchan=9
bchan=10,11
dchan=12

Code:
/etc/asterisk/zapata.conf
[channels]
language=de
switchtype = euroisdn
pridialplan = local
prilocaldialplan = dynamic
nationalprefix = 0
internationalprefix = 00
priindication = passthrough
pritransfer = ect
callwaiting=yes
echocancel = yes
context=from-pstn 
faxdetect=both

signalling = bri_cpe

group = 1 
; S/T port 1
channel => 1-2

group = 2 
; S/T port 2
channel => 4-5

signalling = bri_cpe_ptmp

group = 3 
; S/T port 3
channel => 7-8

group = 4 
; S/T port 4
channel => 10-11

vielleicht hilft das

gruß carsten
 
Abgehende MSN:
Da gibt es im Forum wiedersprüchliche Aussagen.
Bei mir geholfen hat:
Zapata.conf
prilocaldialplan=local
;pridialplan nicht angegeben, also national

extensions.conf
exten => _0.,1,SetCidnum(9668051) ; Rufnummer ohne Vorwahl / nur MSN
exten => _0.,n,Dial(Zap/g1/${EXTEN:1},20,tT)
exten => _0.,n,Hangup

Das hat geholfen.
Ro
 
@carsten

Danke für deine Config, wie ist dein System aufgebaut? Ich frage weil mein System im Moment nur mit einer Karte läuft wir aber aubauen wollen (2 NT A/B plus GSM Karte mit 4 Sims)

@rohrbage
Danke für den Tipp, nur weiss ich nicht wo ich das einbauen muss, bei der alten Config währe es mir klar gewesen da ich dahmals alle von Hand gemacht habe nun verwende ich haber freePBX zum einstellen (trixbox) und weiss vor lautet Makros nicht wo hin damit :(

Währe dankbar für einen Tipp, mein extensions.conf:
PHP:
; Asterisk Management Portal (AMP)
; Copyright (C) 2004 Coalescent Systems Inc

; dialparties.agi (http://www.sprackett.com/asterisk/)
; Asterisk::AGI (http://asterisk.gnuinter.net/)
; gsm (http://www.ibiblio.org/pub/Linux/utils/compress/!INDEX.short.html)
; loligo sounds (http://www.loligo.com/asterisk/sounds/)
; mpg123 (http://voip-info.org/wiki-Asterisk+config+musiconhold.conf)


; include extension contexts generated from AMP
#include extensions_additional.conf

; Customizations to this dialplan should be made in extensions_custom.conf
; See extensions_custom.conf.sample for an example
#include extensions_custom.conf

[from-trunk]							; just an alias since VoIP shouldn't be called PSTN
include => from-pstn

[from-pstn]
include => from-pstn-custom                     ; create this context in extensions_custom.conf to include customizations
include => ext-findmefollow		; MODIFICATOIN (PL) for findmefollow if enabled, should be bofore ext-local
include => ext-did-direct		; MODIFICATOIN (PL) put before ext-did to take precedence
include => ext-did
exten => fax,1,Goto(ext-fax,in_fax,1)

; MODIFICATION (PL) 
;
; Required to assure that direct dids go to personal ring group before local extension.
; This could be auto-generated however I it is prefered to be put here and hard coded
; so that it can be modified if ext-local should take precedence in certain situations.
; will have to decide what to do later.
;
[from-did-direct]
include => ext-findmefollow
include => ext-local



; ############################################################################
; Macros [macro]
; ############################################################################

; Rings one or more extensions.  Handles things like call forwarding and DND
; We don't call dial directly for anything internal anymore.
; ARGS: $TIMER, $OPTIONS, $EXT1, $EXT2, $EXT3, ...
; Use a Macro call such as the following: 
;  Macro(dial,$DIAL_TIMER,$DIAL_OPTIONS,$EXT1,$EXT2,$EXT3,...)
[macro-dial]
exten => s,1,AGI,dialparties.agi
exten => s,2,NoOp(Returned from dialparties with no extensions to call)
exten => s,3,NoOp(DIALSTATUS is '${DIALSTATUS}')

exten => s,10,Dial(${ds})                               ; dialparties will set the priority to 10 if $ds is not null

exten => s,20,NoOp(Returned from dialparties with hunt groups to dial )
exten => s,21,Set(HuntLoop=0)
exten => s,22,GotoIf($[${HuntMembers} >= 1]?30 )  ; if this is from rg-group, don't strip prefix
exten => s,23,NoOp(Returning there are no members left in the hunt group to ring)

exten => s,30,Set(HuntMember=HuntMember${HuntLoop})
exten => s,31,GotoIf($[$["${CALLTRACE_HUNT}" != "" ] & $["${RingGroupMethod}" = "hunt" ]]?32:35 )  ; Set CAll Trace for Hunt member we are going to call
exten => s,32,Set(CT_EXTEN=${CUT(ARG3,,$[${HuntLoop} + 1])})
exten => s,33,Set(DB(CALLTRACE/${CT_EXTEN})=${CALLTRACE_HUNT})
exten => s,34,Goto(s,42)

exten => s,35,GotoIf($[$["${CALLTRACE_HUNT}" != "" ] & $["${RingGroupMethod}" = "memoryhunt" ]]?36:50 )  ;Set Call Trace for each hunt member we are going to call "Memory groups have multiple members to set CALL TRACE For hence the loop
exten => s,36,Set(CTLoop=0)
exten => s,37,GotoIf($[${CTLoop} > ${HuntLoop}]?42 )  ; if this is from rg-group, don't strip prefix
exten => s,38,Set(CT_EXTEN=${CUT(ARG3,,$[${CTLoop} + 1])})
exten => s,39,Set(DB(CALLTRACE/${CT_EXTEN})=${CALLTRACE_HUNT})
exten => s,40,Set(CTLoop=$[1 + ${CTLoop}])
exten => s,41,Goto(s,37)
        
exten => s,42,Dial(${${HuntMember}}${ds} ) ; dialparties will set the priority to 20 if $ds is not null and its a hunt group
exten => s,43,Set(HuntLoop=$[1 + ${HuntLoop}])
exten => s,44,Set(HuntMembers=$[${HuntMembers} - 1])
exten => s,45,Goto(s,22)
exten => s,50,DBdel(CALLTRACE/${CT_EXTEN})
exten => s,51,Goto(s,42)

; Ring an extension, if the extension is busy or there is no answer send it
; to voicemail
; ARGS: $VMBOX, $EXT
[macro-exten-vm]
exten => s,1,Macro(user-callerid)
exten => s,n,Set(FROMCONTEXT=exten-vm)
exten => s,n,Set(VMBOX=${ARG1})
exten => s,n,Set(EXTTOCALL=${ARG2})
exten => s,n,Set(CFUEXT=${DB(CFU/${EXTTOCALL})})
exten => s,n,Set(RT=${IF($[$["${VMBOX}"!="novm"] | $["foo${CFUEXT}"!="foo"]]?${RINGTIMER}:"")})
exten => s,n,Macro(record-enable,${EXTTOCALL},IN)
exten => s,n,GotoIf($["${CHANNEL:0:5}" = "Local"]?dolocaldial,1) ; if the channel is Local
exten => s,n,Macro(dial,${RT},${DIAL_OPTIONS},${EXTTOCALL})
exten => s,n,GosubIf($[$["${DIALSTATUS}"="NOANSWER"] & $["foo${CFUEXT}"!="foo"]]?docfu,1) ; check for CFU in use on no answer
exten => s,n,NoOp(Voicemail is '${VMBOX}')
exten => s,n,GotoIf($["${VMBOX}" = "novm"]?s-${DIALSTATUS},1) ; no voicemail in use for this extension
exten => s,n,NoOp(Sending to Voicemail box ${EXTTOCALL})
exten => s,n,Macro(vm,${VMBOX},${DIALSTATUS})

; Local channel should try to ring the phone only then come back out
; i.e. it's wrong for it to Answer the call in any way (including Congestion
; and stop the initiating dialplan from being returned to)
exten => dolocaldial,1,Macro(dial,,${DIAL_OPTIONS},${EXTTOCALL})
exten => dolocaldial,n,NoOp(Returned to dolocaldial with DIALSTATUS '${DIALSTATUS}')

; Try the Call Forward on No Answer / Unavailable number
exten => docfu,1,Set(RTCFU=${IF($["${VMBOX}"!="novm"]?${RINGTIMER}:"")})
exten => docfu,n,Dial(Local/${CFUEXT}@from-internal/n,${RTCFU},${DIAL_OPTIONS})
exten => docfu,n,Return

; Extensions with no Voicemail box reporting BUSY come here
exten => s-BUSY,1,NoOp(Extension is reporting BUSY and not passing to Voicemail)
exten => s-BUSY,n,Busy()
exten => s-BUSY,n,Wait(60)
exten => s-BUSY,n,Congestion()

; Anything but BUSY comes here
exten => _s-.,1,Congestion()

[macro-vm]
exten => s,1,Macro(user-callerid)
exten => s,n,Set(VMGAIN=${IF($["foo${VM_GAIN}"!="foo"]?"g(${VM_GAIN})":"")})
exten => s,n,Goto(s-${ARG2},1)

exten => s-BUSY,1,NoOp(BUSY voicemail)
exten => s-BUSY,n,Macro(get-vmcontext,${ARG1})
exten => s-BUSY,n,Voicemail(${ARG1}@${VMCONTEXT}|b${VMGAIN})   ; Voicemail Busy message
exten => s-BUSY,n,Goto(exit-${VMSTATUS},1)

exten => s-DIRECTDIAL,1,NoOp(DIRECTDIAL voicemail)
exten => s-DIRECTDIAL,n,Macro(get-vmcontext,${ARG1})
exten => s-DIRECTDIAL,n,Voicemail(${ARG1}@${VMCONTEXT}|${VM_DDTYPE}${VMGAIN})
exten => s-DIRECTDIAL,n,Goto(exit-${VMSTATUS},1)

exten => _s-.,1,Macro(get-vmcontext,${ARG1})
exten => _s-.,n,Voicemail(${ARG1}@${VMCONTEXT}|u${VMGAIN})     ; Voicemail Unavailable message
exten => _s-.,n,Goto(exit-${VMSTATUS},1)

exten => o,1,Background(one-moment-please)      ; 0 during vm message will hangup
exten => o,n,GotoIf($["foo${FROM_DID}" = "foo"]?from-pstn,s,1:from-pstn,${FROM_DID},1)

exten => a,1,Macro(get-vmcontext,${ARG1})
exten => a,n,VoiceMailMain(${ARG1}@${VMCONTEXT})
exten => a,n,Hangup

exten => exit-FAILED,1,Playback(im-sorry&an-error-has-occured)
exten => exit-FAILED,n,Hangup()

exten => exit-SUCCESS,1,Playback(goodbye)
exten => exit-SUCCESS,n,Hangup()

exten => exit-USEREXIT,1,Playback(goodbye)
exten => exit-USEREXIT,n,Hangup()

exten => t,1,Hangup()

; get the voicemail context for the user in ARG1
[macro-get-vmcontext]
exten => s,1,Set(VMCONTEXT=${DB(AMPUSER/${ARG1}/voicemail)})
exten => s,2,GotoIf($["foo${VMCONTEXT}" = "foo"]?200:300)
exten => s,200,Set(VMCONTEXT=default)
exten => s,300,NoOp()

; For some reason, if I don't run setCIDname, CALLERID(name) will be blank in my AGI
; ARGS: none
[macro-fixcid]
exten => s,1,Set(CALLERID(name)=${CALLERID(name)})

; Ring groups of phones
; ARGS: comma separated extension list
; 1 - Ring Group Strategy
; 2 - ringtimer
; 3 - prefix
; 4 - extension list
[macro-rg-group]
exten => s,1,Macro(user-callerid)
exten => s,2,GotoIf($["${CALLERID(name):0:${LEN(${RGPREFIX})}}" != "${RGPREFIX}"]?4:3)  ; check for old prefix
exten => s,3,Set(CALLERID(name)=${CALLERID(name):${LEN(${RGPREFIX})}}) ; strip off old prefix
exten => s,4,Set(RGPREFIX=${ARG3})  ; set new prefix
exten => s,5,Set(CALLERID(name)=${RGPREFIX}${CALLERID(name)})  ; add prefix to callerid name
exten => s,6,Set(RecordMethod=Group)  ; set new prefix
exten => s,7,Macro(record-enable,${MACRO_EXTEN},${RecordMethod})
exten => s,8,Set(RingGroupMethod=${ARG1})     ;
exten => s,9,Macro(dial,${ARG2},${DIAL_OPTIONS},${ARG4})
exten => s,10,Set(RingGroupMethod='')     ;


;
; Outgoing channel(s) are busy ... inform the client
;
[macro-outisbusy]
exten => s,1,Playback(all-circuits-busy-now)
exten => s,2,Playback(pls-try-call-later)
exten => s,3,Macro(hangupcall)

; What to do on hangup.
[macro-hangupcall]
exten => s,1,ResetCDR(w)
exten => s,2,NoCDR()
exten => s,3,Wait(5)
exten => s,4,Hangup

[macro-faxreceive]
exten => s,1,Set(FAXFILE=/var/spool/asterisk/fax/${UNIQUEID}.tif)
exten => s,2,Set(EMAILADDR=${FAX_RX_EMAIL})
exten => s,3,rxfax(${FAXFILE})
exten => s,103,Set(EMAILADDR=${FAX_RX_EMAIL})
exten => s,104,Goto(3)

; dialout and strip the prefix
[macro-dialout]
exten => s,1,Macro(user-callerid)
exten => s,2,GotoIf($["${ECID${CALLERID(number)}}" = ""]?5) 	;check for CID override for exten
exten => s,3,Set(CALLERID(all)=${ECID${CALLERID(number)}})
exten => s,4,Goto(7)
exten => s,5,GotoIf($["${OUTCID_${ARG1}}" = ""]?7) 		;check for CID override for trunk
exten => s,6,Set(CALLERID(all)=${OUTCID_${ARG1}})
exten => s,7,Set(length=${LEN(${DIAL_OUT_${ARG1}})})
exten => s,8,Dial(${OUT_${ARG1}}/${ARG2:${length}})
exten => s,9,Congestion
exten => s,109,Macro(outisbusy)


; dialout using default OUT trunk - no prefix
[macro-dialout-default]
exten => s,1,Macro(user-callerid)
exten => s,2,Macro(record-enable,${CALLERID(number)},OUT)
exten => s,3,Macro(outbound-callerid,${ARG1})
exten => s,4,Dial(${OUT}/${ARG1})
exten => s,5,Congestion
exten => s,105,Macro(outisbusy)

; dialout using a trunk, using pattern matching (don't strip any prefix)
; arg1 = trunk number, arg2 = number, arg3 = route password
;
; MODIFIED (PL)
;
; Modified both Dial() commands to include the new TRUNK_OPTIONS from the general
; screen of AMP
;
[macro-dialout-trunk]
exten => s,1,GotoIf($["${ARG3}" = ""]?3:2)	; arg3 is pattern password
exten => s,2,Authenticate(${ARG3})
exten => s,3,Macro(user-callerid)
exten => s,4,Macro(record-enable,${CALLERID(number)},OUT)
exten => s,5,Macro(outbound-callerid,${ARG1})
exten => s,6,Set(GROUP()=OUT_${ARG1})
exten => s,7,GotoIf($[ ${GROUP_COUNT()} > ${OUTMAXCHANS_${ARG1}} ]?108)
; if we've used up the max channels, continue at (n+101)
exten => s,8,Set(DIAL_NUMBER=${ARG2})
exten => s,9,Set(DIAL_TRUNK=${ARG1})
exten => s,10,AGI(fixlocalprefix) ; this sets DIAL_NUMBER to the proper dial string for this trunk
exten => s,11,Set(OUTNUM=${OUTPREFIX_${ARG1}}${DIAL_NUMBER})  ; OUTNUM is the final dial number
exten => s,12,Set(custom=${CUT(OUT_${ARG1},:,1)})  ; Custom trunks are prefixed with "AMP:"
exten => s,13,GotoIf($["${custom}" = "AMP"]?16)
exten => s,14,Dial(${OUT_${ARG1}}/${OUTNUM},120,${TRUNK_OPTIONS})  ; Regular Trunk Dial
exten => s,15,Goto(s-${DIALSTATUS},1)

; This is a custom trunk.  Substitute $OUTNUM$ with the actual number and rebuild the dialstring
; example trunks: "AMP:CAPI/XXXXXXXX:b$OUTNUM$,30,r", "AMP:OH323/[email protected]:XXXX"
exten => s,16,Set(pre_num=${CUT(OUT_${ARG1},$,1)})
exten => s,17,Set(the_num=${CUT(OUT_${ARG1},$,2)})  ; this is where we expect to find string OUTNUM
exten => s,18,Set(post_num=${CUT(OUT_${ARG1},$,3)})
exten => s,19,GotoIf($["${the_num}" = "OUTNUM"]?20:21) ; if we didn't find "OUTNUM", then skip to Dial
exten => s,20,Set(the_num=${OUTNUM}) ; replace "OUTNUM" with the actual number to dial
exten => s,21,Dial(${pre_num:4}${the_num}${post_num},120,${TRUNK_OPTIONS})
exten => s,22,Goto(s-${DIALSTATUS},1)

exten => s,108,Noop(max channels used up)

exten => s-BUSY,1,NoOp(Trunk is reporting BUSY)
exten => s-BUSY,2,Busy()
exten => s-BUSY,3,Wait(60)
exten => s-BUSY,4,NoOp()

exten => _s-.,1,NoOp(Dial failed due to ${DIALSTATUS})

; Adds a dynamic agent/member to a Queue
; Prompts for call-back number - in not entered, uses CIDNum
[macro-agent-add]
exten => s,1,Wait(1)
exten => s,2,Macro(user-callerid)
exten => s,3,Read(CALLBACKNUM,agent-user)  	; get callback number from user
exten => s,4,GotoIf($["${CALLBACKNUM}" = ""]?5:7))	; if user just pressed # or timed out, use cidnum
exten => s,5,Set(CALLBACKNUM=${CALLERID(number)})
exten => s,6,GotoIf($["${CALLBACKNUM}" = ""]?2))	; if still no number, start over
exten => s,7,GotoIf($["${ARG2}" = ""]?9:8))	; arg2 is queue password
exten => s,8,Authenticate(${ARG2})
exten => s,9,AddQueueMember(${ARG1}|Local/${CALLBACKNUM}@from-internal/n)	; using chan_local allows us to have agents over trunks
exten => s,10,UserEvent(Agentlogin|Agent: ${CALLBACKNUM})
exten => s,11,Wait(1)
exten => s,12,Playback(agent-loginok)
exten => s,13,Hangup()

; Removes a dynamic agent/member from a Queue
; Prompts for call-back number - in not entered, uses CIDNum
[macro-agent-del]
exten => s,1,Wait(1)
exten => s,2,Macro(user-callerid)
exten => s,3,Read(CALLBACKNUM,agent-user)  	; get callback number from user
exten => s,4,GotoIf($["${CALLBACKNUM}" = ""]?5:7))	; if user just pressed # or timed out, use cidnum
exten => s,5,Set(CALLBACKNUM=${CALLERID(number)})
exten => s,6,GotoIf($["${CALLBACKNUM}" = ""]?2))	; if still no number, start over
exten => s,7,RemoveQueueMember(${ARG1}|Local/${CALLBACKNUM}@from-internal/n)
exten => s,8,UserEvent(RefreshQueue)
exten => s,9,Wait(1)
exten => s,10,Playback(agent-loggedoff)
exten => s,11,Hangup()

; arg1 = trunk number, arg2 = number
[macro-dialout-enum]
; This has been violently beaten upon by Rob Thomas, [email protected]
; to 1: Be compliant with all the depreciated bits in asterisk 1.2 and
; above, and 2: to give a good shot at attempting to be compliant with
; RFC3761 by honouring the order in which records are returned.
exten => s,1,GotoIf($["${ARG3}" = ""]PASSWD?NOPASSWD); arg3 is pattern password 
exten => s,n(PASSWD),Authenticate(${ARG3}) 
exten => s,n(NOPASSWD),Macro(user-callerid) 
exten => s,n,Macro(record-enable,${CALLERID(number)},OUT)
exten => s,n,Macro(outbound-callerid,${ARG1})
exten => s,n,Set(GROUP()=OUT_${ARG1})
exten => s,n,GotoIf($[ ${GROUP_COUNT()} > ${OUTMAXCHANS_${ARG1}} ]?nochans)
exten => s,n,Set(DIAL_NUMBER=${ARG2})
exten => s,n,Set(DIAL_TRUNK=${ARG1})
exten => s,n,AGI(fixlocalprefix)  ; this sets DIAL_NUMBER to the proper dial string for this trunk
exten => s,n,Set(E164NETWORKS=e164.arpa-e164.info-e164.org) ; enum networks to check
exten => s,n,GotoIf($["${DIAL_NUMBER:0:1}" = "+"]?begin) ; Skip next line if it already is prefixed by a plus
exten => s,n,Set(DIAL_NUMBER=+${DIAL_NUMBER}) ; Add a plus to the start, becasue ENUMLOOKUP needs it.

; start of main network loop
exten => s,n(begin),NoOp(E164NETWORKS is ${E164NETWORKS})
exten => s,n,GotoIf($["${E164NETWORKS:1:2}"=""]?failedtotally)
exten => s,n,Set(ENUMNET=${CUT(E164NETWORKS,-,1)})
exten => s,n,Set(E164NETWORKS=${CUT(E164NETWORKS,-,2-)})

exten => s,n,NoOp(E164NETWORKS is now ${E164NETWORKS})
exten => s,n,NoOp(ENUMNET is ${ENUMNET})

exten => s,n,Set(ENUMCOUNT=${ENUMLOOKUP(${DIAL_NUMBER},all,c,${ENUMNET})})
exten => s,n,Set(ENUMPTR=0)
exten => s,n,Set(LOOKUPBUG=0)

; start of main lookup loop
exten => s,n(startloop),GotoIf($["${ENUMPTR}"<"${ENUMCOUNT}"]?continue:failed)

; Now, let's start through them.
exten => s,n(continue),Set(ENUMPTR=$[${ENUMPTR}+1])
exten => s,n,NoOp(Doing ENUMLOOKUP(${DIAL_NUMBER},all,${ENUMPTR},${ENUMNET}))
exten => s,n,Set(ENUM=${ENUMLOOKUP(${DIAL_NUMBER},all,${ENUMPTR},${ENUMNET})})

; Deal with reponse
exten => s,n,GotoIf($["${ENUM:0:3}" = "sip" ]?sipuri)
exten => s,n,GotoIf($["${ENUM:0:3}" = "iax" ]?iaxuri)
; It doesn't matter if you don't have h323 enabled, as when it tries to dial, it cares
; about dialstatus and retries if there are any enum results left.
exten => s,n,GotoIf($["${ENUM:0:3}" = "h32" ]?h323uri)

; e164.org can return 'ADDRESS' lines. Because of *'s poor handling of Enum 
; lookups, we want to DECREMENT the enum pointer. Yes. That means we try more
; times than there actually exists entries. 
exten => s,n,GotoIf($["${ENUM:0:3}" = "ADD" ]?enumbug)

; OK. If we're here, we've still got some enum entries to go through. Back to 
; the start with you!
exten => s,n,Goto(startloop)

; We're here because of the poor implementation of ENUMLOOKUP in Asterisk. It
; is quite possible to do three ENUMLOOKUPS and get the same entry each time.
; The only workaround I can think of is when we hit an invalid entry, do a 
; DECREMENT of the pointer, and keep trying. 
exten => s,n(enumbug),Set(ENUMPTR=$[${ENUMPTR}-1])
exten => s,n,NoOp(If this is looping with the same ENUM value, The ENUMLOOKUP function is fixed!)
exten => s,n,Set(LOOKUPBUG=$[${LOOKUPBUG}+1])
; If we've done this more than, ooh, 5 times, then give up on this network. Sorry.
exten => s,n,GotoIf($["${LOOKUPBUG}" > 5 ]?failed)
exten => s,n,Goto(continue)

; If the prefix is 'sip:'...
exten => s,n(sipuri),Set(DIALSTR=SIP/${ENUM:4})
exten => s,n,Goto(dodial)

; If it's IAX2...
exten => s,n(iaxuri),Set(DIALSTR=IAX2/${ENUM:5})
exten => s,n,Goto(dodial)

; Or even if it's H323.
exten => s,n(h323uri),Set(DIALSTR=H323/${ENUM:5})

exten => s,n(dodial),Dial(${DIALSTR})
exten => s,n,NoOp(Dial exited in macro-enum-dialout with ${DIALSTATUS})

; Now, if we're still here, that means the Dial failed for some reason. 
; If it's CONGESTION or CHANUNAVAIL we probably want to try again on a
; different channel. However, if it's the last one, we don't have any
; left, and I didn't keep any previous dialstatuses, so hopefully 
; someone looking throught the logs would have seen the NoOp's
exten => s,n,GotoIf($["${ENUMPTR}"<"${ENUMCOUNT}"]?maybemore:dialfailed)
exten => s,n(maybemore),GotoIf($[ $[ "${DIALSTATUS}" = "CHANUNAVAIL" ] | $[ "${DIALSTATUS}" = "CONGESTION" ] ]?continue)

; If we're here, then it's BUSY or NOANSWER or something and well, deal with it.
exten => s,n(dialfailed),Goto(s-${DIALSTATUS},1)

; Here are the exit points for the macro.
exten => s,n(failed),NoOp(EnumLookup failed on network ${ENUMNET})
exten => s,n,Goto(begin)

exten => s,n(failedtotally),NoOp(EnumLookup failed -- no more networks to try)
exten => s,n,Goto(end)

exten => s,n(nochans),NoOp(max channels used up)

exten => s,n(end),NoOp(Exiting macro-dialout-enum)

exten => s-BUSY,1,NoOp(Trunk is reporting BUSY)
exten => s-BUSY,2,Busy()
exten => s-BUSY,3,Wait(60)
exten => s-BUSY,4,NoOp()

exten => _s-.,1,NoOp(Dial failed due to ${DIALSTATUS})

[macro-record-enable]
exten => s,1,GotoIf(${LEN(${BLINDTRANSFER})} > 0?2:4)
exten => s,2,ResetCDR(w)
exten => s,3,StopMonitor()
exten => s,4,AGI(recordingcheck,${TIMESTAMP},${UNIQUEID})
exten => s,5,Noop(No recording needed) 
exten => s,999,Monitor(wav49,${CALLFILENAME}, mb)

;exten => s,3,BackGround(for-quality-purposes)
;exten => s,4,BackGround(this-call-may-be)
;exten => s,5,BackGround(recorded)

; This macro is for dev purposes and just dumps channel/app variables.  Useful when designing new contexts. 
[macro-dumpvars]
exten => s,1,Noop(ACCOUNTCODE=${ACCOUNTCODE})
exten => s,2,Noop(ANSWEREDTIME=${ANSWEREDTIME})
exten => s,3,Noop(BLINDTRANSFER=${BLINDTRANSFER})
exten => s,4,Noop(CALLERID=${CALLERID(all)})
exten => s,5,Noop(CALLERID(name)=${CALLERID(name)})
exten => s,6,Noop(CALLERID(number)=${CALLERID(number)})
exten => s,7,Noop(CALLINGPRES=${CALLINGPRES})
exten => s,8,Noop(CHANNEL=${CHANNEL})
exten => s,9,Noop(CONTEXT=${CONTEXT})
exten => s,10,Noop(DATETIME=${DATETIME})
exten => s,11,Noop(DIALEDPEERNAME=${DIALEDPEERNAME})
exten => s,12,Noop(DIALEDPEERNUMBER=${DIALEDPEERNUMBER})
exten => s,13,Noop(DIALEDTIME=${DIALEDTIME})
exten => s,14,Noop(DIALSTATUS=${DIALSTATUS})
exten => s,15,Noop(DNID=${DNID})
exten => s,16,Noop(EPOCH=${EPOCH})
exten => s,17,Noop(EXTEN=${EXTEN})
exten => s,18,Noop(HANGUPCAUSE=${HANGUPCAUSE})
exten => s,19,Noop(INVALID_EXTEN=${INVALID_EXTEN})
exten => s,20,Noop(LANGUAGE=${LANGUAGE})
exten => s,21,Noop(MEETMESECS=${MEETMESECS})
exten => s,22,Noop(PRIORITY=${PRIORITY})
exten => s,23,Noop(RDNIS=${RDNIS})
exten => s,24,Noop(SIPDOMAIN=${SIPDOMAIN})
exten => s,25,Noop(SIP_CODEC=${SIP_CODEC})
exten => s,26,Noop(SIPCALLID=${SIPCALLID})
exten => s,27,Noop(SIPUSERAGENT=${SIPUSERAGENT})
exten => s,28,Noop(TIMESTAMP=${TIMESTAMP})
exten => s,29,Noop(TXTCIDNAME=${TXTCIDNAME})
exten => s,30,Noop(UNIQUEID=${UNIQUEID})
exten => s,31,Noop(TOUCH_MONITOR=${TOUCH_MONITOR})
exten => s,32,Noop(MACRO_CONTEXT=${MACRO_CONTEXT})
exten => s,33,Noop(MACRO_EXTEN=${MACRO_EXTEN})
exten => s,34,Noop(MACRO_PRIORITY=${MACRO_PRIORITY})

[macro-user-logon]
; check device type
exten => s,1,Set(DEVICETYPE=${DB(DEVICE/${CALLERID(number)}/type)})
exten => s,2,GotoIf($["${DEVICETYPE}" = "fixed"]?s-FIXED,1)
; get user's extension
exten => s,3,Set(AMPUSER=${ARG1})
exten => s,4,GotoIf($["${AMPUSER}" = ""]?5:9)
exten => s,5,BackGround(please-enter-your)
exten => s,6,Playback(extension)
exten => s,7,Read(AMPUSER,then-press-pound)
; get user's password and authenticate
exten => s,8,Wait(1)
exten => s,9,Set(AMPUSERPASS=${DB(AMPUSER/${AMPUSER}/password)})
exten => s,10,GotoIf($[${LEN(${AMPUSERPASS})} = 0]?s-NOPASSWORD,1)
; do not continue if the user has already logged onto this device
exten => s,11,Set(DEVICEUSER=${DB(DEVICE/${CALLERID(number)}/user)})
exten => s,12,GotoIf($["${DEVICEUSER}" = "${AMPUSER}"]?s-ALREADYLOGGEDON,1)
exten => s,13,Authenticate(${AMPUSERPASS})
; devices can only be mapped to one user - loggoff anyone else who is here
exten => s,14,Macro(user-logoff)
; map user to device
exten => s,15,Set(AMPUSERDEVICES=${DB(AMPUSER/${AMPUSER}/device)})
exten => s,16,GotoIf($[${LEN(${AMPUSERDEVICES})} = 0]?18) 
exten => s,17,Set(AMPUSERDEVICES=${AMPUSERDEVICES}&)
exten => s,18,Set(AMPUSERDEVICES=${AMPUSERDEVICES}${CALLERID(number)})
exten => s,19,Set(DB(AMPUSER/${AMPUSER}/device)=${AMPUSERDEVICES})
; map device to user
exten => s,20,Set(DB(DEVICE/${CALLERID(number)}/user)=${AMPUSER})
; create symlink from dummy device mailbox to user's mailbox
exten => s,21,System(/bin/ln -s /var/spool/asterisk/voicemail/default/${AMPUSER}/ /var/spool/asterisk/voicemail/device/${CALLERID(number)})

exten => s-FIXED,1,NoOp(Device is FIXED and cannot be logged into)
exten => s-FIXED,2,Playback(ha/phone)
exten => s-FIXED,3,SayDigits(${CALLERID(number)})
exten => s-FIXED,4,Playback(is-curntly-unavail)
exten => s-FIXED,5,Playback(vm-goodbye)
exten => s-FIXED,6,Hangup ;TODO should play msg indicated device cannot be logged into 

exten => s-ALREADYLOGGEDON,1,NoOp(This device has already been logged into by this user)
exten => s-ALREADYLOGGEDON,2,Playback(vm-goodbye)
exten => s-ALREADYLOGGEDON,3,Hangup ;TODO should play msg indicated device is already logged into 

exten => s-NOPASSWORD,1,NoOp(This extension does not exist or no password is set)
exten => s-NOPASSWORD,2,Playback(an-error-has-occured)
exten => s-NOPASSWORD,3,Playback(vm-goodbye)
exten => s-NOPASSWORD,4,Hangup ;TODO should play msg indicated device is already logged into 

[macro-user-logoff]
; check device type
exten => s,1,Set(DEVICETYPE=${DB(DEVICE/${CALLERID(number)}/type)})
exten => s,2,GotoIf($["${DEVICETYPE}" = "fixed"]?s-FIXED,1)
; remove entry from user's DEVICE key
; delete the symlink to user's voicemail box
exten => s,3,System(rm -f /var/spool/asterisk/voicemail/device/${CALLERID(number)})
exten => s,4,Set(DEVAMPUSER=${DB(DEVICE/${CALLERID(number)}/user)})
exten => s,5,Set(AMPUSERDEVICES=${DB(AMPUSER/${DEVAMPUSER}/device)})
exten => s,6,AGI(list-item-remove.php,${AMPUSERDEVICES},${CALLERID(number)},AMPUSERDEVICES,&)
; reset user -> device mapping
; users can log onto multiple devices, need to just remove device from value
exten => s,7,Set(DB(AMPUSER/${DEVAMPUSER}/device)=${AMPUSERDEVICES})
; reset device -> user mapping
exten => s,8,Set(DB(DEVICE/${CALLERID(number)}/user)=none)
exten => s,9,Playback(vm-goodbye)

exten => s-FIXED,1,NoOp(Device is FIXED and cannot be logged out of)
exten => s-FIXED,2,Playback(an-error-has-occured)
exten => s-FIXED,3,Playback(vm-goodbye)
exten => s-FIXED,4,Hangup ;TODO should play msg indicated device cannot be logged into 

[macro-systemrecording]
exten => s,1,Goto(${ARG1},1)

exten => dorecord,1,Record(/tmp/${CALLERID(number)}-ivrrecording:wav)
exten => dorecord,n,Wait(1)
exten => dorecord,n,Goto(confmenu,1)

exten => docheck,1,Playback(/tmp/${CALLERID(number)}-ivrrecording)
exten => docheck,n,Wait(1)
exten => docheck,n,Goto(confmenu,1)

exten => confmenu,1,Background(to-listen-to-it&press-1&to-rerecord-it&press-star|m||macro-systemrecording)
exten => confmenu,n,Read(RECRESULT||1|||4)
exten => confmenu,n,GotoIf($["x${RECRESULT}"="x*"]?dorecord,1)
exten => confmenu,n,GotoIf($["x${RECRESULT}"="x1"]?docheck,1)
exten => confmenu,n,Goto(1)

exten => 1,1,Goto(docheck,1)
exten => *,1,Goto(dorecord,1)

exten => t,1,Playback(goodbye)
exten => t,n,Hangup

exten => i,1,Playback(pm-invalid-option)
exten => i,n,Goto(confmenu,1)

exten => h,1,Hangup


;
; ############################################################################
; CallerID Handling
; ############################################################################

;sets the callerid of the device to that of the logged in user
[macro-user-callerid]
exten => s,1,GotoIf($["${CHANNEL:0:5}" = "Local"]?report) 
exten => s,n,GotoIf($["${REALCALLERIDNUM:1:2}" != ""]?start)
exten => s,n,Set(REALCALLERIDNUM=${CALLERID(number)})
exten => s,n(start),NoOp(REALCALLERIDNUM is ${REALCALLERIDNUM})
exten => s,n,Set(AMPUSER=${DB(DEVICE/${REALCALLERIDNUM}/user)})
exten => s,n,Set(AMPUSERCIDNAME=${DB(AMPUSER/${AMPUSER}/cidname)})
exten => s,n,GotoIf($["x${AMPUSERCIDNAME:1:2}" = "x"]?report) 
exten => s,n,Set(CALLERID(all)=${AMPUSERCIDNAME} <${AMPUSER}>)
exten => s,n(report),NoOp(Using CallerID ${CALLERID(all)})

; overrides callerid out trunks
; arg1 is trunk
; macro-user-callerid should be called _before_ using this macro
[macro-outbound-callerid]
exten => s,1,GotoIf($["${REALCALLERIDNUM:1:2}" != ""]?start)
exten => s,n,Set(REALCALLERIDNUM=${CALLERID(number)})
exten => s,n(start),NoOp(REALCALLERIDNUM is ${REALCALLERIDNUM})
exten => s,n,Set(USEROUTCID=${DB(AMPUSER/${REALCALLERIDNUM}/outboundcid)})
exten => s,n,Set(EMERGENCYCID=${DB(DEVICE/${REALCALLERIDNUM}/emergency_cid)})
exten => s,n,Set(TRUNKOUTCID=${OUTCID_${ARG1}})
exten => s,n,GotoIf($["${EMERGENCYROUTE:1:2}" = ""]?trunkcid) ; check EMERGENCY ROUTE
exten => s,n,GotoIf($["${EMERGENCYCID:1:2}" = ""]?trunkcid) ; empty EMERGENCY CID, so default back to trunk
exten => s,n,Set(CALLERID(all)=${EMERGENCYCID}) ; emergency cid for device
exten => s,n,Goto(report)
exten => s,n(trunkcid),GotoIf($["${TRUNKOUTCID:1:2}" = ""]?usercid)  ;check for CID override for trunk (global var)
exten => s,n,Set(CALLERID(all)=${TRUNKOUTCID})
exten => s,n(usercid),GotoIf($["${USEROUTCID:1:2}" = ""]?report) ; check CID override for extension
exten => s,n,Set(CALLERID(all)=${USEROUTCID})
exten => s,n(report),NoOp(CallerID set to ${CALLERID(all)})

; Privacy Manager Macro makes sure that any calls that don't pass the privacy manager are presented
; with congestion since there have been observed cases of the call continuing if not stopped with a 
; congestion, and this provides a slightly more friendly 'sorry' message in case the user is
; legitamately trying to be cooperative. 
;
; Note: the following options are configurable in privacy.conf:
;
;	maxretries = 3 ; default value, number of retries before failing
;	minlength = 10 ; default value, number of digits to be accepted as valid CID
;
[macro-privacy-mgr]
exten => s,1,Set(KEEPCID=${CALLERID(num)})
exten => s,n,GotoIf($["foo${CALLERID(num):0:1}"="foo+"]?CIDTEST2:CIDTEST1)
exten => s,n(CIDTEST1),Set(TESTCID=${MATH(1+${CALLERID(num)})})
exten => s,n,Goto(TESTRESULT)
exten => s,n(CIDTEST2),Set(TESTCID=${MATH(1+${CALLERID(num):1})})
exten => s,n(TESTRESULT),GotoIf($["foo${TESTCID}"="foo"]?CLEARCID:PRIVMGR)
exten => s,n(CLEARCID),Set(CALLERID(num)=)
exten => s,n(PRIVMGR),PrivacyManager()
exten => s,n,SetCallerPres(allowed_passed_screen); stop gap until app_privacy.c clears unavailble bit
exten => s,PRIVMGR+101,Noop(STATUS: ${PRIVACYMGRSTATUS} CID: ${CALLERID(num)} ${CALLERID(name)} CALLPRES: ${CALLLINGPRES})
exten => s,n,Playback(sorry-youre-having-problems)
exten => s,n,Playback(goodbye)
exten => s,n,Congestion()
exten => s,n,Hangup


;
; ############################################################################
; Inbound Contexts [from]
; ############################################################################

[from-sip-external]
;give external sip users congestion and hangup
; Yes. This is _really_ meant to be _. - I know asterisk whinges about it, but 
; I do know what I'm doing. This is correct.
exten => _.,1,NoOp(Received incoming SIP connection from unknown peer to ${EXTEN})
exten => _.,n,Set(DID=${IF($["${EXTEN:1:2}"=""]?s:${EXTEN})})
exten => _.,n,Goto(s,1)
exten => s,1,GotoIf($["${ALLOW_SIP_ANON}"="yes"]?from-trunk,${DID},1)
exten => s,n,Set(TIMEOUT(absolute)=15)
exten => s,n,Answer
exten => s,n,Wait(2)
exten => s,n,Playback(ss-noservice)
exten => s,n,Congestion 
exten => s,n,Hangup
exten => h,1,NoOp(Hangup)
exten => i,1,NoOp(Invalid)
exten => t,1,NoOp(Timeout)

[from-internal]
; applications are now mostly all found in from-internal-additional in _custom.conf
include => parkedcalls
include => from-internal-custom
;allow phones to dial other extensions
include => ext-fax
;allow phones to access generated contexts
;
; MODIFIED (PL)
;
; Currently the include for findmefollow is being auto-generated before ext-local which is the desired behavior.
; However, I haven't been able to do anything that I know of to force this. We need to determine if it should
; be hardcoded into here to make sure it doesn't change with some configuration. For now I will leave it out
; until we can discuss this.
;
include => from-internal-additional
exten => s,1,Macro(hangupcall)
exten => h,1,Macro(hangupcall)

[from-zaptel]
exten => _X.,1,Set(DID=${EXTEN})
exten => _X.,n,Goto(s,1)
exten => s,1,NoOp(Entering from-zaptel with DID == ${DID})
; If ($did == "") { $did = "s"; }
exten => s,n,Set(DID=${IF($["${DID}"= ""]?s:${DID})})
exten => s,n,NoOp(DID is now ${DID})
exten => s,n,GotoIf($["${CHANNEL:0:3}"="Zap"]?zapok:notzap)
exten => s,n(notzap),Goto(ext-did,${DID},1)
; If there's no ext-did,s,1, that means there's not a no did/no cid route. Hangup.
exten => s,n,Macro(hangup)
exten => s,n(zapok),NoOp(Is a Zaptel Channel)
exten => s,n,Set(CHAN=${CHANNEL:4})
exten => s,n,Set(CHAN=${CUT(CHAN,-,1)})
exten => s,n,Macro(from-zaptel-${CHAN},${DID},1)
; If nothing there, then treat it as a DID
exten => s,n,NoOp(Returned from Macro from-zaptel-${CHAN})
exten => s,n,Goto(ext-did,${DID},1)


; ############################################################################
; Extension Contexts [ext]
; ############################################################################

[ext-fax]
exten => s,1,Answer
exten => s,2,Goto(in_fax,1)
exten => in_fax,1,StopPlayTones  
exten => in_fax,2,GotoIf($["${FAX_RX}" = "system"]?3:analog_fax,1)
exten => in_fax,3,Macro(faxreceive)
exten => in_fax,4,system(/var/lib/asterisk/bin/fax-process.pl --to ${EMAILADDR} --from ${FAX_RX_FROM} --subject "Fax from ${CALLERID(number)} ${CALLERID(name)}" --attachment ${CALLERID(number)}.pdf --type application/pdf --file ${FAXFILE});
exten => in_fax,5,Hangup
exten => analog_fax,1,GotoIf($["${FAX_RX}" = "disabled"]?4:2)  ;if fax is disabled, just hang up
exten => analog_fax,2,Set(DIAL=${DB(DEVICE/${FAX_RX}/dial)});
exten => analog_fax,3,Dial(${DIAL},20,d)
exten => analog_fax,4,Hangup
;exten => out_fax,1,wait(7)
exten => out_fax,1,txfax(${TXFAX_NAME}|caller)
exten => out_fax,2,Hangup
exten => h,1,Hangup()

[isdn-in]
exten => 4434343,1,Dial(SIP/11)
exten => 4434343,1,Dial(SIP/22)


;this is where parked calls go if they time-out.  Should probably re-ring
[default]
include => ext-local
exten => s,1,Playback(vm-goodbye)
exten => s,2,Macro(hangupcall)
 
Ich vermute, das das deine ankommenden Rufnummenr sind.
Falls nicht in der Zaptel muss ja der Kontext angegeben worden sein,
der in der extensions.conf genutzt wird.
Bei der ISDN-IN ist ein Fehler, die müssen mit 1,2,3 oder 1,n numeriert werden.
Bei zwei gleichen Einträgen wird einer vergessen.
Wenn die beiden SIps parallel klingen sollen wird das in einer Zeile angeben.

In deiner extensions.conf
[isdn-in]
exten => 4434343,1,Dial(SIP/11)
exten => 4434343,1,Dial(SIP/22)

----------------------------------------------------------------------------------------
exten => _0.,1,SetCidnum(9668051) ; Rufnummer ohne Vorwahl / nur MSN
exten => _0.,n,Dial(Zap/g1/${EXTEN:1},20,tT)
exten => _0.,n,Hangup

Das muß in den Kontext, wo die SIP Telefone drin sind.
In der SIP.conf nachsehen.
Allerdings ist deine extensions so unübersichtlich, das man da nichts wiederfindet. Es kann sein, das die TRIXBOX die Änderungen wieder rauskickt.
Ich würde dir empfehlen, die extensions.conf mit cp extensions.conf extensions.sik wegzusichern, und nur die im Moment benötigten Zeilen
einzutragen. Makros alle weg...

Den Kontext für die SIP-Telefone anlegen und das da rein.
Dann sollte der Anruf zum Amt gehen,

Wenn das funktioniert, die genaue Stelle suche wo das hinpasst.
Du mußt ja irgendwo Dial(Zap/ stehen haben.
Die Sache ist bei der Tribox nicht sehr übersichtlich.
 
bubblebob schrieb:
@carsten

Danke für deine Config, wie ist dein System aufgebaut? Ich frage weil mein System im Moment nur mit einer Karte läuft wir aber aubauen wollen (2 NT A/B plus GSM Karte mit 4 Sims)

Hier läuft ein Debian mit einer beroNET BN4S0 (4 Ports) mit für die Karte angepasstem bristuff. Darauf setzt zur Konfiguration FreePBX auf. Die Installation war ansich relativ Plain ohne besondere Konfigurationen. Wenn du wünschst, kann ich dir die Dokumentation zusenden. Schick mir doch dazu deine E-Mail-Adresse per PN.

Gruß Carsten
 
Kostenlos!

Neueste Beiträge

Statistik des Forums

Themen
248,876
Beiträge
2,303,712
Mitglieder
378,542
Neuestes Mitglied
viktor1181