ESL: Question about BACKGROUND_JOB events
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
origination_uuid On Jun 23, 2010, at 12:02 PM, Helmut Kuper <helmut.kuper@ewetel.de> wrote:
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
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
I think he means you can generate a uuid and use the {origination_uuid=xxx} prefix so that you know what uuid to look for before you even start dialing... -MC On Tue, Jun 29, 2010 at 2:29 AM, Helmut Kuper <helmut.kuper@ewetel.de>wrote:
Hi Michael,
erm, pardon?
On 29.06.2010 09:13, Michael Jerris wrote:
origination_uuid
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Hrum.... [origination_uuid=xxx], it wont work in { } since its a per-leg param. Mathieu Rene Avant-Garde Solutions Inc Office: + 1 (514) 664-1044 x100 Cell: +1 (514) 664-1044 x200 mrene@avgs.ca On 2010-06-29, at 1:21 PM, Michael Collins wrote:
I think he means you can generate a uuid and use the {origination_uuid=xxx} prefix so that you know what uuid to look for before you even start dialing...
-MC
On Tue, Jun 29, 2010 at 2:29 AM, Helmut Kuper <helmut.kuper@ewetel.de> wrote: Hi Michael,
erm, pardon?
On 29.06.2010 09:13, Michael Jerris wrote:
origination_uuid
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Hi, well, so I have to parse all BACKGROUND-JOB events in my app to find the event for me? On 29.06.2010 21:26, Mathieu Rene wrote:
Hrum.... [origination_uuid=xxx], it wont work in { } since its a per-leg param.
-- Mit freundlichen Grüßen Helmut Kuper Geschäftseinheit FD - Lösungen für Finanzdienstleister Telefax: (0441) 8000-2799 mailto:helmut.kuper@ewetel.de ___________________________________ EWE TEL GmbH Cloppenburger Straße 310 26133 Oldenburg EWE TEL GmbH Handelsregister Amtsgericht Oldenburg HRB 3723 Vorsitzender des Aufsichtsrates: Dr. Werner Brinker Geschäftsführung: Hans-Joachim Iken (Vorsitzender), Ulf Heggenberger, Dr. Norbert Schulz, Dirk Thole Homepage: http://www.ewetel.de ___________________________________
You act like that is a hard task to accomplish? /b On Jun 30, 2010, at 5:04 AM, Helmut Kuper wrote:
Hi,
well, so I have to parse all BACKGROUND-JOB events in my app to find the event for me?
On 29.06.2010 21:26, Mathieu Rene wrote:
Hrum.... [origination_uuid=xxx], it wont work in { } since its a per-leg param.
2010/6/30 Helmut Kuper <helmut.kuper@ewetel.de>
Hi,
well, so I have to parse all BACKGROUND-JOB events in my app to find the event for me?
How many processes out there doing "bgapi" do you have running at once? Like bkw said, this isn't exactly a difficult task, even if you have many such processes. -MC
Hi Michael, it's not a big thing to parse the events (in fact I did it already. I have only one Background_job per call in certain situations), but I simply tried to avoid needless traffic and the filter function is a great thing to achieve this. Don't get me wrong, I only want to understand and not annoying you. best regards Helmut On 30.06.2010 18:48, Michael Collins wrote:
2010/6/30 Helmut Kuper <helmut.kuper@ewetel.de>
Hi,
well, so I have to parse all BACKGROUND-JOB events in my app to find the event for me?
How many processes out there doing "bgapi" do you have running at once? Like bkw said, this isn't exactly a difficult task, even if you have many such processes. -MC
participants (5)
-
Brian West
-
Helmut Kuper
-
Mathieu Rene
-
Michael Collins
-
Michael Jerris