Introduction
Recently, I found myself tasked with configuring two aging Grandstream FXO Gateways. I hadn’t worked with FXO (POTS to VoIP) gateways before.
The specific device I was dealing with was a Grandstream HT503
. Although I was able to dig up some outdated guides on configuration, I soon realized they were based on ChanSIP, which had long been deprecated in FreePBX.
Tones and disconnect
Depending on your country and how the pots network works, the disconnect should be done based on tones or on using current disconnect. In my case in Argentina, its done using a “Disconnect tone”.
# Example | Disconect Tone from Argentinafrequency = 425cadence = 0.3 on 0.2 off
Depending on your gateway, the syntax may vary:
f1=425@-20, f2=0@0, c=100/100-0/0-0/0;
Getting the tones for your country
Depending on where you live, there will be more (or less) resources regarding analog lines. There are two resources that helped me finding the tones that I wanted:
You should try to add every tone to the gateway so it can understand whats happening on the other side. If you cant find every one of them, you should at least have the following tones:
Busy tone
Dial tone
Ringing tone
Waiting tone
Converting the tones
Now you have the tones, but you probabbly need to convert it to the syntax that your gateway/provider supports. You could convert every tone, but depending on the syntax it may be difficult. But there is a far easier way: AIs.
You should copy all of your codes in a list and then ask it to convert them to the syntax that you want. Give it some context about what you want to do, and use the template from your gateway, as its not going to know how to convert it.
GrandstreamSyntax: f1=freq@vol[,f2=freq@vol[,c=on1/off1[-on2/off2[-on3/off3]]]]
Argentina Tones (Grandstream syntax)
Tones:
Tone | Grandstream Syntax |
---|---|
Dial | f1=425@-15 |
Disconnection | f1=425@-15,f2=0@-15,c=200/200-200/200-200/600 |
Ringback | f1=425@-15,c=1000/4000 |
Busy | f1=425@-15,c=300/200 |
Call Waiting | f1=425@-15,c=300/10000 |
Reorder | f1=425@-15,c=300/400 |
Ring cadence:
c=2000/4000;
Disconnect:
- Tone
- No current
- 200ms