Mailing List Message #100882
From: Nicolas Hatier <>
Subject: Re: PBX script / ReadInput
Date: Tue, 19 Oct 2010 11:28:38 -0400
To: CommuniGate Pro Discussions <>

The issue happens with X-Lite 4 and another softphone called ExpressTalk. I played with the X-Lite options without results.
There is a few reports of DTMF issues with X-Lite 3 online, with related workarounds, but not much about X-Lite 4.

Then I found another free softphone called 3CXPhone and this one works perfectly.

Thanks for your help.
Nicolas Hatier

On 2010-10-19 11:11, Technical Support wrote:

On 2010-10-17 19:45, Nicolas Hatier wrote:
  Thanks for your answer.

My code looks like yours, and the stock auto-attendant script too.

On CGP side, the Media settings (including DTMF) weren't changed, still
the factory defaults - Threshold 60, Minimal 80ms, S/N Ratio 6,
Harmonics 4, Signal 15.

These are used for inband (true audio) DTMF. Normally SIP clients use rfc2833 - then DTMF codes are just read from the RTP stream.

On the Softphone side the settings are default too, the software sends
both in-band and RFC2833 DTMF signals. I think X-Lite / eyeBeam / Bria
are very common softphone apps, and the fact that a completely different
one (expressTalk) was giving the same behavior makes me think the issue
is on CGP side or somewhere between...

If CGPro does not react on DTMF that means it does not see them. The most common issue is that the caller claims rfc2833 in the incoming INVITE's SDP payload (usually seen as the telephone-event codec, with its usual but not fixed number 101), but then sends all DTMF in-band. This can be analyzed with CGPro MEDIA logs or tcp dumps.

You can force CGPro to look inside RTP media for DTMF tones (eve though caller claims the usage of much less CPU intensive rfc2833) by inserting this call to the beginning of the script:


If this helps, then teh caller sends DTMF inband.

Also, if there's some active network equipment between CGPro and softphones, that might have modified SDP to include rfc2833 codec, though the DTMF is still sent  inband.


On 2010-10-17 03:58, Karl wrote:
Hi Nicolas,

We use this extensively with 5.3.9 and I can’t see why there would be
an issue at the CGP end of things.  Lots of my code uses things like this:

    // command input
    command = readInput(10);
    exitif not IsString(command) or else command == "#";

Have you checked your various DTMF settings?  If you are using in-band
DTMF this sometimes does not work and you may get better results with
DTMF according to RFC 2833 or using SIP Info.  Try a few different
settings and see if this is the issue.


On 2010-10-17, at 10:26 AM, Nicolas Hatier wrote:


While trying to test a PBX script, I'm facing a strange issue:
ReadInput always returns null.

I'm connected with a softphone (X-Lite, but I tried another with the
same result) to a local dev CGP 5.3.9 server (on the same machine).

Even using the stock auto-attendant scripts, if I enter on the
softphone a valid extension when the script asks me to, all I get is
a ~10 seconds wait then a "goodbye" and hang up.

Any idea what is going on? I didn't touch PBX scripting since more
than a year, and at that time ReadInput was returning me nice digits,
so now I'm a little lost...

Nicolas Hatier


*Nicolas Hatier, ing.* <
Niversoft idées logicielles -


*Nicolas Hatier, ing.* <
Niversoft idées logicielles -


Nicolas Hatier, ing. <>
Niversoft idées logicielles -

Subscribe (FEED) Subscribe (DIGEST) Subscribe (INDEX) Unsubscribe Mail to Listmaster