[Freeswitch-users] Multiple Diversion headers

Sjoerd Boomstra S.Boomstra at telecats.nl
Wed Aug 22 14:10:58 UTC 2018


Hi All,

I'm struggling with multiple Diversion headers. In our case we have an incoming call with multiple diversion headers, we do some processing and want to add a diversion header ourselves to the outgoing call.

What I've found so far is that for inbound calls one needs to set the profile param parse-all-invite-headers=true, this results in a sip_i_Diversion variable that uses the ARRAY:: syntax and has all the values I want. So far so good.

Example:
ARRAY::<sip:Carol at uas2.isp.com>;privacy=off;reason=unconditional;counter=2;screen=no|:<sip:Bert at uas2.isp.com>;privacy="full";reason=user-busy;counter=3;screen=no|:<sip:Bob at uas1.isp.com>;reason=do-not-disturb;counter=1

For the outbound call it's more difficult, I cannot get FreeSwitch to produce multiple Diversion headers. The only syntax I've found is using comma's in the value, like this:
<action application="export" data="sip_h_Diversion=<sip:Carol at uas2.isp.com>;privacy=off;reason=unconditional;counter=2;screen=no,<sip:Bert at uas2.isp.com>;privacy="full";reason=user-busy;counter=3;screen=no,<sip:Bob at uas1.isp.com>;reason=do-not-disturb;counter=1,<sip:Bert at uas2.isp.com>;reason=user-busy"/>

This results in a single diversion header with the contents I put in. From the RFC's I understand that this is technically equivalent to 4 (in my case) Diversion headers, is this true?

Is there a way I can convince FS to generate multiple separate diversion headers?

Best regards,
Sjoerd.

BTW I've tested with FS 1.6.20 and 1.4.26
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20180822/4a20b32c/attachment-0001.html>


More information about the FreeSWITCH-users mailing list