[Freeswitch-users] ESL: Question about BACKGROUND_JOB events

Helmut Kuper helmut.kuper at ewetel.de
Wed Jun 23 09:02:36 PDT 2010


Hello,

today I found that filtering events for a Job-UUID returned by a bgapi
command doesn't work well.

What I do is this:

$con->events("plain", "CHANNEL_HANGUP");
$con->events("plain", "CHANNEL_ANSWER");
$con->events("plain", "BACKGROUND_JOB");
$con->filter("Unique-ID", $a_uuid);
$con->filter("Caller-Unique-ID", $a_uuid);

$jobid=$con->bgapi("blahblah", ...)->getHeader("Job-UUID");
$con->filter("Job-UUID", $jobid);

Then waiting for events. But no BACKGROUND_JOB event is received.
Perhaps the BACKGROUND_JOB event is fired before the filter can be applied.


When I execute "$con->filter("Event-Name", "BACKGROUND_JOB");" before
"$jobid=..." then I'm able to receive it ... and all other but unwanted
BACKGROUND_JOB events as well.


Any trick to avoid this?

regards
Helmut



More information about the FreeSWITCH-users mailing list