Connecting to Revtel via SIP
From aa-asterisk.org.uk wiki
This HOWTO explains how to make a connection to and from Revtel using SIP.
This is for RevSWITCH (the "new" call server). The old (Asterisk) server is now deprecated.
On the clueless control panel (upper right) set "Username" to the number and ensure "Password" is left blank. Since RevSWITCH supports IPv6, you must specify a "Hostname" which doesn't resolve to an IPv6 address (or possibly specify the IPv4 address) for your Asterisk server. Incoming calls will not be authenticated but should only match the sip.conf context for the specified host.
In your sip.conf file add a section like this:
[aaisp]
type=peer
context=from_aaisp ; context for handling incoming calls
host=proxy.aaisp.co.uk ; replace 01234567890 with your number
qualify=yes ; optional
disallow=all ; optional (avoid transcoding)
allow=alaw ; optional (avoid transcoding)
fromuser=01234567890 ; replace 01234567890 with your number
directmedia=no ; optional (stops RTP connecting directly)
auth=01234567890:password@aasip ; replace password with "Outgoing p/w" on clueless
; replace 01234567890 with your number
In extensions.conf you can make outbound calls using
exten => _0X.,1,Dial(SIP/aaisp/${EXTEN}) ; the sip.conf context name must match the middle parameter
In extensions.conf you can accept incoming calls using
[from_aaisp] ; incoming context as given in sip.conf
exten => 01234567890,1,Dial(SIP/myphone) ; replace myphone with your local SIP extension
; replace 01234567890 with your number
Tony Hoyle 16:50, 18 August 2010 (UTC)
On asterisk 1.6.2 the above didn't work (the auth parameter is broken/unimplemented so you get no authentication without a secret= line, and the incoming IP is different to the call.me.uk one). I eventually got the following working:
[aaisp] type=peer host=sip.aaisp.co.uk qualify=yes disallow=all allow=alaw fromuser=01234567890 secret=password insecure=port,invite directmedia=no
jzaw 22:40, 09 November 2010 (UTC)
Also, as per the AAISP kb one might need to use in the above from Tony
sendrpid=yes trustrpid=yes
Tony Hoyle 15:18, 22 July 2011 (UTC)
Said by AA-Andrew on IRC
<AA-Andrew> number.call.me.uk is the legacy way (sorry) <AA-Andrew> use proxy.aasip.co.uk
So I've updated as necessary.
Andy Marriott 22:41, 29 April 2013 (UTC)
Using FreePBX 2.11.0.0 I found I had to add a username= line in addition to everything else mentioned above to make things work. My trunk config looks a bit like this:

