How to limit the call time?

I limit the call time to 60 seconds with this line but does not work, could someone tell me what is wrong?

$agi->exec(‘Dial’,“SIP/goandcall/00xx9xxxxxxxx,”.$seconds.",hr");

$seconds=60

Thank you.

  1. You posted to the wrong forum; this is a support question.

  2. You probably wanted to limit the talk time, but you actually limited the time to answer.

You probably want the L option, but there is also a variable that controls this sort of thing.

Limit the call to 40 seconds

[mycontext]
exten=>_9.,1,Set(TIMEOUT(absolute)=40)
same=>n,Dial(dahdi/g0/${EXTEN:1})
same=>n,Hangup()