need to read a custom header in an incoming csll

Feedback, issues & questions regarding the use of the Telis Wizard and Simple Wizard dial plans.
Post Reply
ccwalkerjm
Posts: 7
Joined: Sat Aug 10, 2013 8:48 pm

need to read a custom header in an incoming csll

Post by ccwalkerjm » Sat Aug 10, 2013 8:55 pm

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

User avatar
Aaron
Site Admin
Posts: 4558
Joined: Thu Jul 12, 2007 12:13 am

Re: need to read a custom header in an incoming csll

Post by Aaron » Sat Aug 10, 2013 11:28 pm

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")

ccwalkerjm
Posts: 7
Joined: Sat Aug 10, 2013 8:48 pm

Re: need to read a custom header in an incoming csll

Post by ccwalkerjm » Sun Aug 11, 2013 7:10 am

thanks Aaron.

ccwalkerjm
Posts: 7
Joined: Sat Aug 10, 2013 8:48 pm

Re: need to read a custom header in an incoming csll

Post by ccwalkerjm » Sun Aug 11, 2013 7:44 am

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")

ccwalkerjm
Posts: 7
Joined: Sat Aug 10, 2013 8:48 pm

Re: need to read a custom header in an incoming csll

Post by ccwalkerjm » Sun Aug 11, 2013 8:47 am

I was able to resolve the problem. Needed to remove the quotes from the header value.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest