All pastes #2076 Raw Edit

markit

public text v1 · immutable
#2076 ·published 2004-11-14 15:10 UTC
rendered paste body
[uscita]
; nel comporre, premettere uno 0 ai numeri in uscita, lunghi almeno 3 cifre
exten => _0XXX.,1,Macro(record-call,${EXTEN:1},${MACRO_EXTEN})
; quello che non è definito come interno, e quindi
; è un numero che non corrisponde a qualcosa di gestito,
; e ha almeno 3 cifre viene considerato in uscita su linea telefonica
exten => _0XXX.,2,NoOp,Inizio_a_comporre
exten => _0XXX.,3,Dial(${LINEA}:b${EXTEN:1},60)
exten => _0XXX.,4,NoOp,Finito_dial-status: ${DIALSTATUS}
exten => _0XXX.,5,Goto(s-${DIALSTATUS},1)

exten => s-BUSY,1,NoOp,Occupato
exten => s-BUSY,2,Busy               ; se occupato, manda il corrispondente suono alla cornetta (app. Busy)
exten => _s-.,1,NoOp,Congestion:${DIALSTATUS}
exten => _s-.,2,Congestion           ; tutto il resto lo tratta come "congestione" con un suono rapido (app. congestion)

============================
chiamo linea libera senza rispondere:
Urgent handler
    -- Executing Macro("SIP/bt101-f93b", "record-call|04363403|") in new stack
    -- Executing SetVar("SIP/bt101-f93b", "CALLFILENAME=20041114-124238--04363403") in new stack
    -- Executing Monitor("SIP/bt101-f93b", "gsm|20041114-124238--04363403") in new stack
    -- Executing NoOp("SIP/bt101-f93b", "Inizio_a_comporre") in new stack
    -- Executing Dial("SIP/bt101-f93b", "CAPI/4365103:b04363403|60") in new stack
    -- creating pipe for PLCI=-1
    -- Called 4365103:b04363403
    -- CAPI[contr1/4365103]/2 is ringing
Nov 14 12:42:49 WARNING[2478]: app_dial.c:359 wait_for_answer: Unable to forward frame
    -- CAPI Hangingup
    -- removed pipe for PLCI = 0x101
    -- Executing Hangup("SIP/bt101-f93b", "") in new stack

chiamo linea occupata:
    -- Executing Macro("SIP/bt101-9b98", "record-call|04363403|") in new stack
    -- Executing SetVar("SIP/bt101-9b98", "CALLFILENAME=20041114-124403--04363403") in new stack
    -- Executing Monitor("SIP/bt101-9b98", "gsm|20041114-124403--04363403") in new stack
    -- Executing NoOp("SIP/bt101-9b98", "Inizio_a_comporre") in new stack
    -- Executing Dial("SIP/bt101-9b98", "CAPI/4365103:b04363403|60") in new stack
    -- creating pipe for PLCI=-1
    -- Called 4365103:b04363403
    -- CAPI Hangingup
    -- removed pipe for PLCI = 0x101
    -- Executing Hangup("SIP/bt101-9b98", "") in new stack

============================================
;
; Standard extension macro:
;   ${ARG1} - Extension  (we could have used ${MACRO_EXTEN} here as well
;   ${ARG2} - Device(s) to ring
;
exten => s,1,Dial(${ARG2},20)                                   ; Ring the interface, 20 seconds maximum
exten => s,2,Goto(s-${DIALSTATUS},1)                            ; Jump based on status (NOANSWER,BUSY,CHANUNAVAIL,CONGESTION,ANSWER)

exten => s-NOANSWER,1,Voicemail(u${ARG1})               ; If unavailable, send to voicemail w/ unavail announce
exten => s-NOANSWER,2,Goto(default,s,1)                 ; If they press #, return to start

exten => s-BUSY,1,Voicemail(b${ARG1})                   ; If busy, send to voicemail w/ busy announce
exten => s-BUSY,2,Goto(default,s,1)                             ; If they press #, return to start

exten => _s-.,1,Goto(s-NOANSWER,1)                              ; Treat anything else as no answer

exten => a,1,VoicemailMain(${ARG1})                             ; If they press *, send the user into VoicemailMain