Dialplan Script Testing

One of the new features of sipsorcery is the ability to create multiple dialplans. This means it’s now a lot easier to do a bit of testing if you’re struggling with a bit of Ruby script.

As an example say you have an issue with a regular expression match (a topical subject on the forums at the moment) you could create a new dialplan and put some minimal regular expression matching code in it.

sys.Log("webcallback dialplan starting...callback number=#{req.URI.User}")
case req.URI.User
   when /*1234$/ then sys.Log("#{req.URI.User} matched /*1234$/")
   else sys.Log("No match")
end

In this case I have used my webcallback dialplan so that I can do a test by invoking the callback URL
instead of having to call into my dialplan.

To invoke the above dialplan I used the following URL, you will need to put in your own sipsorcery username for it to work for you.

http://www.sipsorcery.com/callmanager.svc/webcallback?user=username&number=*1234

I got the dialplan trace emailed to me and unsuprisingly the log messages were:

DialPlan=> Dialplan trace commenced at 16 Jul 2009 18:36:08:180.
DialPlan=> webcallback dialplan starting…callback number=*1234
DialPlan=> *1234 matched /*1234$/

  1. destinycan’s avatar

    Hi Aaron,

    There are some security issues in local version. When you change the password (after you have created account), the new password is updated in the database table, BUT does not work when logging in to sipsorcery. The old password still works (even though in account information panel, the new password shows).

    Reply

    1. destinycan’s avatar

      Figured it out. It should have been customer password! sorry.

      Reply

    2. destinycan’s avatar

      Another problem:

      When I log in to sipsorcery from another computer (within my local network via http://192.168.xxx.xxx:8080/sipsorcery.html), the interface opens fine, but the login takes me to sipsorcery.com page rather than my local instance. This was the reason my password was not matching on my previous posts.

      Thanks.

      Reply

    3. sipsorcery’s avatar

      I think these comments would have been better under the local release post… In relation to the address used by the sipsorcery Silverlight GUI it is only programmed to use http://www.sipsorcery.com unless it is loaded from file or from localhost. To modify the default URL to something like 192.168.x.x a rebuild of the Silverlight solution is required. If you look at the source find the Page.xaml.cs file and adjust the two constants DEFAULT_MONITOR_HOST and DEFAULT_PROVISIONING_URL.

      Reply

    4. jvwelzen’s avatar

      Hi

      I was trying to change the ip addresses to my local machine

      and changed the DEFAULT_MONITOR_HOST and DEFAULT_PROVISIONING_URL.

      then I think I build it with visial studio 2008

      But what do we have replace in the local release

      does de xap file change or do we have to replace some other files

      I am not verry familiar with building programs

      Thanks

      Reply

      1. sipsorcery’s avatar

        You only need to replace the single sipsorcery.xap file in the clientbin directory.

        When you build the silverlight project the sipsorcery.xap file is in sipsorcery-silverlightSIPSorcery.GUIbindebug you have to copy it to the clientbin directory in your sipsorcery server directory yourself.

        Reply

        1. jvwelzen’s avatar

          When I build the silverlight project is says build success but the clientbin directory stays empty

          any tips

          Reply

Reply

Your email address will not be published. Required fields are marked *