Overview
When working with different IVR and subprojects sometimes it is needed to carry data in variables from one IVR to another. Although there are alternate ways to ensure variables keep their values, this article focus on how to use SIP headers to carry variables when in a call.
How to include a variable in a SIP header?
In order to add a variable to a SIP header we are going to need three fundamental elements:
- A Custom App. In this case SIPAddHeader.
- A specific SIP header. We will use X-input header.
- A variable that we'll put into the header. Say VAR1, VAR2 or INPUT.
Check this example in which we are adding variable INPUT to a SIP header in the first IVR:
Recovering variables from a SIP header
Conversely, once the call has been sent to a different IVR project, it is posible to retrieve the value assigned to a variable from the SIP signaling.
In order to retrieve a variable from a SIP header we are going to need three fundamental elements:
- A Set app.
- The specific SIP header header we know is carrying the variable, in this case: X-input.
- A variable to assign the value we are retrieving from the headers. Say VAR1, VAR2 or INPUT.
In this example we are fetching a value being carried on SIP header X-input and we are assigning it back to variable INPUT. This operation is being done in a subsequent IVR:
Conclusion
It is possible to transport the content of a variable across multiples IVRs with this strategy. For more information do not hesitate to contact us at support@linkedip.com.
Comments
0 comments
Please sign in to leave a comment.