A great way to test inbound calling with FreePBX/Asterisk is to get a free UK DDI/DID number from ukddi.com and point it at your FreePBX server. You can currently get up to 10 free numbers, based anywhere in the UK.
Four steps to inbound calling –
Step 1 – Visit the ukddi.com website where you can register for free. Request a DDI number in your desired geographical location.
Step 2 – Point your ukddi.com number at your Asterisk server. I recommend making the number to the left of the @ sign match your DDI number, but in an international format.
Setp 3 – Create an Inbound Route in FreePBX. The ‘DID Number’ should match the number you used in the ukddi.com control panel. To test inbound routing you can set the destination to ‘Terminate Call: Put caller on hold forever’. That way you should hear music-on-hold when you dial the number.
Step 4 – In the FreePBX General Settings page you must set ‘Allow Anonymous Inbound SIP Calls’ to Yes. This is because we are not registered with ukddi.com and must tell FreePBX to allow the call.
Setting “Allow Anonymous Inbound SIP Calls” to Yes is potentially unsafe. It gives attacks a chance to connect to your server via SIP in an attempt to compromise it. Please either set up SIP trunks to UKDDI (to tell Asterisk they are authorised connections) or see here for more information – http://sysadminman.net/blog/2011/sip-scanning-attacks-freepbx-allow-anonymous-3276
And that’s all there is to it. Dial your inbound number and you should hear music-on-hold.