Converting a former NPSTN Dialplan to TandmX Guide:
To convert a former NPSTN switch to TandmX, first begin by making a backup of your dial plan. You can do this simply by just copying your dialplan file to a different file extension. Example:
cp extensions.conf extensions.conf.OLD
Next, begin by removing the old NPSTN contexts from your NPSTN dialplan that is related to call routing. Examples include the "dt" subroutine, "from-npstn", "dt-route", etc. Simply copy the three main contexts into your dialplan from the TandmX boiler plate code. You will need these three contexts for your switch to place outbound calls, "dt", "find-route", and "from-internal". Proceed to paste these contexts into your switch.
Then, find your global variables. The context should say
. You will need to add your TandmX Authentication Key and Host ID to the global variables to verify calls. Examples:
These codes tell the routing system how to authenticate, verify, and route your call. Each switch owner has a user account. That account is defined by there authentication key. However, one user account may own more than one host, requiring the need for a Host ID to deferintiate between multiple hosts owned by the same user.
Now, let's move to "iax.conf". Here we will need to add our inbound user, generate a secret, and place calls! Simple, right?
Create an IAX2 context of type user, or copy the boilerplate code's "iax.conf" "from-tandmx" context and settings.
Example IAX2 User:
In the above sample code, you may want to change your username. Just change the context name from "from-tandmx" to whatever you would like. Generate your own secret, you may use an online character generator. Stray away from fancy characters, as they might mess with URL encoding of the address. Accepted characters are a-z, A-Z, 0-9.
Once you have added the above code, your switch should be able to place and receive calls on TandmX!