Files
cgrates/data/tutorials/asterisk_ari/asterisk/etc/asterisk/extensions.conf
2021-03-25 17:11:28 +01:00

17 lines
861 B
Plaintext
Executable File

[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_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()