Page 1 of 1

Developer documentation?

Posted: Tue Aug 27, 2013 10:50 pm
by HappyCamp
I was trying to play around with the Ruby dial plan. Looking at some examples on here for information.

Is there a good location for the documentation? It seems a tad sparse. I see what is on the Help page and also on the Wiki. The reason I think it seems sparse is some of the dial plans are using things which don't appear to be covered by the documentation. I was mainly looking at the Mike Telis script for inspiration/information.

For an example I had gotten to the part where I was interested in knowing what information is passed in via the req.URI variable. But I couldn't seem to find it. So a pointer to that would be great! :)

Also what libraries are available for use? I see for example a library called 'mikesgem" is available. I was wondering what other ones are available.

Now maybe all this is because I know Python and C, but have never played much with Ruby. So if you ever allowed dial plans done in Python that would be great! :D

Thanks

Re: Developer documentation?

Posted: Wed Aug 28, 2013 10:47 am
by Aaron
The two best sources for the functions and variables available in the SIPSorcery dialplans are:

viewtopic.php?f=6&t=399
http://www.sipsorcery.com/mainsite/Help/DialPlans

I am continuing to work on getting the page on the Help site to be complete. In the meantime if you find a function that's not described feel free to post here.

The number of Ruby gems supported is very small mainly due to the security implications. The two mains ones are httpclient and json.

Python dialplans are not supported.

Re: Developer documentation?

Posted: Wed Aug 28, 2013 10:53 pm
by HappyCamp
Thanks for the links.

What is the layout of the "req" variable? I'm happy to look in the source code to figure it out, but I'll admit I got lost and wasn't sure what file defined it.

Thanks

Re: Developer documentation?

Posted: Thu Aug 29, 2013 7:07 am
by Aaron
req is an alias for the SIPRequest object that initiated the dialplan execution. The SIPRequest object is an instance of the C# class that you can see the source for here http://sipsorcery.codeplex.com/SourceCo ... Request.cs.