This may be very simple but how I do assign a custom header value to a variable. I am new to both sipsorcery and ruby.
Thanks
need to read a custom header in an incoming csll
-
- Posts: 7
- Joined: Sat Aug 10, 2013 8:48 pm
Re: need to read a custom header in an incoming csll
You can't do that in the SimpleWizard dialplan but you can in a Ruby dialplan. Below is an example of the Ruby code you can use:
Code: Select all
myVar = req.Header.GetUnknownHeaderValue("Some-Header")
-
- Posts: 7
- Joined: Sat Aug 10, 2013 8:48 pm
Re: need to read a custom header in an incoming csll
thanks Aaron.
-
- Posts: 7
- Joined: Sat Aug 10, 2013 8:48 pm
Re: need to read a custom header in an incoming csll
I am trying to do this but without luck. Please tell what I am doing wrong.
myVar = req.Header.GetUnknownHeaderValue("Some-Header")
sys.Dial("${myVar}@provider")
myVar = req.Header.GetUnknownHeaderValue("Some-Header")
sys.Dial("${myVar}@provider")
-
- Posts: 7
- Joined: Sat Aug 10, 2013 8:48 pm
Re: need to read a custom header in an incoming csll
I was able to resolve the problem. Needed to remove the quotes from the header value.