Sure.
You can do it with the exact same steps above, but use this SQL code instead:
exten => _.,n,MYSQL(Query resultid ${connid} SELECT if(sum(duration) < 60000, 1, 0) FROM cdr WHERE (calldate between DATE_FORMAT(NOW() ,'%Y-%m-01') AND NOW() ) and src like '${AMPUSER}')
This code will say "if time is under 60000 seconds (1000min) return "true" (0) else it will return a (1)
Modify your IF statement. IF "1" (under the duration limit) go out trunk.
If is over the time limit, returns a "0", system will then say "TIME" and then say "all circuits are busy..." then hangup.
exten => _.,n,execif($["${dynroute}" = "1"]?macro(dialout-trunk,1,${EXTEN},,off))
exten => _.,n,execif($["${dynroute}" = "0"]?playback(time))
exten => _.,n,Macro(outisbusy,)