Код: Выделить всё
Channel: Local/s@test/n
Set: abon=777
MaxRetries: 0
RetryTime: 60
WaitTime: 60
Context: test
Extension: s
Priority: 2
Код: Выделить всё
[test]
exten => s,1,Dial(SIP/${abon})
exten => s,2,Wait(1)
exten => s,n,Set(CHANNEL(language)=ru)
; Тут будет бла-бла и сумма задолженности
exten => s,n,SayNumber(2146,m)
exten => s,n,Hangup()
; Тут будет обновление БД средствами диал-плана или через вызов AGI
exten => h,1,Noop(Длительность разговора ${CDR(billsec)} секунд. Статус звонка ${CDR(disposition)})
Код: Выделить всё
-- SIP/3322222-0002ac0f answered Local/s@test-a982;2
-- Executing [s@test:2] Wait("Local/s@test-a982;1", "1") in new stack
-- Executing [s@test:3] Set("Local/s@test-a982;1", "CHANNEL(language)=ru") in new stack
-- Executing [s@test:4] SayNumber("Local/s@test-a982;1", "2146,m") in new stack
-- <Local/s@test-a982;1> Playing 'digits/2f.alaw' (language 'ru')
-- <Local/s@test-a982;1> Playing 'digits/thousands-i.alaw' (language 'ru')
-- <Local/s@test-a982;1> Playing 'digits/100.alaw' (language 'ru')
-- <Local/s@test-a982;1> Playing 'digits/40.alaw' (language 'ru')
-- <Local/s@test-a982;1> Playing 'digits/6.alaw' (language 'ru')
-- Executing [s@test:5] Hangup("Local/s@test-a982;1", "") in new stack
== Spawn extension (test, s, 5) exited non-zero on 'Local/s@test-a982;1'
-- Executing [h@test:1] NoOp("Local/s@test-a982;1", "Длительность разговора 4 секунд. Статус звонка ANSWERED") in new stack
-- Executing [h@test:1] NoOp("Local/s@test-a982;2", "Длительность разговора 4 секунд. Статус звонка ANSWERED") in new stack
[Sep 19 17:36:52] NOTICE[9500]: pbx_spool.c:349 attempt_thread: Call completed to Local/s@test/n
== Spawn extension (test, s, 1) exited non-zero on 'Local/s@test-a982;2'