fonswitch-trunk-settings

trixbox CE Settings for FonSWITCH.

The way FonSWITCH (http://www.fonswitch.com) does their DID routing, is by the SIP TO header. The only thing you would need to do to get your FonSWITCH SIP trunk to route by DID would be to create a custom Asterisk context that parses the SIP TO header for you.

The following is how to get you up and running using trixbox CE and FonSWITCH.

Under Outgoing Settings:

username=username
secret=password
regexten=username
fromuser=username
fromdomain=sip.fonswitch.com
type=peer
context=custom-get-did-from-sip
host=sip.fonswitch.com
insecure=very
canreinvite=yes
auth=username

Under Registration String:

username:password@sip.fonswitch.com:5080/username

*note the "custom-get-did-from-sip" context above.

Under 'PBX->Config File Editor', there's a file called 'extensions_custom.conf'.

Add the following at the bottom of the file:

[custom-get-did-from-sip]
exten => _.,1,Goto(from-trunk,${CUT(CUT(SIP_HEADER(To),@,1),:,2)},1)