Developer documentation?

Place for developers to chat about the code
Post Reply
HappyCamp
Posts: 2
Joined: Tue Aug 27, 2013 10:42 pm

Developer documentation?

Post by HappyCamp » Tue Aug 27, 2013 10:50 pm

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

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

Re: Developer documentation?

Post by Aaron » Wed Aug 28, 2013 10:47 am

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.

HappyCamp
Posts: 2
Joined: Tue Aug 27, 2013 10:42 pm

Re: Developer documentation?

Post by HappyCamp » Wed Aug 28, 2013 10:53 pm

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

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

Re: Developer documentation?

Post by Aaron » Thu Aug 29, 2013 7:07 am

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.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest