Now the problem is that neither outgoing nor incoming calls work. I don't know anything about asterisk so I'm quite lost what I have messed up. The instruction was very simple and straightforward though... The only magic number I found was $DECLARED_PREFIX = "9". It seems to be set to 9 for most, but not all, available providers. I don't know what it is, or if it is important. I tried "9" and "", same result.

When I placed a test call from my cell phone I noted the following entry in /var/log/asterisk/cdr-csv/Master.csv

Does this say anything meaningful? When I place the call a voice says "The number you have dialed is not in service. Please check the number and try again". Are there any other relevant logs that could give me a hint about whats going on?

When I try to place an outgoing call, I get the message "Call dropped. Reason: Normal clearing".

I also use affinity in sweden. I tried the sipgate template, that allow you to set username, passwd, host and number. My incoming calls work perfectly but i have problems calling out. Maybe we can put our minds together?

Mvh Daniel, Gävle

Edit: got it working with outgoing calls, FreePBX, outbound routes, modify dial patterns with the right prefixes.

I used Broadcom template to create a digisp file but I also get the message "The number you have dialed is not in service. Please check the number and try again" when calling in.maybe I should try the sipgate template?

I had the exact same issue when setting up my provider, voipgo. I had to email their support staff to get a basic asterisk sip.conf example, which still had to be modified a bit. The changes I made to the create_amp_*.pl are attached tohttp://svn.linuxmce.org/trac.cgi/ticket/942. Maybe your provider can help you by providing some basic asterisk configuration that you can use in creating a template?

You dont have to make an create_amp_*.pl. All you need to do is, go to webadmin, phone lines and choose sipgate (try for free, pay as you go) template. Then you supply your phonenumber, sip server, username and passwd. Easy as that.