These are some of the configurations we have found to work best.

Virtualphoneline provides simple call forwarding. We do not offer SIP or IAX2 accounts (PEERS) Like other service providers at this time, to register on our network. You should be able to receive calls from Virtualphoneline over sip or iax2. The ip the calls are sent from is 66.98.180.77

You must configure your Asterisk's general settings in order to be able to receive these calls, or you will not be able to receive these calls from Virtualphoneline.

Asterisk Sample Configurations
** Sample sip.conf
** Sample extensions.conf
** Sample iax.conf

How to buy and route a number from Virtualphoneline over IAX2
How to buy and route a number from Virtualphoneline over SIP.

SIP.Conf Sample File Location: /etc/asterisk/sip.conf



Since the call is going to you over GENERAL Context, you will need to add the following lines to make your asterisk work with Virtualphoneline properly. Otherwise you will face errors and will think that Virtualphoneline is not working.

We will explain below why you need to add each particular line.

[general]
context=Default <<< This is very important, as this is where the call from Virtualphoneline will land to. If the context does not exist in your extensions.conf the call will not come to your asterisk, and will return "404 not found" to Virtualphoneline, very common error at our end.

port=5060 << The port where Virtualphoneline sends the call to. Click Here for sending calls on a different port

bindaddr=64.246.22.119 ; Please bind to your main IP address that you are using.

srvlookup=yes ; Enable DNS SRV lookups on outbound calls
dtmfmode=rfc2833 <<< If you need DTMF and you do not have this line, there may be errors in getting DTMF from Virtualphoneline.

relaxdtmf=no

disallow=all
allow=ulaw <<< Required for DTMF
allow=alaw <<<< Required for DTMF
allow=gsm

maxexpirey=30
defaultexpirey=180
canreinvite=yes
nat=0
UserAgent= Asterisk
echocancel=yes
echocancelwhenbridge=yes

[1000] << A Sip User - Nothing to do with Virtualphoneline
type=friend
username=12126559343

Notice that there is no registration information of ours on your server, because we do not require you to register any users / peers on our network. We use standard SIP and IAX2 forwarding.


IAX.conf /etc/asterisk/iax.conf


[general]
bindport=4569
bindaddr=0.0.0.0 <<<< Your server ip address
jitterbuffer = yes
disallow=all
allow=alaw
allow=ulaw
dtmfmode = rfc2833 <<< To get DTMF Properly from Virtualphoneline
context=Default <<< This is where your call will land to if you do not send it to a user IE asterisk@yourdomain.com/1111111111

allow=all <<< Codec which you want to use for Virtualphoneline

[guest]
Context=default <<<< Where you want the calls to go into from Virtualphoneline if u send it to guest:guest@domain.com/12126555763

Disallow= all
Allow= ulaw <<<< Codec on which calls will come to your asterisk server
dtmfmode= rfc2833 <<< To get DTMF Properly from Virtualphoneline

Notice that there is no registration information of ours on your server, because we do not require you to register any users / peers on our network, we use standard SIP and IAX2 forwarding and the calls are going to land on your guest user, or you can land them to any other user of your own.


Extensions.conf /etc/asterisk/extensions.conf


Extensions.conf has to know where the call you are getting from has to go to.

We are going to assume that you are using context Virtualphoneline where you want to send your calls to

[didx]
exten => _X.,1,Dial(SIP/123456@fwd.pulver.com)
exten => _X.,2,Hangup

This will send all the calls to the freeworlddialup account number 123456

This is just a SAMPLE for you to go ahead and configure it properly.


How to to buy and route the call over SIP


Extensions.conf has to know where the call you are getting from has to go to.

Use the API or use the web site to purchase a number and then route it accordingly to your server.

After you BUY a number, it will ask you where to route it, and ask you for SIP or IAX2 address.

Enter the user name and server name of the sip server that you wish to send the call to, IE you want to send the call to a SIP User 1234 on your server ip 203.123.123.1 you will write in the sip forwarding address. 1234@203.123.123.1

If you have a domain name on that ip, then you can enter 1234@yourserver.com

Tip: We suggest that you use e164 format to send the call to yourself, and it will make it easier for you to trace it ie 12126555763@sip.Virtualphoneline.org or44208212341234@virtualphoneline.com

If you have any problems, click on CONTACT US after logging into your account. Please remember that Virtualphoneline is for SERVICE PROVIDERS and CARRIERS and if you need professional support you can visit www.digium com or www.asterisksupport com


How to to buy and route the call over IAX2


IAX2 or Inter Asterisk Exchange is designed for talking from asterisk to asterisk, so since we use asterisk, that is the best protocol to use with Virtualphoneline.

BUT We do not provide registration on our network, you have to forward the calls to your asterisk server.

We will provide a PUBLIC KEY Soon that will make sure that the call is coming from us and no hacking would be possible on your network this way.

If you have any suggestions, please do contact us with them.

Now, to route the call to your network.

1. Buy a Number.
2. Click on IAX
3. Define the Ring to address of your asterisk server.

IE guest:guest@Virtualphoneline.org/33170725902

Or if you have a particular user you want to send the call to, you can send it to that user.

IE 33170725902:w3s235s22@Virtualphoneline.org/33170725902

If you have any problems, click on CONTACT US after logging into your account. Please remember that Virtualphoneline is for SERVICE PROVIDERS and CARRIERS and if you need professional support you can visit www.digium.com or www.asterisksupport.com

Forwarding calls on port other 5060:

Simply put ":" after the server's name for instance if the server name if want to forward a DID on number@Virtualphoneline.org and the port you're using is 5061, you would now forward it like number@Virtualphoneline.org:5061.


Trouble Shooting your problems of call not coming to your asterisk


Most of the time we get request that the call is not going though, or voice is not coming on the did, this is why we give 2 FREE did's so that before you attempt to buy anything, you can check the setup at your and our end, this helps us trouble shoot the problem.

Whenever you have a problem with any did number, you should first use the free did to test the same problem, because the problem can be at providers end also, but the free did's are toughly tested before we give them to you.

Playing a MP3 file from your server:
Playing a MP3 file from your server will help you easily detect some of the errors, simply enter this code in your extensions.conf default contact defined in your general sip.conf section.

exten => radio,1,Answer

exten => radio,2,MP3Player(http://www.Virtualphoneline.org/jesus.mp3)

then send the call from Virtualphoneline to your server to radio@yourdomain.com or radio@yourip

This will play a song on the phone, and will show that the call is going though fine to your asterisk.

Support

If you have any problems, click on CONTACT US after logging into your account. Please remember that DIDX is for SERVICE PROVIDERS and CARRIERS (who are in wholesale business) and if you need professional Asterisk or SIP/IAX support.