Archive for the ‘Website’ Category.

Using callwithus with Asterisk, FreePBX and A2Billing

The instructions below assume that you have got Asterisk, FreePBX and A2Billing installed and working together.

Below are the first steps in setting up a callwithis DID number and passing the call through to A2Billing. This number can then be used as an access number for your calling card clients.

Once you’ve signed up for your callwithus account and purchased your DID number the next thing you want to do is modify how your DID number gets presented to your Asterisk box so you can route it to a2billing.

On the callwithus website, click on DID on the left hand menu and then locate the DID number you want to use and click ‘edit’. Now under ‘DESTINATION’ add ‘/yourdidnumber’ the the end of ‘SIP/youraccountnumber’

This will cause callwithus to append your DID to the call details when it is passed through to your Asterisk server. See the image to the right for details.  

 

 

 

Next we want to go into FreePBX and register A2Billing as a ‘Custom Destination’.

If you don’t have the ‘Custom Destination’ menu in FreePBX you will need to go to the modules menu option and install the ‘Custom Applications’ module.
Enter ‘a2billing’ as the Description and ‘custom-a2billing,${EXTEN},1′ as the custom destination

 

 

Now we want to configure our callwithus trunk.

 

 

 

Configure your trunk as in the images here, obviously using your username and password. More information on how to setup your trunk can be found on the callwithus website here.

 

 

 

Now we just need to configure our inbound route. This inbound route decides what happens to a call when it is presented to your Asterisk server. Give it a meaningful description and then in the ‘DID Number’ box enter your callwithus DID in the same format you used in step one above.

Scroll down to the bottom of the configuration page and you should see the ‘a2billing’ ‘Custom Application’ that you setup earlier. Select this and then click on Submit. Don’t forget to click on ‘Apply Configuration’ at the top of the FreePBX page to get Asterisk to read your changes.

 

And that’s it for now. If you call your callwithus DID it should come to your Asterisk box and then be passed to a2billing. Depending on how you’ve got a2billing configured will determine what happens to that call now.

I’ll discuss in a later post some ideas about how to configure a2billing

ffmpeg and streaming video

I’ve been interested in trying to stream some of my videos from my server rather than from YouTube. YouTube is great but the video quality is pretty poor.

I’m running CentOS 5.2 and decided to just try installing ffmpeg from rpmforge rather than compiling it. Lazy but easy!

rpmforge is a repository where you can find lots of prebuilt packages that are not part of a standard Redhat/CentOS install. You can find instructions for setting it up here.

So, with rpmforge configured, this was all I needed

# yum install ffmpeg
#

Then I looked round for a player to stream the video (which were going to be in flash format). Flowplayer looked pretty nice. I just wanted something simple that would have only the video and controls on the page.

After looking over the sample html pages that come with flowplayer it was easy to create a page with just the video on there. So I uploaded my videos which were in mpg format.

Running the command

# ffmpeg -i video.mpg -s 320x288 -b1200000 -ar 44100 video.flv
#

converted the video to flash format with a pretty high quality but without making the files too large. I’m sure I could probably find better settings if I played around a bit more.

And here some examples of the end result -

http://video.sysadminman.net/takeoffsywell.html

http://video.sysadminman.net/alconbury.html

http://video.sysadminman.net/fisty_nuts.html

Just out of interest - the aircraft is a Pegasus Quantum 582 which you can see a picture of here.

I no longer own it and and miss the summer evenings flying around the english countryside.

What does my website look like?

So, maybe everyone knows this already, but …

I’ve only just started started designing websites and found this useful site - http://browsershots.org/

It will show you what your website looks like when viewed in different browsers, on different platforms. It actually shows you a screen grab of the page.

Turns out IE5.5 doesn’t like my transparent png, nor does it like something in my stylesheet!