Skip to main content

How to Retrieve SIP Header Parameters from LH in Microsoft Copilot Studio ๐Ÿ› ๏ธ

Tomer Yair Zemel avatar
Written by Tomer Yair Zemel
Updated over a week ago

Need to route calls based on SIP headers like X-Caller-Type or X-Customer-ID? This guide shows you how to extract SIP header parameters passed from AudioCodes Live Hub into your bot in Microsoft Copilot Studio (formerly Power Virtual Agents).

๐Ÿ” This setup works for both inbound and transferred calls! For complete instructions, refer to the official Tech Docs.

๐Ÿ” This setup works for both inbound and transferred calls!


โœ… What Youโ€™ll Learn

  • How Live Hub sends SIP headers to your bot

  • How to store these headers in your bot using global variables

  • How to work with them inside Adaptive Dialogs

  • Tips for other bot platforms like Google Dialogflow or Rasa


๐Ÿค” What are SIP Headers and Why Use Them?

SIP headers are metadata sent with calls, like customer type, campaign ID, or call source. These are passed by Live Hub to your bot automaticallyโ€”if you configure them.

You can use these headers to:

  • Route VIP customers differently

  • Personalize the bot greeting

  • Log values for analytics or support


๐Ÿงญ Step-by-Step Setup

๐Ÿ”ง Step 1: Configure SIP Headers in Live Hub

Make sure your SIP Connection settings in Live Hub include the headers you want forwarded to the bot.

โžก๏ธ Learn how to do this


๐Ÿง  Step 2: Create Global Variables in Copilot Studio

Inside your bot, define global variables to store the incoming header values. For example:

Global.caller Global.sipHeader1 Global.sipHeader2 ...

โš ๏ธ These names must match the ones being passed from Live Hub in the ChannelData payload. This depends on how your SIP headers were defined in the portal.


๐Ÿ’ฌ Step 3: Use Adaptive Dialog Code to Extract SIP Headers

Hereโ€™s a sample snippet to add to your botโ€™s topic using Adaptive Dialog JSON:

{   "$schema": "https://schemas.botframework.com/schemas/adaptive-dialog.json",   "kind": "AdaptiveDialog",   "id": "main",   "triggers": [     {       "kind": "OnEventActivity",       "actions": [         { "kind": "ParseValue", "variable": "Global.caller", "valueType": "String", "value": "=System.Activity.ChannelData.caller" },         { "kind": "ParseValue", "variable": "Global.sipHeader1", "valueType": "String", "value": "=System.Activity.ChannelData.sipHeader1" },         { "kind": "ParseValue", "variable": "Global.sipHeader2", "valueType": "String", "value": "=System.Activity.ChannelData.sipHeader2" }       ]     }   ] }

๐ŸŽฏ Adjust the header names to match your actual SIP header keys from Live Hub.


๐Ÿค– What About Other Bot Platforms?

You can use this with other frameworks that support incoming webhook payloads and custom JSON parsing.

Bot Platform

Works?

Notes

Microsoft Bot SDK

โœ… Yes

Use ChannelData directly

Google Dialogflow

โœ… Yes

Parse via webhook middleware

Rasa

โœ… Yes

Use connector or webhook middleware

Amazon Lex

โš ๏ธ No

Does not support SIP or header injection

Twilio Autopilot

โŒ No

Deprecated and doesnโ€™t support custom SIP integration


๐Ÿ“š Helpful Resources


๐Ÿš€ Ready to go?

Once your SIP headers are mapped in Live Hub and your bot is set up, you can:

  • Route calls by header value

  • Display caller details

  • Trigger logic based on header types

Need help? Just message our support team or share this doc with your developer ๐Ÿ‘‡

Happy Connecting! ๐Ÿค–๐Ÿ“ž

The LiveHub Team

Did this answer your question?