Asterisk How to connect to FWD

Connecting Asterisk to Free World Dialup


Note that FWD now supports IAX

IAX instructions are further down this page.


Connecting via SIP


Note to MacOSX users: The FWD Assistant for automated configuration of FWD is available on this Wiki page

With no NAT between Asterisk and Free World Dialup


There are examples on how to do this in the standard Asterisk distribution. Look in SIP.CONF and EXTENSIONS.CONF.

With the proper configuration, you'll be able to
  • Dial out to FWD connections through your Asterisk server
  • Answer phone calls to your FWD extension on an Asterisk extension
  • Use Asterisk voice mail when not on line on your FWD extension
  • Receive calls from the FWD network into your PBX through IAXTEL.COM (Even if your Asterisk server is behind a NAT firewall - IAX traverses NAT boxes.)

With NAT between Asterisk and FWD

Please help us with sample configurations. There are hints that may help, but there are no reports of this working.

ivelin: unfortunately I cannot confirm that it is working. In my experience the registration times out and * keeps retrying forever.

DamianI have just setup a successful step with all the information included here including an anonymous addition of the following fields

First. Open up your sip.conf

make sure you change the two lines (as suggested below)
externip = 123.123.123.123
localnet = 192.168.0.0/255.255.255.0
(see a couple of lines below for the explanation)

You of course now have to have your FIREWALL (or router) point ports 5060 & 10000-20000 (yes 10000 through 20000) to your asterisk box.

Now after the
register => FWD##:password@fwd.pulver.com/2030
(read more about this line bellow)

You'll need the context:
[fwd-in]

type=friend
host=fwd.pulver.com ; (this of course matches the domain in the register above to make this contex visible)
allow=ulaw
nat=yes ; Here's the obvious lines
canreinvite=no ; Magical line. You will actually be using * in the middle to make sure
; that your sip phone can hear the fwd caller, but it means your sip
; connection is going THROUGH the * server with means double the
; bandwidth waste because you should have been able to connect
; directly to the fwd caller.


Please comment here if this worked for you or if this makes any sense


Attempts to connect via fwdnat.pulver.com:5082 gets a response of "This client is not authorized to use fwdnat.pulver.com" to an * register - unfortunately.

If one is willing to forward some ports to the machine running asterisk, adding the following lines to the [general] section of sip.conf has been known to work;

externip = 123.123.123.123
localnet = 192.168.0.0/255.255.255.0

where 123.123.123.123 is the IP address visible to the outside world (the NAT devices external interface) and 192.168.0.0 is the network address of the net inside the NAT. Ports to be forwarded to the asterisk machine would be 5060 and the range of ports specified in rtp.conf (10000-20000 by default). The rest of the configuration would be as described for the non-NAT case.

Connecting calls to FWD from Asterisk network (IAXTEL.COM)


  1. Register an account on http://www.iaxtel.com
  2. Activate the account according to instructions in the default/sample config files and instructions on iaxtel.com. This involves iax.conf and extensions.conf.
  3. To call FWD users, simply dial 1+700+99+five digit FWD number or 1+700+9+six digit FWD number.


Connecting to IAXTEL from Free World Dialup


  • Dial *1-(700)###.#### to reach any Inter-Asterisk Exchange number.

Connecting to Vonage from Free World Dialup


  • Dial **2431-(XXX)-XXX-XXXX to reach any Vonage number. This has been reported to work some of the time.

Connecting to Free World Dialup from Vonage


  • Dial 0110393-FWD-Number to reach any FWD number.

Connecting to Packet8 from Free World Dialup


  • Dial **898+1+(XXX)-XXX-XXXX to reach any Packet8 number.

Connecting to Free World Dialup from Packet8


  • Dial 0351 + FWD number for 5-digit FWD numbers
  • Dial 0451 + FWD number for 6-digit FWD Numbers


Example configuration of Asterisk

This configuration does not support Asterisk being behind a NAT firewall.

sip.conf


[general]
disallow=all
allow=gsm
allow=ulaw
allow=alaw
context = from-sip
maxexpirey=180
defaultexpirey=160
tos=reliability

register => FWD##:password@fwd.pulver.com/2030

The 2030 at the end of the above row is the extension of incoming calls on this SIP account.


[fwd-outgoing]
type=friend
secret=password
username=FWD##
host=fwd.pulver.com
fromdomain=fwd.pulver.com
insecure=very ; needed if we want to allow incoming FWD calls to bypass authentication

extensions.conf

All extensions beginning with a '7' is forwarded to Free World Dialup. To reach FWD extension 10000, dial 710000

[globals]
FWDUSERID=yourFWDuserID
FWDUSERNAME=Your Name
PHONE1=anyextensionyouwant
PHONE1VM=Voicemail-of-that-extension
FWDEXTEN=2030 ;See above in SIP.conf

