No prefix in ringgroups after upgrading asterisk

Hi,

after upgrading asterisk last weekend from 1.2.10 to 1.2.19 (bristuffed), I do not get the prefix anymore, when a caller has no CID. After passing the ringgroups, the calls are droped to queues (my client wants a ringtone before the music starts to play), where the Prefixes set there, are shown fine. I Upgraded FreePBX as well without success.

I have found an old ticket in the bug-list, that was closed due to not beeing reproducable. Has anybody an idea how to fix that? I dont want to go back to 1.2.10 (for security reasons).

Plz help!

regards Carsten

check to make sure you modules are all up to date. Queues were changed wrt to the prefixes a couple weeks ago to fix another break. But just a couple days ago, I fixed a bug in queues, ringgroups and followme that would result in a queue stripping a prefix that a ringgroup had set. It should only do that if it was going to put its own prefix on but it was always doing that. It sounds lik that may be what you are running into.

Well, I am up to date with FreePBX (did the update to 2.2.2 including downloading most recent modules this morning). My problem is the other way around. The ringgroups, which comes first, dont have the prefix, the queues afterwards do (from their own settings). At the moment I’m lurkig around the generated extentions*.conf to trace the fault, without success…

The CALLERID(name) is set in asterisk. I can grep it in a noop(), but it does not send it through sip.

In another Forum someone suggested, that a “SetCallerPres(allowed_not_screened)” is missing in the zap-trunk “before any CALLERID can be changed”.

Do you need some more information?

Ok, this suggestion did work!!!

Here the code-snipped in modules/ringtones/functions.inc.php:

[code:1]
// deal with group CID prefix
// but strip only if you plan on setting a new one
if ($grppre != ‘’) {
$ext->add($contextname, $grpnum, ‘’, new ext_gotoif(’$[“foo${RGPREFIX}” = “foo”]’, ‘REPCID’));
$ext->add($contextname, $grpnum, ‘’, new ext_gotoif(’$["${RGPREFIX}" != “${CALLERID(name):0:${LEN(${RGPREFIX})}}”]’, ‘REPCID’));
$ext->add($contextname, $grpnum, ‘’, new ext_noop(‘Current RGPREFIX is ${RGPREFIX}…stripping from Caller ID’));
$ext->add($contextname, $grpnum, ‘’, new ext_setvar(‘CALLERID(name)’, ‘${CALLERID(name):${LEN(${RGPREFIX})}}’));
$ext->add($contextname, $grpnum, ‘’, new ext_setvar(’_RGPREFIX’, ‘’));
$ext->add($contextname, $grpnum, ‘REPCID’, new ext_noop(‘CALLERID(name) is ${CALLERID(name)}’));
$ext->add($contextname, $grpnum, ‘’, new ext_setvar(’_RGPREFIX’, $grppre));

    $ext->add($contextname, $grpnum, '', new extension('SetCallerPres(allowed_not_screened)'));

    $ext->add($contextname, $grpnum, '', new ext_setvar('CALLERID(name)','${RGPREFIX}${CALLERID(name)}'));

}
[/code:1]

I did not create a new class for this because the behavior of extention was sufficient

Bugreport needed?

if you need SetCallerPres it should not be in the ringgroup, it sounds like it is needed in the context where the call comes in. Can you try putting it there (from-pstn or from-zaptel depending on your configuration), and then see if that fixes it? If so, we can see if it should be put there or not (I need to look into other implications it might have).

thanks,

Thanx again, but your suggestion did not work for me. I did put a

[code:1]
[from-pstn-custom]
exten => s,1,SetCallerPres(allowedallowed_not_screened)
[/code:1]

into extensions_custom.conf, which gets included in [from-pstn], without effect. For now I leave my changes in the ringgroups, because it works for me atm.

Regards Carsten