All pastes #584798 Raw Edit

Unnamed

public text v1 · immutable
·published 2007-06-22 22:42 UTC
rendered paste body
     [macro-snap-catch]
          exten     =>   s,          1,            GotoIf($[ "${CALLERID(num)}" = "" ] ? returntoivr)
          exten     =>   s,          n,            GotoIf($[ ${ISNULL(${DB(${CALLERID(num)}/ForwardLimit)})} = 1 ] ? returntoivr)
          exten     =>   s,          n,            GotoIf($[ ${DB(${CALLERID(num)}/ForwardLimit)} == 0 ] ? returntoivr)
          exten     =>   s,          n,            GotoIf($[ ${DB(${CALLERID(num)}/ForwardUntil)} > ${EPOCH}] ? returntoivr)
          exten     =>   s,          n,            NoOp(Call caught)
          exten     =>   s,          n,            GotoIf($[${DB(${CALLERID(num)}/ForwardLimit)} == -1] ? calluser)
          exten     =>   s,          n,            Set(DB(${CALLERID(num)}/ForwardLimit) = $[ ${DB(${CALLERID(num)}/ForwardLimit)} - 1 ])
          exten     =>   s,          n,            Set(extension=${DB(${DB(${CALLERID(num)}/ForwardTo)}/Extension)})
          exten     =>   s,          n(calluser),  Goto(${extension});
          exten     =>   s,          n(returntoivr), NoOp(Caller not found in database, continuing dialplan)