[fwd-out]
exten => _7.,1,SetCIDNum(${FWDUSERID})
exten => _7.,2,SetCIDName(${FWDUSERNAME})
exten => _7.,3,Dial(SIP/${EXTEN:1}@fwd-outgoing)
exten => _7.,4,Playback(invalid)
exten => _7.,5,Hangup

[from-sip]
exten => ${FWDEXTEN},1,Dial(${PHONE1},30)
exten => ${FWDEXTEN},2,Voicemail(u${PHONE1VM})
exten => ${FWDEXTEN},3,Hangup
exten => ${FWDEXTEN},102,Voicemail(b${PHONE1VM})
exten => ${FWDEXTEN},103,Hangup




Connecting via IAX



Use this in your /etc/asterisk/iax.conf:


register => 12345:blah@iax2.fwdnet.net ; FWD Tel No. 12345, password blah

[iaxfwd] ; inbound connections from FWD
; it has to be 'iaxfwd' or it won't work
type=user
auth=rsa
inkeys=freeworlddialup
disallow=all
allow=ulaw ; FWD only support ulaw
context=fwd-incoming

[fwd-gw] ; outbound connections to FWD
type=peer
auth=md5
secret=blah
username=12345
qualify=yes
host=iax2.fwdnet.net
disallow=all
allow=ulaw
callerid="The Flintstones Inc"<12345>


and this in your extensions.conf:



[globals]
FWDUSERID=12345
FWDUSERNAME=The Flintstones Inc
FWDGW=IAX2/12345@fwd-gw

; -----------------------------------------------------------------------------
; Incoming calls from Free World Dialup (FWD)
; -----------------------------------------------------------------------------
[fwd-incoming]
;
exten => 12345,1,Goto(incoming,s,1)
; or whatever else you want to do with those calls

; -----------------------------------------------------------------------------
; Free World Dialup (FWD) VoIP service
; -----------------------------------------------------------------------------
[fwd-users]
;
exten => _*393[1-9]X.,1,SetCIDNum(${FWDUSERID})
exten => _*393[1-9]X.,2,SetCIDName(${FWDUSERNAME})
exten => _*393[1-9]X.,3,Dial(${FWDGW}/${EXTEN:4},60,r)
exten => _*393[1-9]X.,4,Hangup

[your-main-context-whatever-it-may-be]
;
include => fwd-users


That's all. Grant access to context "fwd-users" to anybody you want to allow to use your FWD credentials to dial out, typically by including fwd-users into the context they are assigned to.



See also



Back to Asterisk tips and tricks

Connecting Asterisk to Free World Dialup


Note that FWD now supports IAX

IAX instructions are further down this page.


Connecting via SIP


Note to MacOSX users: The FWD Assistant for automated configuration of FWD is available on this Wiki page

With no NAT between Asterisk and Free World Dialup


There are examples on how to do this in the standard Asterisk distribution. Look in SIP.CONF and EXTENSIONS.CONF.

With the proper configuration, you'll be able to
  • Dial out to FWD connections through your Asterisk server
  • Answer phone calls to your FWD extension on an Asterisk extension
  • Use Asterisk voice mail when not on line on your FWD extension
  • Receive calls from the FWD network into your PBX through IAXTEL.COM (Even if your Asterisk server is behind a NAT firewall - IAX traverses NAT boxes.)

With NAT between Asterisk and FWD

Please help us with sample configurations. There are hints that may help, but there are no reports of this working.

ivelin: unfortunately I cannot confirm that it is working. In my experience the registration times out and * keeps retrying forever.

DamianI have just setup a successful step with all the information included here including an anonymous addition of the following fields

First. Open up your sip.conf

make sure you change the two lines (as suggested below)
externip = 123.123.123.123
localnet = 192.168.0.0/255.255.255.0
(see a couple of lines below for the explanation)

You of course now have to have your FIREWALL (or router) point ports 5060 & 10000-20000 (yes 10000 through 20000) to your asterisk box.

Now after the
register => FWD##:password@fwd.pulver.com/2030
(read more about this line bellow)

You'll need the context:
[fwd-in]

type=friend
host=fwd.pulver.com ; (this of course matches the domain in the register above to make this contex visible)
allow=ulaw
nat=yes ; Here's the obvious lines
canreinvite=no ; Magical line. You will actually be using * in the middle to make sure
; that your sip phone can hear the fwd caller, but it means your sip
; connection is going THROUGH the * server with means double the
; bandwidth waste because you should have been able to connect
; directly to the fwd caller.


Please comment here if this worked for you or if this makes any sense


Attempts to connect via fwdnat.pulver.com:5082 gets a response of "This client is not authorized to use fwdnat.pulver.com" to an * register - unfortunately.

If one is willing to forward some ports to the machine running asterisk, adding the following lines to the [general] section of sip.conf has been known to work;

externip = 123.123.123.123
localnet = 192.168.0.0/255.255.255.0

where 123.123.123.123 is the IP address visible to the outside world (the NAT devices external interface) and 192.168.0.0 is the network address of the net inside the NAT. Ports to be forwarded to the asterisk machine would be 5060 and the range of ports specified in rtp.conf (10000-20000 by default). The rest of the configuration would be as described for the non-NAT case.

