Hello I found that when I sent a non existent api command via bgapi. The corresponding background_job event isn't complete: Here my command: bgapi originated ---------------------------------- Here is what I got from esl phpmod debug: [DEBUG] src/esl.c:923 esl_recv_event() RECV HEADER [Content-Length] = [528] [DEBUG] src/esl.c:923 esl_recv_event() RECV HEADER [Content-Type] = [text/event-plain] [DEBUG] src/esl.c:1012 esl_recv_event() RECV INNER HEADER [Event-Name] = [BACKGROUND_JOB] [DEBUG] src/esl.c:1012 esl_recv_event() RECV INNER HEADER [Core-UUID] = [1921f8f2-7df3-11df-90f2-7933374406ce] [DEBUG] src/esl.c:1012 esl_recv_event() RECV INNER HEADER [FreeSWITCH-Hostname] = [ippbx-prod] [DEBUG] src/esl.c:1012 esl_recv_event() RECV INNER HEADER [FreeSWITCH-IPv4] = [85.16.246.5] [DEBUG] src/esl.c:1012 esl_recv_event() RECV INNER HEADER [FreeSWITCH-IPv6] = [::1] [DEBUG] src/esl.c:1012 esl_recv_event() RECV INNER HEADER [Event-Date-Local] = [2010-06-23 15:15:36] [DEBUG] src/esl.c:1012 esl_recv_event() RECV INNER HEADER [Event-Date-GMT] = [Wed, 23 Jun 2010 13:15:36 GMT] [DEBUG] src/esl.c:1012 esl_recv_event() RECV INNER HEADER [Event-Date-Timestamp] = [1277298936734270] [DEBUG] src/esl.c:1012 esl_recv_event() RECV INNER HEADER [Event-Calling-File] = [mod_commands.c] [DEBUG] src/esl.c:1012 esl_recv_event() RECV INNER HEADER [Event-Calling-Function] = [bgapi_exec] [DEBUG] src/esl.c:1012 esl_recv_event() RECV INNER HEADER [Event-Calling-Line-Number] = [3030] [DEBUG] src/esl.c:1012 esl_recv_event() RECV INNER HEADER [Job-UUID] = [6977120c-7ec9-11df-a323-7933374406ce] [DEBUG] src/esl.c:1012 esl_recv_event() RECV INNER HEADER [Job-Command] = [originated] [DEBUG] src/esl.c:1012 esl_recv_event() RECV INNER HEADER [Content-Length] = [31] [DEBUG] src/esl.c:1037 esl_recv_event() RECV EVENT Event-Name: BACKGROUND_JOB Core-UUID: 1921f8f2-7df3-11df-90f2-7933374406ce FreeSWITCH-Hostname: ippbx-prod FreeSWITCH-IPv4: 85.16.246.5 FreeSWITCH-IPv6: ::1 Event-Date-Local: 2010-06-23 15:15:36 Event-Date-GMT: Wed, 23 Jun 2010 13:15:36 GMT Event-Date-Timestamp: 1277298936734270 Event-Calling-File: mod_commands.c Event-Calling-Function: bgapi_exec Event-Calling-Line-Number: 3030 Job-UUID: 6977120c-7ec9-11df-a323-7933374406ce Job-Command: originated Content-Length: 31 [DEBUG] src/esl.c:1045 esl_recv_event() RECV MESSAGE ---------------------------------- And here is what I got from tcpdump: Content-Length: 528 Content-Type: text/event-plain Event-Name: BACKGROUND_JOB Core-UUID: 1921f8f2-7df3-11df-90f2-7933374406ce FreeSWITCH-Hostname: ippbx-prod FreeSWITCH-IPv4: 85.16.246.5 FreeSWITCH-IPv6: %3A%3A1 Event-Date-Local: 2010-06-23%2015%3A15%3A36 Event-Date-GMT: Wed,%2023%20Jun%202010%2013%3A15%3A36%20GMT Event-Date-Timestamp: 1277298936734270 Event-Calling-File: mod_commands.c Event-Calling-Function: bgapi_exec Event-Calling-Line-Number: 3030 Job-UUID: 6977120c-7ec9-11df-a323-7933374406ce Job-Command: originated Content-Length: 31 originated: Command not found! ---------------------------------- So, obviously the content is missing resp not grabed by esl phpmod. regards helmut
Hi, I found the problem. Here is my patch: Index: src/esl_event.c =================================================================== --- src/esl_event.c (Revision 17782) +++ src/esl_event.c (Arbeitskopie) @@ -548,7 +548,7 @@ if (blen && !clen) { snprintf(buf + len, dlen - len, "Content-Length: %d\n\n%s", (int)strlen(event->body), event->body); } else { - snprintf(buf + len, dlen - len, "\n"); + snprintf(buf + len, dlen - len, "\n%s", event->body); } } else { snprintf(buf + len, dlen - len, "\n"); Please review this to avoid side effects. regards Helmut On 23.06.2010 15:25, Helmut Kuper wrote:
Hello
I found that when I sent a non existent api command via bgapi. The corresponding background_job event isn't complete:
Please open a jira for this. On Wed, Jun 23, 2010 at 10:37 AM, Helmut Kuper <helmut.kuper@ewetel.de>wrote:
Hi,
I found the problem. Here is my patch:
Index: src/esl_event.c =================================================================== --- src/esl_event.c (Revision 17782) +++ src/esl_event.c (Arbeitskopie) @@ -548,7 +548,7 @@ if (blen && !clen) { snprintf(buf + len, dlen - len, "Content-Length: %d\n\n%s", (int)strlen(event->body), event->body); } else { - snprintf(buf + len, dlen - len, "\n"); + snprintf(buf + len, dlen - len, "\n%s", event->body); } } else { snprintf(buf + len, dlen - len, "\n");
Please review this to avoid side effects.
regards Helmut
On 23.06.2010 15:25, Helmut Kuper wrote:
Hello
I found that when I sent a non existent api command via bgapi. The corresponding background_job event isn't complete:
_______________________________________________ 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
-- -Rupa
this patch was wrong, correct fix is added to latest GIT, please switch to GIT for development and also please report bugs on jira bugs reported on the list are not easy to maintain. On Wed, Jun 23, 2010 at 10:37 AM, Helmut Kuper <helmut.kuper@ewetel.de>wrote:
Hi,
I found the problem. Here is my patch:
Index: src/esl_event.c =================================================================== --- src/esl_event.c (Revision 17782) +++ src/esl_event.c (Arbeitskopie) @@ -548,7 +548,7 @@ if (blen && !clen) { snprintf(buf + len, dlen - len, "Content-Length: %d\n\n%s", (int)strlen(event->body), event->body); } else { - snprintf(buf + len, dlen - len, "\n"); + snprintf(buf + len, dlen - len, "\n%s", event->body); } } else { snprintf(buf + len, dlen - len, "\n");
Please review this to avoid side effects.
regards Helmut
On 23.06.2010 15:25, Helmut Kuper wrote:
Hello
I found that when I sent a non existent api command via bgapi. The corresponding background_job event isn't complete:
_______________________________________________ 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
-- Anthony Minessale II FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ Twitter: http://twitter.com/FreeSWITCH_wire AIM: anthm MSN:anthony_minessale@hotmail.com <MSN%3Aanthony_minessale@hotmail.com> GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com<PAYPAL%3Aanthony.minessale@gmail.com> IRC: irc.freenode.net #freeswitch FreeSWITCH Developer Conference sip:888@conference.freeswitch.org <sip%3A888@conference.freeswitch.org> googletalk:conf+888@conference.freeswitch.org<googletalk%3Aconf%2B888@conference.freeswitch.org> pstn:+19193869900
participants (3)
-
Anthony Minessale
-
Helmut Kuper
-
Rupa Schomaker