[Freeswitch-users] Copy or Extract Contact Parameters from A-leg to B-leg

Chris Wallace c.wallace777 at gmail.com
Sat Jun 19 17:30:12 UTC 2021

We are working on implementing STIR/SHAKEN and have run into a snag when
passing calls through our FreeSwitch LCR which sits between our call
feature server and our SBC's. Our call feature server is passing parameters
in the Contact for attestation-info and origination-id. It is intended that
our SBC's will extract this data from the Contact and use it to generate an
identity header before leaving our network. Ideally this information would
be passed via X-Header(s) but unfortunately this is what we have to work
with at the moment.

We have tried to use both the "sip_invite_contact_params" and
"sip_contact_params" channel variables but neither of them seem to get any
data from the Contact within the inbound INVITE. We had success testing
with "sip_contact_user" and dumping that data to an X-Header but we can't
seem to get FreeSwitch to recognize or dump the other parameters.

When debugging an active call and dumping the channel variable data for
each leg of the call we don't see any of the additional parameters that are
in the Contact listed in the channel variables that are dumped for either
call leg's UUID.

*Contact in INVITE into FreeSwitch*
Contact: <sip:15558675309 at x.x.x.x:5060>;isup-oli=00;attestation-info=1;origination-id=1000;verstat=0

*sip_contact_user Dump to X-Header:*
X-ContactUser: 15558675309

*FreeSwitch Logging:*
EXECUTE [depth=0] sofia/core/15558675309 at x.x.x.x:5060
2021-06-18 15:24:10.079576 [DEBUG] switch_channel.c:1310 EXPORT
(export_vars) [sip_h_X-ContactUser]=[15558675309]
EXECUTE [depth=0] sofia/core/15558675309 at x.x.x.x:5060
2021-06-18 15:24:10.079576 [DEBUG] switch_channel.c:1310 EXPORT
(export_vars) [sip_h_X-ContactParam]=[UNDEF]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20210619/3daa49ab/attachment.html>

More information about the FreeSWITCH-users mailing list