mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 18:16:24 +05:00
Added example for asterisk context switch on hangup in tutorial config
This commit is contained in:
committed by
Dan Christian Bogos
parent
1833c1e10d
commit
edcfa792e6
@@ -1,8 +1,17 @@
|
||||
[internal]
|
||||
exten => _1XXX,1,NoOp()
|
||||
same => n,Set(CGRMaxSessionTime=0); use it to disconnect automatically the call if CGRateS is not active
|
||||
same => n,Set(LIMIT_WARNING_FILE=/var/lib/asterisk/sounds/en/beep)
|
||||
same => n,Set(LIMIT_PLAYAUDIO_CALLER=YES)
|
||||
same => n,Set(LIMIT_PLAYAUDIO_CALLEE=YES)
|
||||
same => n,DumpChan()
|
||||
same => n,Stasis(cgrates_auth,cgr_reqtype=*prepaid,cgr_route=supplier1,"cgr_flags=*accounts,*attributes,*resources,*stats,*routes,*thresholds")
|
||||
same => n,Dial(PJSIP/${EXTEN},30,L(${CGRMaxSessionTime}))
|
||||
same => n,Stasis(cgrates_auth,cgr_reqtype=*prepaid,cgr_routes=supplier1,"cgr_flags=*accounts,*attributes,*resources,*stats,*routes,*thresholds")
|
||||
same => n,Set(CHANNEL(hangup_handler_push)=hangUp,hUP,1)
|
||||
same => n,Dial(PJSIP/${EXTEN},30,L(${CGRMaxSessionTime}:10000)))
|
||||
same => n,Hangup()
|
||||
|
||||
[hangUp]
|
||||
exten => hUP, 1, NoOp(Hang Up)
|
||||
exten => hUP, 2, GotoIf($["${ANSWEREDTIME}000" != "${CGRMaxSessionTime}"]?exitHangUP:logHangUP)
|
||||
exten => hUP, 3(logHangUP),Log(WARNING,"Was closed because the max session time")
|
||||
exten => hUP, 4(exitHangUP),Return()
|
||||
@@ -133,4 +133,6 @@ load => res_ari_mailboxes.so
|
||||
load => res_ari_model.so
|
||||
load => res_ari_playbacks.so
|
||||
load => res_ari_recordings.so
|
||||
load => res_ari_sounds.so
|
||||
load => res_ari_sounds.so
|
||||
|
||||
load => func_channel.so
|
||||
Reference in New Issue
Block a user