Otoru/Genesis

Double 'Content-Length' in freeswitch event

Closed this issue · 1 comments

Otoru commented

Explanation

We noted in the freeswitch documentation that there are some events that can have the 'Content-Length' field twice.
We need to create some logic that allows us to access the two values in the example.

As an example look at the BACKGROUND_JOB event in the freeswitch documentation.

TL;DR

Content-Length: 625
Content-Type: text/event-plain

Job-UUID: 7f4db78a-17d7-11dd-b7a0-db4edd065621
Job-Command: originate
Job-Command-Arg: sofia/default/1005%20'%26park'
Event-Name: BACKGROUND_JOB
Core-UUID: 42bdf272-16e6-11dd-b7a0-db4edd065621
FreeSWITCH-Hostname: ser
FreeSWITCH-IPv4: 192.168.1.104
FreeSWITCH-IPv6: 127.0.0.1
Event-Date-Local: 2008-05-02%2007%3A37%3A03
Event-Date-GMT: Thu,%2001%20May%202008%2023%3A37%3A03%20GMT
Event-Date-timestamp: 1209685023894968
Event-Calling-File: mod_event_socket.c
Event-Calling-Function: api_exec
Event-Calling-Line-Number: 609
Content-Length: 41

+OK 7f4de4bc-17d7-11dd-b7a0-db4edd065621
Otoru commented

In commit 2f4752b we've added support for that.

In commit 9429440 We create tests that guarantee the expected behavior.

In commit 457c8eb we document defined behavior patterns.