Connecting calls to FWD from Asterisk network (IAXTEL.COM)


  1. Register an account on http://www.iaxtel.com
  2. Activate the account according to instructions in the default/sample config files and instructions on iaxtel.com. This involves iax.conf and extensions.conf.
  3. To call FWD users, simply dial 1+700+99+five digit FWD number or 1+700+9+six digit FWD number.


Connecting to IAXTEL from Free World Dialup


  • Dial *1-(700)###.#### to reach any Inter-Asterisk Exchange number.

Connecting to Vonage from Free World Dialup


  • Dial **2431-(XXX)-XXX-XXXX to reach any Vonage number. This has been reported to work some of the time.

Connecting to Free World Dialup from Vonage


  • Dial 0110393-FWD-Number to reach any FWD number.

Connecting to Packet8 from Free World Dialup


  • Dial **898+1+(XXX)-XXX-XXXX to reach any Packet8 number.

Connecting to Free World Dialup from Packet8


  • Dial 0351 + FWD number for 5-digit FWD numbers
  • Dial 0451 + FWD number for 6-digit FWD Numbers


Example configuration of Asterisk

This configuration does not support Asterisk being behind a NAT firewall.

sip.conf


[general]
disallow=all
allow=gsm
allow=ulaw
allow=alaw
context = from-sip
maxexpirey=180
defaultexpirey=160
tos=reliability

register => FWD##:password@fwd.pulver.com/2030

The 2030 at the end of the above row is the extension of incoming calls on this SIP account.


[fwd-outgoing]
type=friend
secret=password
username=FWD##
host=fwd.pulver.com
fromdomain=fwd.pulver.com
insecure=very ; needed if we want to allow incoming FWD calls to bypass authentication

extensions.conf

All extensions beginning with a '7' is forwarded to Free World Dialup. To reach FWD extension 10000, dial 710000

[globals]
FWDUSERID=yourFWDuserID
FWDUSERNAME=Your Name
PHONE1=anyextensionyouwant
PHONE1VM=Voicemail-of-that-extension
FWDEXTEN=2030 ;See above in SIP.conf

[fwd-out]
exten => _7.,1,SetCIDNum(${FWDUSERID})
exten => _7.,2,SetCIDName(${FWDUSERNAME})
exten => _7.,3,Dial(SIP/${EXTEN:1}@fwd-outgoing)
exten => _7.,4,Playback(invalid)
exten => _7.,5,Hangup

[from-sip]
exten => ${FWDEXTEN},1,Dial(${PHONE1},30)
exten => ${FWDEXTEN},2,Voicemail(u${PHONE1VM})
exten => ${FWDEXTEN},3,Hangup
exten => ${FWDEXTEN},102,Voicemail(b${PHONE1VM})
exten => ${FWDEXTEN},103,Hangup




Connecting via IAX



Use this in your /etc/asterisk/iax.conf:


register => 12345:blah@iax2.fwdnet.net ; FWD Tel No. 12345, password blah

[iaxfwd] ; inbound connections from FWD
; it has to be 'iaxfwd' or it won't work
type=user
auth=rsa
inkeys=freeworlddialup
disallow=all
allow=ulaw ; FWD only support ulaw
context=fwd-incoming

[fwd-gw] ; outbound connections to FWD
type=peer
auth=md5
secret=blah
username=12345
qualify=yes
host=iax2.fwdnet.net
disallow=all
allow=ulaw
callerid="The Flintstones Inc"<12345>


and this in your extensions.conf:



[globals]
FWDUSERID=12345
FWDUSERNAME=The Flintstones Inc
FWDGW=IAX2/12345@fwd-gw

; -----------------------------------------------------------------------------
; Incoming calls from Free World Dialup (FWD)
; -----------------------------------------------------------------------------
[fwd-incoming]
;
exten => 12345,1,Goto(incoming,s,1)
; or whatever else you want to do with those calls

; -----------------------------------------------------------------------------
; Free World Dialup (FWD) VoIP service
; -----------------------------------------------------------------------------
[fwd-users]
;
exten => _*393[1-9]X.,1,SetCIDNum(${FWDUSERID})
exten => _*393[1-9]X.,2,SetCIDName(${FWDUSERNAME})
exten => _*393[1-9]X.,3,Dial(${FWDGW}/${EXTEN:4},60,r)
exten => _*393[1-9]X.,4,Hangup

[your-main-context-whatever-it-may-be]
;
include => fwd-users


That's all. Grant access to context "fwd-users" to anybody you want to allow to use your FWD credentials to dial out, typically by including fwd-users into the context they are assigned to.



See also



Back to Asterisk tips and tricks
Created by: oej, Last modification: Sun 19 of Nov, 2006 (02:29 UTC) by medme
Please update this page with new information, just login and click on the "Edit" or "Discussion" tab. Get a free login here: Register Thanks! - Find us on Google+