skip to content

Configuring FXO tones (Argentina/Any)

/ 2 min read

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”.

Terminal window
# Example | Disconect Tone from Argentina
frequency = 425
cadence = 0.3 on 0.2 off

Depending on your gateway, the syntax may vary:

Terminal window
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:

ToneGrandstream Syntax
Dialf1=425@-15
Disconnectionf1=425@-15,f2=0@-15,c=200/200-200/200-200/600
Ringbackf1=425@-15,c=1000/4000
Busyf1=425@-15,c=300/200
Call Waitingf1=425@-15,c=300/10000
Reorderf1=425@-15,c=300/400

Ring cadence:

Terminal window
c=2000/4000;

Disconnect:

  • Tone
  • No current
  • 200ms