As for the sequence ID question, you can supply your own job-uuid header when you send the bgapi-command
bgapi show channels job-uuid: 1234
This was not available from the script mods when I checked so I added it to latest build. example in perl but true in all swigged langs.
my $command = shift; my $args = join(" ", @ARGV);
my $con = new ESL::ESLconnection("localhost", "8021", "ClueCon");
my $e = $con->bgapi($command, $args, "my-job-id"); print $e->serialize("json");
returns:
{ "Event-Name": "SOCKET_DATA", "Content-Type": "command/reply", "Reply-Text": "+OK Job-UUID: my-job-id", "Job-UUID": "my-job-id" }
Awesome! This also has been added to the wiki: http://wiki.freeswitch.org/wiki/Event_Socket_Library#bgapi -MC