Fork in AGI (Asterisk 1.2.13)

Hello !

How is it possible to fork in AGI ?
I tried in perl:

...
$pid = fork();
if($pid == -1){ $AGI->verbose("error fork\n");  return;}
if ($pid != 0) {#father
 $AGI->verbose("here");
  waitpid ($pid,0);
  
 } else {#son
       $AGI->exec("DIAL SIP/300");
       exit (0);
}

My problem is while the call is in progress, the message ‘here’ is not displayed. I would like to have the call performed and the message displayed at the same time.

In fact, I would code sthg more complicated but first I need to understand how to fork with AGI.
Is smdy has an idea, I would appreciate a lot.

Thanks.
Squale

:cry:
Any Idea to resolv my issue ?

Is there another way to execute many commands at the same time in the same process ?
I think about using an application instead but how can I fork again?

For instance I would like to page some extensions and during the paging, I’d like to execute a meetmecount().

Thanks again for your help.