How to compile the source code from mysipswitch

Place for developers to chat about the code
User avatar
Aaron
Site Admin
Posts: 4569
Joined: Thu Jul 12, 2007 12:13 am

Post by Aaron » Tue Sep 16, 2008 2:20 pm

Hi jvwelzen,

The web server code is in the SIPSwitch.Web assembly, as mentioned previously you'll need IIS to be able to deploy it. We haven't released the actual XML, XSL and HTML pages that make up our web site so you would need to construct those but all the back end code is there.

Instead I'd recommend reading the readme.txt in the latest release and seeing if the XML configuratoin mechanism can suit your needs it's a lot easier.

regards,

Aaron

jvwelzen
Posts: 716
Joined: Thu Sep 11, 2008 1:56 pm

Post by jvwelzen » Tue Sep 16, 2008 2:28 pm

Is it possible you can give a little example what we can do with it

I am not used to write aspx files

I am usally using php to write websites..

Thanks

Sorry if you think I am I nono

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

Post by Aaron » Tue Sep 16, 2008 2:52 pm

Hi jvwelzen,

The approach we use for our web pages is a bit different to normal and is based on the MVC model (http://www.azaclauson.com/maverick/ http://www.azaclauson.com/mavericklite/). It's a powerful approach since you can construct each page from blocks of XML from as many different sources as required and format it all down to HTML using an XSL file. The downside of this approach is that it's a lot more complex than HTML or even PHP files.

It would take a month or more to get your head wrapped around our pages.

If you really need a web site then maybe have a look at the SIPSwitchServices class in the SIPSiwtch.Web assembly. It's a bunch of web services that are called whenever anything useful is done on a mysipswitch page. The page on the mysipswitch web site are not much more than a bunch of javascript calls back to those web services. If you create a web site using the SIPSwitch.Web assembly and then create an .asmx file with the line below you'll be able to do everything the client side pages can do and you could also hook into those methods using php.

Code: Select all

<%@ WebService Class="SIPSwitch.Web.SIPSwitchProvisioningServices" %>
Regards,

Aaron

jvwelzen
Posts: 716
Joined: Thu Sep 11, 2008 1:56 pm

Post by jvwelzen » Tue Sep 16, 2008 2:57 pm

Thanks Aaron I am going to play with this stuff

Thanks for this great piece of software

jvwelzen
Posts: 716
Joined: Thu Sep 11, 2008 1:56 pm

Post by jvwelzen » Tue Sep 16, 2008 3:08 pm

I am getting 2 errors

I'm I doing something wrong !!!

2008-09-16 17:04:39,382 [4088] ERROR sipswitch [(null)] - Exception Load3rdPartyRegistrations. Object reference not set to an instance of an object.

<sipproviders>
<sipprovider>
<owner>kanoli</owner>
<providername>poivy</providername>
<providerusername>XXXXXX</providerusername>
<providerpassword>xxxxxxx</providerpassword>
<providerserver>sip.poivy.com</providerserver>
<registerenabled>true</registerenabled>
<registercontact>sip:kanoli@sip.huizenwireless.nl</registercontact>
</sipprovider>
</sipproviders>


2008-09-16 17:04:39,302 [4088] WARN sipswitch [(null)] - Cannot load Domains, no XML.

<domains>
<domain>
<value>sip.huizenwireless.nl</value>
<alias>sip.huizenwireless.nl:5060</alias>
<alias>sip.huizenwireless.nl</alias>
</domain>
</domains>

do the files in xmlconfig need to be read only

<extensions>
<extension domain='sip.huizenwireless.nl' extension='1234'>kanoli</extension>
</extensions>

<sipaccounts>
<sipaccount>
<sipusername>XXXXX</sipusername>
<sippassword>XXXXXX</sippassword>
<domain>sip.huizenwireless.nl</domain>
</sipaccount>
</sipaccounts>


<dialplans>
<dialplan username='kanoli'>
<![CDATA[#Ruby
sys.Log("call to #{req.URI.ToString()} from #{req.Header.From.ToString()}")
sys.Dial("poivy")
]]>
</dialplan>
</dialplans>

jvwelzen
Posts: 716
Joined: Thu Sep 11, 2008 1:56 pm

Post by jvwelzen » Tue Sep 16, 2008 3:15 pm

I think I found It

I moved the sipswitch folder to c:/temp/

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest