Let's remember: "api" blocks and wait for result, "bgapi" returns immediately giving you an uuid you will use to recognize the results.
#!/usr/bin/perl require ESL; my $con = ESL::ESLconnection->new("localhost", "8021", "ClueCon"); $con->api('chat', "sip|[email protected]|[email protected]|ciao a tutti1|text/plain"); $con->bgapi('chat', "sip|[email protected]|[email protected]|ciao a tutti2|text/plain");