How to get Custom Context in the Azure Communication Service Call Automation Evnets

Andrew Hall 5 Reputation points
2024-08-21T22:24:33.4866667+00:00

How do we configure the Event Grid System Topic to send the Custom Context for the Incoming Calls to process through the Call Automation SDK? The validation logic prevents you from using any type but Event Grid Schema and the raw json doesn't provide an element for the Custom Context. I'm trying to parse out SIP headers for the incoming call to use in the Call Automation SDK.

Azure Communication Services
Azure Communication Services
An Azure communication platform for deploying applications across devices and platforms.
845 questions
{count} vote

1 answer

Sort by: Most helpful
  1. ajkuma 25,781 Reputation points Microsoft Employee
    2024-08-30T13:00:08.2733333+00:00

    Andrew Hall, To better assist you on this, could you please share more details about your requirement?

    I understand you have already a few options. Based on my understanding of your scenario description, you can add custom context by specifying custom SIP headers when inviting a participant or during call transfer. These headers are key-value pairs that can be included in the AddParticipant or Transfer actions.

    Custom SIP Headers: Use the prefix X-MS-Custom- for your custom SIP headers.

    To parse out SIP headers for the incoming call, you can access the CustomHeaders property from the IncomingCallEvent object.

    Reference:

    Kindly let us know, I'll follow-up with you further.


    If the answer helped (pointed, you in the right direction) > please click Accept Answer to benefit the community find answers quickly to similar question_._

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.