Asterisk Remove Sipgate Alphanumeric ID Extension

Sipgate provide SIP account numbers with alphanumeric sub-accounts. The sub-account extension needs to be removed in order for FreePBX to generate the trunks inbound route.

The following has been added to extensions_custom.conf

[from-trunk-sipgate]
exten => _.,1,Noop(Remove Sipgate Extra Digits)
exten => _.,n,Goto(from-trunk,${EXTEN:0:7},1)

and the following added to the trunks PEER Details

context=from-trunk-sipgate

FreePBX settings for Draytel

Its taken a few hours work, but the below settings seem to work for incoming calls on Draytel to my Asterisk installation


PEER DETAILS

username=MYUSERNAME
usereqphone=yes
type=friend
secret=MYPASSWORD
port=5065
outboundproxy=nat.draytel.org
host=draytel.org
fromuser=MYUSERNAME
fromdomain=draytel.org
dtmfmode=rfc2833
context=from-trunk
canreinvite=no
allow=alaw,g711,ulaw

REGISTRATION STRING

MYUSERNAME:MYPASSWORD:MYUSERNAME@draytel.org/MYUSERNAME

These are loosely based on the settings described here:
https://support.voiptalk.org/hc/en-us/articles/115006438427-Configuration-of-a-FreePBX-with-a-VoIPtalk-trunk