Zonedata.c "Error with new country entry"

Hello everyone.

I’ve been having problems with my TDM400P. It cannot not make or receive calls via the PSTN line. I finally talked to digium support and their opinion was; [quote]“From the looks of things, it looks like your zone data is set incorrectly”[/quote]
However, that is beyond their scope of support to assist. So, here they are and an explanation of how we got here.
The tones below are from ITU’s PSTN specification (2003)

[quote]Kenya (Republic of)
Busy tone - 425 0.2 on 0.6 off 0.2 on 0.6 off
Congestion tone - 425 0.2 on 0.6 off
Dial tone - 425 continuous
Pay tone - I 941 0.2 on 0.2 off
Pay tone - II 800/1600 0.08 on 0.08 off
Payphone recognition tone - 1633 0.08 on 1.5 off
Ringing tone - 425 0.67 on 3.0 off 1.5 on 5.0 off
Special information tone - 900/1400/1800 3x0.75 on 1.25 off
Warning tone - operator intervening 425 0.2 on 0.2 off
Call waiting tone - 425 continuous

So, I changed my /usr/src/modules/zaptel/zonedata.c and included a “ke” zone. I keyed in the tones from the ITU(2003). Honestly speaking, I did some “educated” guess work so am sure I must have got the placement wrong or included an extra field. I then changed zaptel.conf’s loadzone to "ke"
Finally I ran ztcfg -vv. With that, I get; [quote]"Unable to Register Tone Zone ‘ke’.[/quote]

Here is what I added to the zonedata.c:

{ 26, "ke", "Kenya", { 1000, 5000 }, { { ZT_TONE_DIALTONE, "425" }, { ZT_TONE_BUSY, "425/500,0/500" }, { ZT_TONE_RINGTONE, "425/1000,0/5000" }, { ZT_TONE_CONGESTION, "425/200,0/200" }, { ZT_TONE_CALLWAIT, "425/200,425/200,425/200,0/5000" }, /* DIALRECALL - not specified */ { ZT_TONE_DIALRECALL, "425/1000,0/200" }, /* RECORDTONE - not specified */ { ZT_TONE_RECORDTONE, "1400/500,0/15000" }, { ZT_TONE_INFO, "900/330,1400/330,1800/330,0/1000" }, /* STUTTER not specified */ { ZT_TONE_STUTTER, "!425/100,!0/100,!425/100,!0/100,!425/100,!0/100,!425/100,!0/100,!425/100,!0/100,!425/100,!0/100,425" }, }, },

My setup is::
Asterisk 1.2.23
Zaptel 1.2.19
Libpri 1.2.5
Ubuntu 6.06

Asterisk is configured and working well. I can make sip<->iax and sip/iax<->FXS calls. However, PSTN calls are “dead/ghostish”

               [b]Incoming call from PSTN[/b]

Starting simple switch on 'Zap/2-1’
Executing Wait(“Zap/2-1”, “”) in new stack
Executing Dial(“Zap/2-1”, “iax2/502”) in new stack
Called 502
Call accepted by (format gsm)
Format for call is gsm
IAX2/502-1 is ringing
IAX2/502-1 answered Zap/2-1
Hungup ‘IAX2/502-1’
== Spawn extension (incoming, s, 2) exited non-zero on ‘Zap/2-1’
– Hungup ‘Zap/2-1’[/quote]

-I call the PSTN using my mobile phone. The PSTN is picked up by zap/2
-It dials IAX extension.
-I pick up the IAX extension.
-On IdeFisk, I can see call progress i.e. In terms of time. However, the phone I called with -my mobile phone-, is still ringing. To the mobile phone, the call has not been answered.
-I hang up my mobile phone -Nothing happens on Asterisk. According to Idefisk, the call is still in progress!
-Finally, I hang up Idefisk and thus (Hungup ‘IAX2/502-1’)

  [b]Call from FXS to the outside using zap/2-PSTN[/b]

Starting simple switch on 'Zap/1-1’
Executing Dial(“Zap/1-1”, “zap/2”) in new stack
Called 2
Zap/2-1 answered Zap/1-1
Attempting native bridge of Zap/1-1 and Zap/2-1
Hungup ‘Zap/2-1’
== Spawn extension (outbound, 0726203030, 1) exited non-zero on 'Zap/1-1’
Hungup ‘Zap/1-1’[/quote]

-I pick up FXS extension
-I dial my mobile phone
-CLI shows zap1 is connected to zap2. However, I only hear silence. No ringing. The target number -my mobile phone- does not ring :cry:

Call From SIP extension to outside using PSTN

Executing Dial(“SIP/501-081a0008”, “zap/2”) in new stack
Called 2
Zap/2-1 answered SIP/501-081a0008
Hungup ‘Zap/2-1’
== Spawn extension (VAS, 0726203030, 1) exited non-zero on ‘SIP/501-081a0008’[/quote]

-I dial my mobile phone from a SIP extension
-CLI shows zap2-1 answered. However, I only hear silence. No ringing. The target number –the mobile phone- does not ring. :cry:

Please assist in coming up with the correct syntax of the zonedata.c using the given ITU Tone Specifications. If there are newer specificiations out there that I don’t even know, hey, please inform me.
If you think its not even a tone issue, please let me know.

Thank you.

Anyone to try this?

When I change the zonedata.c, is there any other file that I should change?