[Asterisk-Users] h extension

Dov Bigio dovb at terra.com.br
Fri Jan 20 13:10:11 MST 2006


Hi,

I want to count the number of open Zap channels on my server.

[outgoingzap]
exten => _0NXXXXXX,1,NoOp(Outgoing Local - 7 digs - ${EXTEN:1})
exten => _0NXXXXXX,2,Set(ZAP01=$[${ZAP01} + 1]|g)
exten => _0NXXXXXX,3,Set(UPDATED=true)
exten => _0NXXXXXX,4,Dial(${TRUNK}/${EXTEN},60)
exten => _0NXXXXXX,6,Busy
exten => _0NXXXXXX,7,Playback(thank-you)
include => hangupcontext

[hangupcontext]
exten => h,1,NoCDR()
exten => h,2,GotoIf($["${UPDATED}" != "true"]?5)
exten => h,3,Set(UPDATED="")
exten => h,4,Set(ZAP01=$[${ZAP01} - 1]|g)
exten => h,5,Hangup

I am not sure about how to use NoCDR, ForkCDR and ResetCDR.
If don't use any of them, every call generates an extra CDR with dst = 'h'.
If I use NoCDR, the whole call is not logged.
If I use ResetCDR, the call is logged with duration = 0.

How should I implement this?

Thank you
Dov


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20060120/79f7549e/attachment.htm


More information about the asterisk-users mailing list