Call disconnect for particular time

hi

i need a dialplan , so that outgoing call should be disconnected after 30 mins , call should not extend more than 30min.
trunk are E1 and SIP trunks

Look at Dial command options. There is time-limit parameter.