2sec timeout is not "very short". I can't imagine situation when application can't answer in 2 sec. Very likly you have issue with other side.
However if you are sure you need timeout more then 2sec(if you internet go 3 times worldwide via satelite links), you can change that timeout in asterisk source and recompile asterisk.
To got exactly place you can use something like this:
asterisk-1.8.11.1]# grep MAX_AGI_CONNECT * -rn|grep define
res/res_agi.c:918:#define MAX_AGI_CONNECT 2000