Call Queue CID Prefix not being applied

I am looking for help on this issue, it is very important to our business. The issue is that Queue CID prefixes are not being applied to the Caller ID name. Please see this forum thread:

http://www.freepbx.org/forums/viewtopic.php?p=4961#4961

that’s interesting - so what you found is simply by setting the callerid prefix AFTER the playback call, it then worked? Do you have the same issue with ringgroups by any chance, and the same change fixing them?

I’ll look closer at the code to see if there are any negative implications of making this change (set CID prefix after the playback message - if there is a playback message at all). Did you check what happens if there is not playback message?

Also - if there is not already a ticket on the tracker for this - can you put one up with a brief summary of the issue and this resolution, and a link back to this thread? Doing such will ensure that the issue does not get lost in the forum and we give it attention based on what you have found.

I have sprinkled SetCallerPres(allowed_not_screened) all over the place.
Before the call is answered, after it has been answered, in the dialplan itself, before the answer, etc…No difference. It simply does not explain while, upon entry to Playback the CallerID(name) is correct, and upon exit from the Playback, the CallerID(name) is incorrect.

Could you shed some light on this?

I have solved my issue, however I am unsure of the ramifications for others, particularly those that use an agentannounce as I have not tested those functions.

Fundamentally, I have modified the PHP code to construct the queue dialplans differently. Basically moving the CID prefix changes to after the joinannounce.

the dialplan after my changes moves all of the PREFIX to after the joinannounce:

exten => 99,n,Answer
exten => 99,n,Set(__BLKVM_OVERRIDE=BLKVM/${EXTEN}/${CHANNEL})
exten => 99,n,Set(__BLKVM_BASE=${EXTEN})
exten => 99,n,Set(DB(${BLKVM_OVERRIDE})=TRUE)
exten => 99,n,Set(_DIAL_OPTIONS=${DIAL_OPTIONS}M(auto-blkvm))
exten => 99,n,Set(__NODEST=${EXTEN})
exten => 99,n,Set(MONITOR_FILENAME=/var/spool/asterisk/monitor/q${EXTEN}-${STRFTIME(${EPOCH},%Y%m%d-%H%M%S)}-${UNIQUEID})
exten => 99,n,Playback(custom/LBSMAIN8K)
exten => 99,n,GotoIf($[“foo${RGPREFIX}” = “foo”]?REPCID)
exten => 99,n,GotoIf($["${RGPREFIX}" != “${CALLERID(name):0:${LEN(${RGPREFIX})}}”]?REPCID)
exten => 99,n,Noop(Current RGPREFIX is ${RGPREFIX}…stripping from Caller ID)
exten => 99,n,Set(CALLERID(name)=${CALLERID(name):${LEN(${RGPREFIX})}})
exten => 99,n,Set(_RGPREFIX=)
exten => 99,n(REPCID),Noop(CALLERID(name) is ${CALLERID(name)})
exten => 99,n,Set(_RGPREFIX=Test Queue )
exten => 99,n,Set(CALLERID(name)=${RGPREFIX}${CALLERID(name)})
exten => 99,n,Queue(99|t||)
exten => 99,n,dbDel(${BLKVM_OVERRIDE})
exten => 99,n,Set(__NODEST=)
exten => 99,n,Goto()
exten => 99*,1,Macro(agent-add,99,)
exten => 99**,1,Macro(agent-del,99,99)

The changed function /var/www/html/admin/modules/queues/functions.inc.php
(sorry no diff, I destroyed the original)

function queues_get_config($engine) {
global $ext; // is this the best way to pass this?
switch($engine) {
case “asterisk”:
/* queue extensions */
$ext->addInclude(‘from-internal-additional’,‘ext-queues’);
$qlist = queues_list();
if (is_array($qlist)) {
foreach($qlist as $item) {

                                    $exten = $item[0];
                                    $q = queues_get($exten);

                                    $grppre = (isset($q['prefix'])?$q['prefix']:'');

                                    $ext->add('ext-queues', $exten, '', new ext_macro('user-callerid'));
                                    $ext->add('ext-queues', $exten, '', new ext_answer(''));

                                    // block voicemail until phone is answered at which point a macro should be called on the answering
                                    // line to clear this flag so that subsequent transfers can occur.
                                    //
                                    $ext->add('ext-queues', $exten, '', new ext_setvar('__BLKVM_OVERRIDE', 'BLKVM/${EXTEN}/${CHANNEL}'));
                                    $ext->add('ext-queues', $exten, '', new ext_setvar('__BLKVM_BASE', '${EXTEN}'));
                                    $ext->add('ext-queues', $exten, '', new ext_setvar('DB(${BLKVM_OVERRIDE})', 'TRUE'));
                                    $ext->add('ext-queues', $exten, '', new ext_setvar('_DIAL_OPTIONS', '${DIAL_OPTIONS}M(auto-blkvm)'));

                                    // Inform all the children NOT to send calls to destinations or voicemail
                                    //
                                    $ext->add('ext-queues', $exten, '', new ext_setvar('__NODEST', '${EXTEN}'));
                                    $ext->add('ext-queues', $exten, '', new ext_setvar('MONITOR_FILENAME','/var/spool/asterisk/monitor/q${EXTEN}-${STRFTIME(${EPOCH},,%Y%m%d-%H%M%S)}-${UNIQUEID}'));
                                    $joinannounce = (isset($q['joinannounce'])?$q['joinannounce']:'');
                                    if($joinannounce != "") {
                                            $ext->add('ext-queues', $exten, '', new ext_playback($joinannounce));
                                    }

                                    // deal with group CID prefix
                                    // Use the same variable as ringgroups/followme so that we can manage chaines of calls
                                    // but strip only if you plan on setting a new one
                                    //
                                    if ($grppre != '') {
                                            $ext->add('ext-queues', $exten, '', new ext_gotoif('$["foo${RGPREFIX}" = "foo"]', 'REPCID'));
                                            $ext->add('ext-queues', $exten, '', new ext_gotoif('$["${RGPREFIX}" != "${CALLERID(name):0:${LEN(${RGPREFIX})}}"]', 'REPCID'));
                                            $ext->add('ext-queues', $exten, '', new ext_noop('Current RGPREFIX is ${RGPREFIX}....stripping from Caller ID'));
                                            $ext->add('ext-queues', $exten, '', new ext_setvar('CALLERID(name)', '${CALLERID(name):${LEN(${RGPREFIX})}}'));
                                            $ext->add('ext-queues', $exten, '', new ext_setvar('_RGPREFIX', ''));
                                            $ext->add('ext-queues', $exten, 'REPCID', new ext_noop('CALLERID(name) is ${CALLERID(name)}'));
                                            $ext->add('ext-queues', $exten, '', new ext_setvar('_RGPREFIX', $grppre));
                                            $ext->add('ext-queues', $exten, '', new ext_setvar('CALLERID(name)','${RGPREFIX}${CALLERID(name)}'));
                                    }

                                    $options = 't';
                                    if ($q['rtone'] == 1)
                                            $options .= 'r';
                                    $agentannounce = (isset($q['agentannounce'])?$q['agentannounce']:'');
                                    $ext->add('ext-queues', $exten, '', new ext_queue($exten,$options,'',$agentannounce,$q['maxwait']));

                                    $ext->add('ext-queues', $exten, '', new ext_dbdel('${BLKVM_OVERRIDE}'));
                                    // If we are here, disable the NODEST as we want things to resume as normal
                                    //
                                    $ext->add('ext-queues', $exten, '', new ext_setvar('__NODEST', ''));

                                    // destination field in 'incoming' database is backwards from what ext_goto expects
                                    $goto_context = strtok($q['goto'],',');
                                    $goto_exten = strtok(',');
                                    $goto_pri = strtok(',');

                                    $ext->add('ext-queues', $exten, '', new ext_goto($goto_pri,$goto_exten,$goto_context));

                                    //dynamic agent login/logout
                                    $ext->add('ext-queues', $exten."*", '', new ext_macro('agent-add',$exten.",".$q['password']));
                                    $ext->add('ext-queues', $exten."**", '', new ext_macro('agent-del',$exten.",".$exten));
                            }
                    }
            break;
    }

}

macro-user-callerid will not replace an appropriate callerid. What it does (this is overly simplified) is lookup the callerid to see if there is a FreePBX with that device, and if so, it then replaces the callerid with the appropriate information for the owner of that device (and even then, it depends on other factors.

Your callerid is ‘disappearing’ and the cases where I have seen that, they have required the SetCallerPres(allowed_not_screened). There may also be configuration parameters within your zapata.conf that need to be examined. You may try putting the same SetCallerPres() call directly in the queues dialpan before the CID prefix takes place and see if that changes the behavior. In the one thread I pointed you at, that is what he did - although what I suggested should have worked - a minor difference may be it being set before or after the channel is answered.

I am beginning to think that the “user-callerid” macro is overwriting the CIDNAME with something it is looking up in the DB…

I added a some “dumpvars” in to the dialplan, And I see odd behavior when I enter the playback of the queue message…see below

Am I misguided?

<6034444444> is calling the queue at <6037777777>

-- Accepting call from '6034444444' to '6037777777' on channel 0/1, span 1
-- Executing SetCallerPres("Zap/1-1", "allowed_not_screened") in new stack
-- Executing NoOp("Zap/1-1", "CALLERID="" <6034444444>") in new stack
-- Executing NoOp("Zap/1-1", "CALLERID(name)=") in new stack
-- Executing NoOp("Zap/1-1", "CALLERID(number)=6034444444") in new stack
-- Executing Goto("Zap/1-1", "from-pstn|6037777777|1") in new stack
-- Goto (from-pstn,6037777777,1)
-- Executing Set("Zap/1-1", "__FROM_DID=6037777777") in new stack
-- Executing Gosub("Zap/1-1", "app-blacklist-check|s|1") in new stack
-- Executing LookupBlacklist("Zap/1-1", "") in new stack
-- Executing GotoIf("Zap/1-1", "0?blacklisted") in new stack
-- Executing Return("Zap/1-1", "") in new stack
-- Executing Goto("Zap/1-1", "ext-queues|110|1") in new stack
-- Goto (ext-queues,110,1)
-- Executing Macro("Zap/1-1", "user-callerid|") in new stack
-- Executing NoOp("Zap/1-1", "user-callerid:  6034444444") in new stack
-- Executing Macro("Zap/1-1", "dumpvars") in new stack
-- Executing NoOp("Zap/1-1", "ACCOUNTCODE=") in new stack
-- Executing NoOp("Zap/1-1", "ANSWEREDTIME=") in new stack
-- Executing NoOp("Zap/1-1", "BLINDTRANSFER=") in new stack
-- Executing NoOp("Zap/1-1", "CALLERID="" <6034444444>") in new stack
-- Executing NoOp("Zap/1-1", "CALLERID(name)=") in new stack
-- Executing NoOp("Zap/1-1", "CALLERID(number)=6034444444") in new stack
-- Executing NoOp("Zap/1-1", "CALLINGPRES=0") in new stack
-- Executing NoOp("Zap/1-1", "CHANNEL=Zap/1-1") in new stack
-- Executing NoOp("Zap/1-1", "CONTEXT=macro-dumpvars") in new stack
-- Executing NoOp("Zap/1-1", "DATETIME=19072007-18:55:14") in new stack
-- Executing NoOp("Zap/1-1", "DIALEDPEERNAME=") in new stack
-- Executing NoOp("Zap/1-1", "DIALEDPEERNUMBER=") in new stack
-- Executing NoOp("Zap/1-1", "DIALEDTIME=") in new stack
-- Executing NoOp("Zap/1-1", "DIALSTATUS=") in new stack
-- Executing NoOp("Zap/1-1", "DNID=6037777777") in new stack
-- Executing NoOp("Zap/1-1", "EPOCH=1184885714") in new stack
-- Executing NoOp("Zap/1-1", "EXTEN=s") in new stack
-- Executing NoOp("Zap/1-1", "HANGUPCAUSE=0") in new stack
-- Executing NoOp("Zap/1-1", "INVALID_EXTEN=") in new stack
-- Executing NoOp("Zap/1-1", "LANGUAGE=en") in new stack
-- Executing NoOp("Zap/1-1", "MEETMESECS=") in new stack
-- Executing NoOp("Zap/1-1", "PRIORITY=22") in new stack
-- Executing NoOp("Zap/1-1", "RDNIS=") in new stack
-- Executing NoOp("Zap/1-1", "REALCALLERIDNUM=") in new stack
-- Executing NoOp("Zap/1-1", "SIP_CODEC=") in new stack
-- Executing NoOp("Zap/1-1", "SIPCALLID=") in new stack
-- Executing NoOp("Zap/1-1", "SIPUSERAGENT=") in new stack
-- Executing GotoIf("Zap/1-1", "0?report") in new stack
-- Executing Macro("Zap/1-1", "dumpvars") in new stack
-- Executing NoOp("Zap/1-1", "ACCOUNTCODE=") in new stack
-- Executing NoOp("Zap/1-1", "ANSWEREDTIME=") in new stack
-- Executing NoOp("Zap/1-1", "BLINDTRANSFER=") in new stack
-- Executing NoOp("Zap/1-1", "CALLERID="" <6034444444>") in new stack
-- Executing NoOp("Zap/1-1", "CALLERID(name)=") in new stack
-- Executing NoOp("Zap/1-1", "CALLERID(number)=6034444444") in new stack
-- Executing NoOp("Zap/1-1", "CALLINGPRES=0") in new stack
-- Executing NoOp("Zap/1-1", "CHANNEL=Zap/1-1") in new stack
-- Executing NoOp("Zap/1-1", "CONTEXT=macro-dumpvars") in new stack
-- Executing NoOp("Zap/1-1", "DATETIME=19072007-18:55:14") in new stack
-- Executing NoOp("Zap/1-1", "DIALEDPEERNAME=") in new stack
-- Executing NoOp("Zap/1-1", "DIALEDPEERNUMBER=") in new stack
-- Executing NoOp("Zap/1-1", "DIALEDTIME=") in new stack
-- Executing NoOp("Zap/1-1", "DIALSTATUS=") in new stack
-- Executing NoOp("Zap/1-1", "DNID=6037777777") in new stack
-- Executing NoOp("Zap/1-1", "EPOCH=1184885714") in new stack
-- Executing NoOp("Zap/1-1", "EXTEN=s") in new stack
-- Executing NoOp("Zap/1-1", "HANGUPCAUSE=0") in new stack
-- Executing NoOp("Zap/1-1", "INVALID_EXTEN=") in new stack
-- Executing NoOp("Zap/1-1", "LANGUAGE=en") in new stack
-- Executing NoOp("Zap/1-1", "MEETMESECS=") in new stack
-- Executing NoOp("Zap/1-1", "PRIORITY=22") in new stack
-- Executing NoOp("Zap/1-1", "RDNIS=") in new stack
-- Executing NoOp("Zap/1-1", "REALCALLERIDNUM=") in new stack
-- Executing NoOp("Zap/1-1", "SIP_CODEC=") in new stack
-- Executing NoOp("Zap/1-1", "SIPCALLID=") in new stack
-- Executing NoOp("Zap/1-1", "SIPUSERAGENT=") in new stack
-- Executing GotoIf("Zap/1-1", "0?start") in new stack
-- Executing Macro("Zap/1-1", "dumpvars") in new stack
-- Executing NoOp("Zap/1-1", "ACCOUNTCODE=") in new stack
-- Executing NoOp("Zap/1-1", "ANSWEREDTIME=") in new stack
-- Executing NoOp("Zap/1-1", "BLINDTRANSFER=") in new stack
-- Executing NoOp("Zap/1-1", "CALLERID="" <6034444444>") in new stack
-- Executing NoOp("Zap/1-1", "CALLERID(name)=") in new stack
-- Executing NoOp("Zap/1-1", "CALLERID(number)=6034444444") in new stack
-- Executing NoOp("Zap/1-1", "CALLINGPRES=0") in new stack
-- Executing NoOp("Zap/1-1", "CHANNEL=Zap/1-1") in new stack
-- Executing NoOp("Zap/1-1", "CONTEXT=macro-dumpvars") in new stack
-- Executing NoOp("Zap/1-1", "DATETIME=19072007-18:55:14") in new stack
-- Executing NoOp("Zap/1-1", "DIALEDPEERNAME=") in new stack
-- Executing NoOp("Zap/1-1", "DIALEDPEERNUMBER=") in new stack
-- Executing NoOp("Zap/1-1", "DIALEDTIME=") in new stack
-- Executing NoOp("Zap/1-1", "DIALSTATUS=") in new stack
-- Executing NoOp("Zap/1-1", "DNID=6037777777") in new stack
-- Executing NoOp("Zap/1-1", "EPOCH=1184885714") in new stack
-- Executing NoOp("Zap/1-1", "EXTEN=s") in new stack
-- Executing NoOp("Zap/1-1", "HANGUPCAUSE=0") in new stack
-- Executing NoOp("Zap/1-1", "INVALID_EXTEN=") in new stack
-- Executing NoOp("Zap/1-1", "LANGUAGE=en") in new stack
-- Executing NoOp("Zap/1-1", "MEETMESECS=") in new stack
-- Executing NoOp("Zap/1-1", "PRIORITY=22") in new stack
-- Executing NoOp("Zap/1-1", "RDNIS=") in new stack
-- Executing NoOp("Zap/1-1", "REALCALLERIDNUM=") in new stack
-- Executing NoOp("Zap/1-1", "SIP_CODEC=") in new stack
-- Executing NoOp("Zap/1-1", "SIPCALLID=") in new stack
-- Executing NoOp("Zap/1-1", "SIPUSERAGENT=") in new stack
-- Executing Set("Zap/1-1", "REALCALLERIDNUM=6034444444") in new stack
-- Executing NoOp("Zap/1-1", "REALCALLERIDNUM is 6034444444") in new stack
-- Executing Set("Zap/1-1", "AMPUSER=") in new stack
-- Executing Set("Zap/1-1", "AMPUSERCIDNAME=") in new stack
-- Executing Macro("Zap/1-1", "dumpvars") in new stack
-- Executing NoOp("Zap/1-1", "ACCOUNTCODE=") in new stack
-- Executing NoOp("Zap/1-1", "ANSWEREDTIME=") in new stack
-- Executing NoOp("Zap/1-1", "BLINDTRANSFER=") in new stack
-- Executing NoOp("Zap/1-1", "CALLERID="" <6034444444>") in new stack
-- Executing NoOp("Zap/1-1", "CALLERID(name)=") in new stack
-- Executing NoOp("Zap/1-1", "CALLERID(number)=6034444444") in new stack
-- Executing NoOp("Zap/1-1", "CALLINGPRES=0") in new stack
-- Executing NoOp("Zap/1-1", "CHANNEL=Zap/1-1") in new stack
-- Executing NoOp("Zap/1-1", "CONTEXT=macro-dumpvars") in new stack
-- Executing NoOp("Zap/1-1", "DATETIME=19072007-18:55:14") in new stack
-- Executing NoOp("Zap/1-1", "DIALEDPEERNAME=") in new stack
-- Executing NoOp("Zap/1-1", "DIALEDPEERNUMBER=") in new stack
-- Executing NoOp("Zap/1-1", "DIALEDTIME=") in new stack
-- Executing NoOp("Zap/1-1", "DIALSTATUS=") in new stack
-- Executing NoOp("Zap/1-1", "DNID=6037777777") in new stack
-- Executing NoOp("Zap/1-1", "EPOCH=1184885714") in new stack
-- Executing NoOp("Zap/1-1", "EXTEN=s") in new stack
-- Executing NoOp("Zap/1-1", "HANGUPCAUSE=0") in new stack
-- Executing NoOp("Zap/1-1", "INVALID_EXTEN=") in new stack
-- Executing NoOp("Zap/1-1", "LANGUAGE=en") in new stack
-- Executing NoOp("Zap/1-1", "MEETMESECS=") in new stack
-- Executing NoOp("Zap/1-1", "PRIORITY=22") in new stack
-- Executing NoOp("Zap/1-1", "RDNIS=") in new stack
-- Executing NoOp("Zap/1-1", "REALCALLERIDNUM=6034444444") in new stack
-- Executing NoOp("Zap/1-1", "SIP_CODEC=") in new stack
-- Executing NoOp("Zap/1-1", "SIPCALLID=") in new stack
-- Executing NoOp("Zap/1-1", "SIPUSERAGENT=") in new stack
-- Executing GotoIf("Zap/1-1", "1?report") in new stack
-- Goto (macro-user-callerid,s,16)
-- Executing NoOp("Zap/1-1", "TTL:  ARG1: ") in new stack
-- Executing GotoIf("Zap/1-1", "0?continue") in new stack
-- Executing Set("Zap/1-1", "__TTL=64") in new stack
-- Executing GotoIf("Zap/1-1", "1?continue") in new stack
-- Goto (macro-user-callerid,s,26)
-- Executing NoOp("Zap/1-1", "Using CallerID "" <6034444444>") in new stack
-- Executing Answer("Zap/1-1", "") in new stack
-- Executing Macro("Zap/1-1", "dumpvars") in new stack
-- Executing NoOp("Zap/1-1", "ACCOUNTCODE=") in new stack
-- Executing NoOp("Zap/1-1", "ANSWEREDTIME=") in new stack
-- Executing NoOp("Zap/1-1", "BLINDTRANSFER=") in new stack
-- Executing NoOp("Zap/1-1", "CALLERID="" <6034444444>") in new stack
-- Executing NoOp("Zap/1-1", "CALLERID(name)=") in new stack
-- Executing NoOp("Zap/1-1", "CALLERID(number)=6034444444") in new stack
-- Executing NoOp("Zap/1-1", "CALLINGPRES=0") in new stack
-- Executing NoOp("Zap/1-1", "CHANNEL=Zap/1-1") in new stack
-- Executing NoOp("Zap/1-1", "CONTEXT=macro-dumpvars") in new stack
-- Executing NoOp("Zap/1-1", "DATETIME=19072007-18:55:14") in new stack
-- Executing NoOp("Zap/1-1", "DIALEDPEERNAME=") in new stack
-- Executing NoOp("Zap/1-1", "DIALEDPEERNUMBER=") in new stack
-- Executing NoOp("Zap/1-1", "DIALEDTIME=") in new stack
-- Executing NoOp("Zap/1-1", "DIALSTATUS=") in new stack
-- Executing NoOp("Zap/1-1", "DNID=6037777777") in new stack
-- Executing NoOp("Zap/1-1", "EPOCH=1184885714") in new stack
-- Executing NoOp("Zap/1-1", "EXTEN=s") in new stack
-- Executing NoOp("Zap/1-1", "HANGUPCAUSE=0") in new stack
-- Executing NoOp("Zap/1-1", "INVALID_EXTEN=") in new stack
-- Executing NoOp("Zap/1-1", "LANGUAGE=en") in new stack
-- Executing NoOp("Zap/1-1", "MEETMESECS=") in new stack
-- Executing NoOp("Zap/1-1", "PRIORITY=22") in new stack
-- Executing NoOp("Zap/1-1", "RDNIS=") in new stack
-- Executing NoOp("Zap/1-1", "REALCALLERIDNUM=6034444444") in new stack
-- Executing NoOp("Zap/1-1", "SIP_CODEC=") in new stack
-- Executing NoOp("Zap/1-1", "SIPCALLID=") in new stack
-- Executing NoOp("Zap/1-1", "SIPUSERAGENT=") in new stack
-- Executing Set("Zap/1-1", "__BLKVM_OVERRIDE=BLKVM/110/Zap/1-1") in new stack
-- Executing Set("Zap/1-1", "__BLKVM_BASE=110") in new stack
-- Executing Set("Zap/1-1", "DB(BLKVM/110/Zap/1-1)=TRUE") in new stack
-- Executing Set("Zap/1-1", "_DIAL_OPTIONS=trM(auto-blkvm)") in new stack
-- Executing Set("Zap/1-1", "__NODEST=110") in new stack
-- Executing GotoIf("Zap/1-1", "1?REPCID") in new stack
-- Goto (ext-queues,110,14)
-- Executing NoOp("Zap/1-1", "CALLERID(name) is ") in new stack
-- Executing Set("Zap/1-1", "_RGPREFIX=American Clinical Svcs ") in new stack
-- Executing Set("Zap/1-1", "CALLERID(name)=American Clinical Svcs ") in new stack
-- Executing Set("Zap/1-1", "MONITOR_FILENAME=/var/spool/asterisk/monitor/q110-20070719-225514-1184885714.541") in new stack
-- Executing Macro("Zap/1-1", "dumpvars") in new stack
-- Executing NoOp("Zap/1-1", "ACCOUNTCODE=") in new stack
-- Executing NoOp("Zap/1-1", "ANSWEREDTIME=") in new stack
-- Executing NoOp("Zap/1-1", "BLINDTRANSFER=") in new stack
-- Executing NoOp("Zap/1-1", "CALLERID="American Clinical Svcs " <6034444444>") in new stack
-- Executing NoOp("Zap/1-1", "CALLERID(name)=American Clinical Svcs ") in new stack
-- Executing NoOp("Zap/1-1", "CALLERID(number)=6034444444") in new stack
-- Executing NoOp("Zap/1-1", "CALLINGPRES=0") in new stack
-- Executing NoOp("Zap/1-1", "CHANNEL=Zap/1-1") in new stack
-- Executing NoOp("Zap/1-1", "CONTEXT=macro-dumpvars") in new stack
-- Executing NoOp("Zap/1-1", "DATETIME=19072007-18:55:14") in new stack
-- Executing NoOp("Zap/1-1", "DIALEDPEERNAME=") in new stack
-- Executing NoOp("Zap/1-1", "DIALEDPEERNUMBER=") in new stack
-- Executing NoOp("Zap/1-1", "DIALEDTIME=") in new stack
-- Executing NoOp("Zap/1-1", "DIALSTATUS=") in new stack
-- Executing NoOp("Zap/1-1", "DNID=6037777777") in new stack
-- Executing NoOp("Zap/1-1", "EPOCH=1184885714") in new stack
-- Executing NoOp("Zap/1-1", "EXTEN=s") in new stack
-- Executing NoOp("Zap/1-1", "HANGUPCAUSE=0") in new stack
-- Executing NoOp("Zap/1-1", "INVALID_EXTEN=") in new stack
-- Executing NoOp("Zap/1-1", "LANGUAGE=en") in new stack
-- Executing NoOp("Zap/1-1", "MEETMESECS=") in new stack
-- Executing NoOp("Zap/1-1", "PRIORITY=22") in new stack
-- Executing NoOp("Zap/1-1", "RDNIS=") in new stack
-- Executing NoOp("Zap/1-1", "REALCALLERIDNUM=6034444444") in new stack
-- Executing NoOp("Zap/1-1", "SIP_CODEC=") in new stack
-- Executing NoOp("Zap/1-1", "SIPCALLID=") in new stack
-- Executing NoOp("Zap/1-1", "SIPUSERAGENT=") in new stack
-- Executing Playback("Zap/1-1", "custom/ACSMAIN") in new stack

entering the playback we have a modified (PREFIXED) CIDNAME

-- Playing 'custom/ACSMAIN' (language 'en')

exiting playback we have lost our modification, and gotten most likely a CIDNAME that was looked up and/or modified in macro-user-callerid or ???

-- Executing Macro("Zap/1-1", "dumpvars") in new stack
-- Executing NoOp("Zap/1-1", "ACCOUNTCODE=") in new stack
-- Executing NoOp("Zap/1-1", "ANSWEREDTIME=") in new stack
-- Executing NoOp("Zap/1-1", "BLINDTRANSFER=") in new stack
-- Executing NoOp("Zap/1-1", "CALLERID="CIDNAME-ORIGINAL" <6034444444>") in new stack
-- Executing NoOp("Zap/1-1", "CALLERID(name)=CIDNAME-ORIGINAL") in new stack
-- Executing NoOp("Zap/1-1", "CALLERID(number)=6034444444") in new stack
-- Executing NoOp("Zap/1-1", "CALLINGPRES=0") in new stack
-- Executing NoOp("Zap/1-1", "CHANNEL=Zap/1-1") in new stack
-- Executing NoOp("Zap/1-1", "CONTEXT=macro-dumpvars") in new stack
-- Executing NoOp("Zap/1-1", "DATETIME=19072007-18:55:25") in new stack
-- Executing NoOp("Zap/1-1", "DIALEDPEERNAME=") in new stack
-- Executing NoOp("Zap/1-1", "DIALEDPEERNUMBER=") in new stack
-- Executing NoOp("Zap/1-1", "DIALEDTIME=") in new stack
-- Executing NoOp("Zap/1-1", "DIALSTATUS=") in new stack
-- Executing NoOp("Zap/1-1", "DNID=6037777777") in new stack
-- Executing NoOp("Zap/1-1", "EPOCH=1184885725") in new stack
-- Executing NoOp("Zap/1-1", "EXTEN=s") in new stack
-- Executing NoOp("Zap/1-1", "HANGUPCAUSE=0") in new stack
-- Executing NoOp("Zap/1-1", "INVALID_EXTEN=") in new stack
-- Executing NoOp("Zap/1-1", "LANGUAGE=en") in new stack
-- Executing NoOp("Zap/1-1", "MEETMESECS=") in new stack
-- Executing NoOp("Zap/1-1", "PRIORITY=22") in new stack
-- Executing NoOp("Zap/1-1", "RDNIS=") in new stack
-- Executing NoOp("Zap/1-1", "REALCALLERIDNUM=6034444444") in new stack
-- Executing NoOp("Zap/1-1", "SIP_CODEC=") in new stack
-- Executing NoOp("Zap/1-1", "SIPCALLID=") in new stack
-- Executing NoOp("Zap/1-1", "SIPUSERAGENT=") in new stack
-- Executing Queue("Zap/1-1", "110|t|||150") in new stack
-- Started music on hold, class 'default', on Zap/1-1
-- Called Local/[email protected]/n
-- Executing Macro("Local/[email protected],2", "exten-vm|8241|8241") in new stack
-- Executing Macro("Local/[email protected],2", "user-callerid") in new stack
-- Executing NoOp("Local/[email protected],2", "user-callerid: CIDNAME-ORIGINAL 6034444444") in new stack
-- Executing Macro("Local/[email protected],2", "dumpvars") in new stack
-- Executing NoOp("Local/[email protected],2", "ACCOUNTCODE=") in new stack
-- Executing NoOp("Local/[email protected],2", "ANSWEREDTIME=") in new stack
-- Executing NoOp("Local/[email protected],2", "BLINDTRANSFER=") in new stack
-- Executing NoOp("Local/[email protected],2", "CALLERID="CIDNAME-ORIGINAL" <6034444444>") in new stack
-- Executing NoOp("Local/[email protected],2", "CALLERID(name)=CIDNAME-ORIGINAL") in new stack
-- Executing NoOp("Local/[email protected],2", "CALLERID(number)=6034444444") in new stack
-- Executing NoOp("Local/[email protected],2", "CALLINGPRES=0") in new stack
-- Executing NoOp("Local/[email protected],2", "CHANNEL=Local/[email protected],2") in new stack
-- Executing NoOp("Local/[email protected],2", "CONTEXT=macro-dumpvars") in new stack
-- Executing NoOp("Local/[email protected],2", "DATETIME=19072007-18:55:25") in new stack
-- Executing NoOp("Local/[email protected],2", "DIALEDPEERNAME=") in new stack
-- Executing NoOp("Local/[email protected],2", "DIALEDPEERNUMBER=") in new stack
-- Executing NoOp("Local/[email protected],2", "DIALEDTIME=") in new stack
-- Executing NoOp("Local/[email protected],2", "DIALSTATUS=") in new stack
-- Executing NoOp("Local/[email protected],2", "DNID=") in new stack
-- Executing NoOp("Local/[email protected],2", "EPOCH=1184885725") in new stack
-- Executing NoOp("Local/[email protected],2", "EXTEN=s") in new stack
-- Executing NoOp("Local/[email protected],2", "HANGUPCAUSE=0") in new stack
-- Executing NoOp("Local/[email protected],2", "INVALID_EXTEN=") in new stack
-- Executing NoOp("Local/[email protected],2", "LANGUAGE=en") in new stack
-- Executing NoOp("Local/[email protected],2", "MEETMESECS=") in new stack
-- Executing NoOp("Local/[email protected],2", "PRIORITY=22") in new stack
-- Executing NoOp("Local/[email protected],2", "RDNIS=") in new stack
-- Executing NoOp("Local/[email protected],2", "REALCALLERIDNUM=") in new stack
-- Executing NoOp("Local/[email protected],2", "SIP_CODEC=") in new stack
-- Executing NoOp("Local/[email protected],2", "SIPCALLID=") in new stack
-- Executing NoOp("Local/[email protected],2", "SIPUSERAGENT=") in new stack
-- Executing GotoIf("Local/[email protected],2", "1?report") in new stack
-- Goto (macro-user-callerid,s,16)
-- Executing NoOp("Local/[email protected],2", "TTL: 64 ARG1: 8241") in new stack
-- Executing GotoIf("Local/[email protected],2", "0?continue") in new stack
-- Executing Set("Local/[email protected],2", "__TTL=63") in new stack
-- Executing GotoIf("Local/[email protected],2", "1?continue") in new stack
-- Goto (macro-user-callerid,s,26)
-- Executing NoOp("Local/[email protected],2", "Using CallerID "CIDNAME-ORIGINAL" <6034444444>") in new stack
-- Executing Set("Local/[email protected],2", "FROMCONTEXT=exten-vm") in new stack
-- Executing Set("Local/[email protected],2", "VMBOX=8241") in new stack
-- Executing Set("Local/[email protected],2", "EXTTOCALL=8241") in new stack
-- Executing Set("Local/[email protected],2", "CFUEXT=") in new stack
-- Executing Set("Local/[email protected],2", "CFBEXT=") in new stack
-- Executing Set("Local/[email protected],2", "RT=20") in new stack
-- Executing Macro("Local/[email protected],2", "record-enable|8241|IN") in new stack
-- Executing GotoIf("Local/[email protected],2", "0?2:4") in new stack
-- Goto (macro-record-enable,s,4)
-- Executing DeadAGI("Local/[email protected],2", "recordingcheck|20070719-225525|1184885725.543") in new stack
-- Launched AGI Script /var/lib/asterisk/agi-bin/recordingcheck

recordingcheck|20070719-225525|1184885725.543: Inbound recording not enabled
– AGI Script recordingcheck completed, returning 0
– Executing NoOp(“Local/[email protected],2”, “No recording needed”) in new stack
– Executing Macro(“Local/[email protected],2”, “dial|20|trM(auto-blkvm)|8241”) in new stack
– Executing DeadAGI(“Local/[email protected],2”, “dialparties.agi”) in new stack
– Launched AGI Script /var/lib/asterisk/agi-bin/dialparties.agi
dialparties.agi: Starting New Dialparties.agi
== Parsing ‘/etc/asterisk/manager.conf’: Found
== Manager ‘admin’ logged on from 127.0.0.1
dialparties.agi: priority is 1
dialparties.agi: Caller ID name is ‘CIDNAME-ORIGINAL’ number is '6034444444’
dialparties.agi: Methodology of ring is ‘none’
– dialparties.agi: Added extension 8241 to extension map
– dialparties.agi: Extension 8241 cf is disabled
– dialparties.agi: Extension 8241 do not disturb is disabled
dialparties.agi: Extension 8241 has ExtensionState: 0
– dialparties.agi: Checking CW and CFB status for extension 8241
– dialparties.agi: dbset CALLTRACE/8241 to 6034444444
== Manager ‘admin’ logged off from 127.0.0.1
– AGI Script dialparties.agi completed, returning 0
– Executing Dial(“Local/[email protected],2”, “SIP/8241|20|trM(auto-blkvm)”) in new stack
– Called 8241
– Local/[email protected],1 is ringing
– SIP/8241-0b86 is ringing
– Channel 0/1, span 1 got hangup request
– Stopped music on hold on Zap/1-1
== Spawn extension (macro-dial, s, 10) exited non-zero on ‘Local/[email protected],2’ in macro ‘dial’
== Spawn extension (macro-dial, s, 10) exited non-zero on ‘Local/[email protected],2’ in macro ‘exten-vm’
== Spawn extension (macro-dial, s, 10) exited non-zero on ‘Local/[email protected],2’
– Executing Macro(“Local/[email protected],2”, “hangupcall”) in new stack
– Executing ResetCDR(“Local/[email protected],2”, “w”) in new stack
– Executing NoCDR(“Local/[email protected],2”, “”) in new stack
– Executing GotoIf(“Local/[email protected],2”, “1?skiprg”) in new stack
– Goto (macro-hangupcall,s,6)
– Executing GotoIf(“Local/[email protected],2”, “1?theend”) in new stack
== Spawn extension (ext-queues, 110, 21) exited non-zero on ‘Zap/1-1’
– Goto (macro-hangupcall,s,9)
– Executing Wait(“Local/[email protected],2”, “5”) in new stack
– Hungup ‘Zap/1-1’
– Executing Hangup(“Local/[email protected],2”, “”) in new stack
== Spawn extension (macro-hangupcall, s, 10) exited non-zero on ‘Local/[email protected],2’ in macro ‘hangupcall’
== Spawn extension (macro-hangupcall, s, 10) exited non-zero on 'Local/[email protected],2’
manzetti*CLI>

hmm - in the other cases, setting the callerpresence fixed the issue, are you sure it got executed.

The first trace that I looked at, the CID prefix was being set if you look at what is being executed, so it is not the queue code stripping it off (which it will do if something else set it like a previous ringgroup for example).

take a look at the other thead I pointed you at in case it provides some further clues.

as far as your other issue, it appears you are missing something in your environment if you look at the error beind produced.

PRI line
I made the changes, no difference.
I would like to mention the following…
If the TELCO passes a CIDNAME to me , the prefix does NOT work, If the TELCO passes no CIDNAME, for example if the caller is a cell phone, then the CID Prefix DOES work.

To say it another way, if the inbound CIDNAME is null, the CID Prefix works, if the Inbound CIDNAME is non-null, the CID PRefix never works.

Also, I have upgraded to 2.3 and posted a message elswhere regarding an error during the upgrade.
I apologize for cross posting, however, it may be important.

This is what I get when I upgrade from 2.2.2. to 2.2.3

[email protected] freepbx-2.2.3# ./install_amp
Failed loading /usr/local/Zend/lib/Optimizer-3.0.2/php-4.3.x/ZendOptimizer.so: /usr/local/Zend/lib/Optimizer-3.0.2/php-4.3.x/ZendOptimizer.so: undefined symbol: match
Checking for PEAR DB…OK
Checking for PEAR Console::Getopt…OK
Checking user…OK
Checking for /etc/amportal.conf…OK
Reading /etc/amportal.conf…OK
Checking for /etc/asterisk/asterisk.conf…OK
Reading /etc/asterisk/asterisk.conf…OK
Using asterisk as PBX Engine
Checking for Asterisk 1.2…OK
Checking for selinux…OK
Connecting to database…OK
Checking current version of AMP…2.2.2
Installing new AMP files…OK
Configuring install for your environment…OK
Setting permissions on files…OK
Checking for upgrades…1 found
Upgrading to 2.2.3…
-> Running PHP script /usr/src/freepbx-2.2.3/upgrades/2.2.3/tables.php
Alter tables sip, iax, zap to increase field length… Altered
Creating module_xml table…Not Required
Adding id to module_xml table…Altered
Upgrading to 2.2.3…OK
Generating AMP configs…
Generating Configurations.conf…
Failed loading /usr/local/Zend/lib/Optimizer-3.0.2/php-4.3.x/ZendOptimizer.so: /usr/local/Zend/lib/Optimizer-3.0.2/php-4.3.x/ZendOptimizer.so: undefined symbol: match

Checking for PEAR DB…OK
Checking for PEAR Console::Getopt…OK
Running module install.php and install.sql scripts
Checking for /etc/amportal.conf…OK
Reading /etc/amportal.conf…OK
Reading /etc/asterisk/asterisk.conf…OK
Connecting to database…OK
Connecting to Asterisk manager interface…OK
PHP Notice: Undefined index: rtone in /var/www/html/admin/modules/queues/functions.inc.php on line 78
PHP Notice: Undefined index: rtone in /var/www/html/admin/modules/queues/functions.inc.php on line 78
PHP Notice: Undefined index: rtone in /var/www/html/admin/modules/queues/functions.inc.php on line 78
PHP Notice: Undefined index: rtone in /var/www/html/admin/modules/queues/functions.inc.php on line 78
PHP Notice: Undefined index: rtone in /var/www/html/admin/modules/queues/functions.inc.php on line 78
PHP Notice: Undefined index: rtone in /var/www/html/admin/modules/queues/functions.inc.php on line 78
PHP Notice: Undefined index: rtone in /var/www/html/admin/modules/queues/functions.inc.php on line 78
Please update your modules and reload Asterisk by visiting http://10.100.10.96/admin
Generating AMP configs…OK
Restarting Flash Operator Panel…OK
Please update your modules and reload Asterisk by visiting http://100.100.100.100/admin


  • Note: It’s possible that if you click the red ‘Update Now’ bar BEFORE *
  • updating your modules, your machine will start dropping calls. Ensure *
  • that all modules are up to date BEFORE YOU CLICK THE RED BAR. As long *
  • as this is observed, your machine will be fully functional whilst the *
  • upgrade is in progress. *

[email protected]#

First off - what is the trunk coming in as? is it a pri line or ?

Next, assuming it is a pri and you are normally setting your context to [from-pstn] (or from-trunk which amounts to the same thing) try the following:

in your zapata.conf change the context to:

[code:1]context=from-pri[/code:1]next in extensions_custom.conf create:

[code:1][from-pri]
exten => _.,1,SetCallerPres(allowed_not_screened)
exten => _.,n,Goto(from-pstn,${EXTEN},1)[/code:1]then report back if that fixes it. This is something we’ve seen and need to determine where/when to add this command. You can see one thread here:

http://freepbx.org/forums/viewtopic.php?t=2486&highlight=setcallerpres

A snapshot of the system in question…

Asterisk 1.2.9.1

freePBX Modules Installed

Basic
Core setup 1.2 Enabled
Feature Code Admin setup 1.0.4 Enabled
PHP Info tool 1.0 Enabled
Voicemail setup 1.6.4.1 Enabled

Call Management
Do-Not-Disturb (DND) setup 1.0.1 Enabled

Inbound Call Control
Follow Me setup 2.4.10.2 Enabled
IVR setup 2.5.15 Enabled
Misc Destinations setup 1.3.4 Enabled
Queues setup 2.2.10.2 Enabled
Ring Groups setup 2.2.15.1 Enabled
Time Conditions setup 2.4.1 Enabled

Internal Options & Configuration
Conferences setup 1.2.1 Enabled
Misc Applications setup 0.2 Enabled
Music on Hold setup 1.5 Enabled
Paging and Intercom setup 1.6.3 Enabled
Recordings setup 3.3.4 Enabled

Maintenance
Asterisk Logfiles tool 1.0.1 Enabled

Module
Callback setup 1.1.1 Enabled
PIN Sets setup 1.0.6 Enabled

Provides a Feature Code
Call Forward setup 1.1 Enabled
Call Waiting setup 1.1.1 Enabled
Dictation setup 1.1.1 Enabled
Info Services setup 1.3.3 Enabled

System Admin
Asterisk CLI tool 1.0 Enabled

System Administration
Asterisk API tool 1.2 Enabled
Asterisk Info tool 0.2.0 Enabled
Backup & Restore tool 2.1.1 Enabled

Third Party Addon
Print Extensions tool 1.3.1 Enabled

it should be working, there were some fixes to the queues module not too long ago. If your prefix is not being applied, paste a post from the cli where you have it setup and it is not working.

The queue called “110” as generated by FreePBX in extensions_additional.conf

exten => 110,n,Answer
exten => 110,n,Set(__BLKVM_OVERRIDE=BLKVM/${EXTEN}/${CHANNEL})
exten => 110,n,Set(__BLKVM_BASE=${EXTEN})
exten => 110,n,Set(DB(${BLKVM_OVERRIDE})=TRUE)
exten => 110,n,Set(_DIAL_OPTIONS=${DIAL_OPTIONS}M(auto-blkvm))
exten => 110,n,Set(__NODEST=${EXTEN})
exten => 110,n,GotoIf($[“foo${RGPREFIX}” = “foo”]?REPCID)
exten => 110,n,GotoIf($["${RGPREFIX}" != “${CALLERID(name):0:${LEN(${RGPREFIX})}}”]?REPCID)
exten => 110,n,Noop(Current RGPREFIX is ${RGPREFIX}…stripping from Caller ID)
exten => 110,n,Set(CALLERID(name)=${CALLERID(name):${LEN(${RGPREFIX})}})
exten => 110,n,Set(_RGPREFIX=)
exten => 110,n(REPCID),Noop(CALLERID(name) is ${CALLERID(name)})
exten => 110,n,Set(_RGPREFIX=American Clinical Svcs )
exten => 110,n,Set(CALLERID(name)=${RGPREFIX}${CALLERID(name)})
exten => 110,n,Set(MONITOR_FILENAME=/var/spool/asterisk/monitor/q${EXTEN}-${STRFTIME(${EPOCH},%Y%m%d-%H%M%S)}-${UNIQUEID})
exten => 110,n,Playback(custom/ACSMAIN)
exten => 110,n,Queue(110|t|||150)
exten => 110,n,dbDel(${BLKVM_OVERRIDE})
exten => 110,n,Set(__NODEST=)
exten => 110,n,Goto(ext-local,7199,1)
exten => 110*,1,Macro(agent-add,110,)
exten => 110**,1,Macro(agent-del,110,110)

The Trace…

6031231234 is calling the queue(110) that is routed to 6039999999

-- Accepting call from '6031231234' to '6039999999' on channel 0/1, span 1
-- Executing Set("Zap/1-1", "__FROM_DID=6039999999") in new stack
-- Executing Goto("Zap/1-1", "ext-queues|110|1") in new stack
-- Goto (ext-queues,110,1)
-- Executing Macro("Zap/1-1", "user-callerid|") in new stack
-- Executing NoOp("Zap/1-1", "user-callerid:  6031231234") in new stack
-- Executing GotoIf("Zap/1-1", "0?report") in new stack
-- Executing GotoIf("Zap/1-1", "0?start") in new stack
-- Executing Set("Zap/1-1", "REALCALLERIDNUM=6031231234") in new stack
-- Executing NoOp("Zap/1-1", "REALCALLERIDNUM is 6031231234") in new stack
-- Executing Set("Zap/1-1", "AMPUSER=") in new stack
-- Executing Set("Zap/1-1", "AMPUSERCIDNAME=") in new stack
-- Executing GotoIf("Zap/1-1", "1?report") in new stack
-- Goto (macro-user-callerid,s,11)
-- Executing NoOp("Zap/1-1", "TTL:  ARG1: ") in new stack
-- Executing GotoIf("Zap/1-1", "0?continue") in new stack
-- Executing Set("Zap/1-1", "__TTL=64") in new stack
-- Executing GotoIf("Zap/1-1", "1?continue") in new stack
-- Goto (macro-user-callerid,s,21)
-- Executing NoOp("Zap/1-1", "Using CallerID "" <6031231234>") in new stack
-- Executing Answer("Zap/1-1", "") in new stack
-- Executing Set("Zap/1-1", "__BLKVM_OVERRIDE=BLKVM/110/Zap/1-1") in new stack
-- Executing Set("Zap/1-1", "__BLKVM_BASE=110") in new stack
-- Executing Set("Zap/1-1", "DB(BLKVM/110/Zap/1-1)=TRUE") in new stack
-- Executing Set("Zap/1-1", "_DIAL_OPTIONS=trM(auto-blkvm)") in new stack
-- Executing Set("Zap/1-1", "__NODEST=110") in new stack
-- Executing GotoIf("Zap/1-1", "1?REPCID") in new stack
-- Goto (ext-queues,110,13)
-- Executing NoOp("Zap/1-1", "CALLERID(name) is ") in new stack
-- Executing Set("Zap/1-1", "_RGPREFIX=American Clinical Svcs ") in new stack
-- Executing Set("Zap/1-1", "CALLERID(name)=American Clinical Svcs ") in new stack
-- Executing Set("Zap/1-1", "MONITOR_FILENAME=/var/spool/asterisk/monitor/q110-20070719-065015-1184827815.36509") in new stack
-- Executing Playback("Zap/1-1", "custom/ACSMAIN") in new stack
-- Playing 'custom/ACSMAIN' (language 'en')
-- Executing Queue("Zap/1-1", "110|t|||150") in new stack
-- Started music on hold, class 'default', on Zap/1-1
-- Called Local/[email protected]/n
-- Executing Macro("Local/[email protected],2", "exten-vm|8236|8236") in new stack
-- Executing Macro("Local/[email protected],2", "user-callerid") in new stack
-- Executing NoOp("Local/[email protected],2", "user-callerid: My Real Name 6031231234") in new stack

should be the Prefixed CIDNAME … Wrong from this point forward

-- Executing GotoIf("Local/[email protected],2", "1?report") in new stack
-- Goto (macro-user-callerid,s,11)
-- Executing NoOp("Local/[email protected],2", "TTL: 64 ARG1: 8236") in new stack
-- Executing GotoIf("Local/[email protected],2", "0?continue") in new stack
-- Executing Set("Local/[email protected],2", "__TTL=63") in new stack
-- Executing GotoIf("Local/[email protected],2", "1?continue") in new stack
-- Goto (macro-user-callerid,s,21)
-- Executing NoOp("Local/[email protected],2", "Using CallerID "My Real Name" <6031231234>") in new stack
-- Executing Set("Local/[email protected],2", "FROMCONTEXT=exten-vm") in new stack
-- Executing Set("Local/[email protected],2", "VMBOX=8236") in new stack
-- Executing Set("Local/[email protected],2", "EXTTOCALL=8236") in new stack
-- Executing Set("Local/[email protected],2", "CFUEXT=") in new stack
-- Executing Set("Local/[email protected],2", "CFBEXT=") in new stack
-- Executing Set("Local/[email protected],2", "RT=20") in new stack
-- Executing Macro("Local/[email protected],2", "record-enable|8236|IN") in new stack
-- Executing GotoIf("Local/[email protected]rnal-9166,2", "0?2:4") in new stack
-- Goto (macro-record-enable,s,4)
-- Executing DeadAGI("Local/[email protected],2", "recordingcheck|20070719-065026|1184827826.36511") in new stack
-- Launched AGI Script /var/lib/asterisk/agi-bin/recordingcheck

AGI Tx >> agi_request: recordingcheck
AGI Tx >> agi_channel: Local/[email protected],2
AGI Tx >> agi_language: en
AGI Tx >> agi_type: Local
AGI Tx >> agi_uniqueid: 1184827826.36511
AGI Tx >> agi_callerid: 6031231234
AGI Tx >> agi_calleridname: My Real Name
AGI Tx >> agi_callingpres: 0
AGI Tx >> agi_callingani2: 0
AGI Tx >> agi_callington: 0
AGI Tx >> agi_callingtns: 0
AGI Tx >> agi_dnid: unknown
AGI Tx >> agi_rdnis: unknown
AGI Tx >> agi_context: macro-record-enable
AGI Tx >> agi_extension: s
AGI Tx >> agi_priority: 4
AGI Tx >> agi_enhanced: 0.0
AGI Tx >> agi_accountcode:
AGI Tx >>
AGI Rx << GET VARIABLE ARG2
AGI Tx >> 200 result=1 (IN)
AGI Rx << GET VARIABLE ARG1
AGI Tx >> 200 result=1 (8236)
AGI Rx << DATABASE GET “AMPUSER” "8236/recording"
AGI Tx >> 200 result=1 (out=Adhoc|in=Adhoc)
AGI Rx << VERBOSE “Inbound recording not enabled” 1
recordingcheck|20070719-065026|1184827826.36511: Inbound recording not enabled
AGI Tx >> 200 result=1
AGI Rx << Content-type: text/html
AGI Tx >> 510 Invalid or unknown command
AGI Rx << X-Powered-By: PHP/4.3.9
AGI Tx >> 510 Invalid or unknown command
AGI Rx << LI>
AGI Tx >> 510 Invalid or unknown command
– AGI Script recordingcheck completed, returning 0
– Executing NoOp(“Local/[email protected],2”, “No recording needed”) in new stack
– Executing Macro(“Local/[email protected],2”, “dial|20|trM(auto-blkvm)|8236”) in new stack
– Executing DeadAGI(“Local/[email protected],2”, “dialparties.agi”) in new stack
– Launched AGI Script /var/lib/asterisk/agi-bin/dialparties.agi
AGI Tx >> agi_request: dialparties.agi
AGI Tx >> agi_channel: Local/[email protected],2
AGI Tx >> agi_language: en
AGI Tx >> agi_type: Local
AGI Tx >> agi_uniqueid: 1184827826.36511
AGI Tx >> agi_callerid: 6031231234
AGI Tx >> agi_calleridname: My Real Name
AGI Tx >> agi_callingpres: 0
AGI Tx >> agi_callingani2: 0
AGI Tx >> agi_callington: 0
AGI Tx >> agi_callingtns: 0
AGI Tx >> agi_dnid: unknown
AGI Tx >> agi_rdnis: unknown
AGI Tx >> agi_context: macro-dial
AGI Tx >> agi_extension: s
AGI Tx >> agi_priority: 1
AGI Tx >> agi_enhanced: 0.0
AGI Tx >> agi_accountcode:
AGI Tx >>
AGI Rx << VERBOSE “Starting New Dialparties.agi” 1
dialparties.agi: Starting New Dialparties.agi
AGI Tx >> 200 result=1
== Parsing ‘/etc/asterisk/manager.conf’: Found
== Manager ‘admin’ logged on from 127.0.0.1
AGI Rx << GET VARIABLE priority
AGI Tx >> 200 result=0
AGI Rx << VERBOSE “priority is 1” 1
dialparties.agi: priority is 1
AGI Tx >> 200 result=1
AGI Rx << VERBOSE “Caller ID name is ‘My Real Name’ number is ‘6031231234’” 1
dialparties.agi: Caller ID name is ‘My Real Name’ number is '6031231234’
AGI Tx >> 200 result=1
AGI Rx << SET VARIABLE __KEEPCID "TRUE"
AGI Tx >> 200 result=1
AGI Rx << GET VARIABLE ARG1
AGI Tx >> 200 result=1 (20)
AGI Rx << GET VARIABLE ARG2
AGI Tx >> 200 result=1 (trM(auto-blkvm))
AGI Rx << GET VARIABLE RingGroupMethod
AGI Tx >> 200 result=0
AGI Rx << GET VARIABLE PR_DIALSTATUS
AGI Tx >> 200 result=0
AGI Rx << GET VARIABLE NODEST
AGI Tx >> 200 result=1 (110)
AGI Rx << GET VARIABLE USE_CONFIRMATION
AGI Tx >> 200 result=0
AGI Rx << GET VARIABLE RINGGROUP_INDEX
AGI Tx >> 200 result=0
AGI Rx << VERBOSE “Methodology of ring is ‘none’” 1
dialparties.agi: Methodology of ring is 'none’
AGI Tx >> 200 result=1
AGI Rx << VERBOSE “USE_CONFIRMATION: ‘FALSE’” 4
> dialparties.agi: USE_CONFIRMATION: 'FALSE’
AGI Tx >> 200 result=1
AGI Rx << VERBOSE “RINGGROUP_INDEX: ‘’” 4
> dialparties.agi: RINGGROUP_INDEX: ''
AGI Tx >> 200 result=1
AGI Rx << GET VARIABLE ARG3
AGI Tx >> 200 result=1 (8236)
AGI Rx << VERBOSE “Added extension 8236 to extension map” 3
– dialparties.agi: Added extension 8236 to extension map
AGI Tx >> 200 result=1
AGI Rx << GET VARIABLE ARG4
AGI Tx >> 200 result=0
AGI Rx << DATABASE GET “CF” "8236"
AGI Tx >> 200 result=0
AGI Rx << VERBOSE “Extension 8236 cf is disabled” 3
– dialparties.agi: Extension 8236 cf is disabled
AGI Tx >> 200 result=1
AGI Rx << DATABASE GET “DND” "8236"
AGI Tx >> 200 result=0
AGI Rx << VERBOSE “Extension 8236 do not disturb is disabled” 3
– dialparties.agi: Extension 8236 do not disturb is disabled
AGI Tx >> 200 result=1
AGI Rx << DATABASE GET “CW” "8236"
AGI Tx >> 200 result=0
AGI Rx << DATABASE GET “CFB” "8236"
AGI Tx >> 200 result=0
AGI Rx << DATABASE GET “CFU” "8236"
AGI Tx >> 200 result=0
AGI Rx << VERBOSE “extnum: 8236” 4
> dialparties.agi: extnum: 8236
AGI Tx >> 200 result=1
AGI Rx << VERBOSE “exthascw: 0” 4
> dialparties.agi: exthascw: 0
AGI Tx >> 200 result=1
AGI Rx << VERBOSE “exthascfb: 0” 4
> dialparties.agi: exthascfb: 0
AGI Tx >> 200 result=1
AGI Rx << VERBOSE "extcfb: " 4
> dialparties.agi: extcfb:
AGI Tx >> 200 result=1
AGI Rx << VERBOSE “exthascfu: 0” 4
> dialparties.agi: exthascfu: 0
AGI Tx >> 200 result=1
AGI Rx << VERBOSE "extcfu: " 4
> dialparties.agi: extcfu:
AGI Tx >> 200 result=1
AGI Rx << VERBOSE “ExtensionState: 0” 4
> dialparties.agi: ExtensionState: 0
AGI Tx >> 200 result=1
AGI Rx << VERBOSE “Extension 8236 has ExtensionState: 0” 1
dialparties.agi: Extension 8236 has ExtensionState: 0
AGI Tx >> 200 result=1
AGI Rx << VERBOSE “Checking CW and CFB status for extension 8236” 3
– dialparties.agi: Checking CW and CFB status for extension 8236
AGI Tx >> 200 result=1
AGI Rx << DATABASE GET “AMPUSER” "8236/device"
AGI Tx >> 200 result=1 (8236)
AGI Rx << DATABASE GET “DEVICE” "8236/dial"
AGI Tx >> 200 result=1 (SIP/8236)
AGI Rx << DATABASE PUT “CALLTRACE” “8236” "6031231234"
AGI Tx >> 200 result=1
AGI Rx << VERBOSE “dbset CALLTRACE/8236 to 6031231234” 3
– dialparties.agi: dbset CALLTRACE/8236 to 6031231234
AGI Tx >> 200 result=1
AGI Rx << VERBOSE “NODEST: 110 blkvm enabled macro already in dialopts: trM(auto-blkvm)” 4
> dialparties.agi: NODEST: 110 blkvm enabled macro already in dialopts: trM(auto-blkvm)
AGI Tx >> 200 result=1
AGI Rx << SET VARIABLE ds "SIP/8236|20|trM(auto-blkvm)"
AGI Tx >> 200 result=1
AGI Rx << SET PRIORITY 10
AGI Tx >> 200 result=0
== Manager ‘admin’ logged off from 127.0.0.1
AGI Rx << Content-type: text/html
AGI Tx >> 510 Invalid or unknown command
AGI Rx << X-Powered-By: PHP/4.3.9
AGI Tx >> 510 Invalid or unknown command
AGI Rx << LI>
AGI Tx >> 510 Invalid or unknown command
– AGI Script dialparties.agi completed, returning 0
– Executing Dial(“Local/[email protected],2”, “SIP/8236|20|trM(auto-blkvm)”) in new stack
– Called 8236
– Local/[email protected],1 is ringing
– SIP/8236-e42d is ringing
– Channel 0/1, span 1 got hangup request
– Stopped music on hold on Zap/1-1
== Spawn extension (ext-queues, 110, 19) exited non-zero on ‘Zap/1-1’
== Spawn extension (macro-dial, s, 10) exited non-zero on ‘Local/[email protected],2’ in macro ‘dial’
== Spawn extension (macro-dial, s, 10) exited non-zero on ‘Local/[email protected],2’ in macro ‘exten-vm’
== Spawn extension (macro-dial, s, 10) exited non-zero on ‘Local/[email protected],2’
– Executing Macro(“Local/[email protected],2”, “hangupcall”) in new stack
– Executing ResetCDR(“Local/[email protected],2”, “w”) in new stack
– Hungup ‘Zap/1-1’
– Executing NoCDR(“Local/[email protected],2”, “”) in new stack
– Executing GotoIf(“Local/[email protected],2”, “1?skiprg”) in new stack
– Goto (macro-hangupcall,s,6)
– Executing GotoIf(“Local/[email protected],2”, “1?theend”) in new stack
– Goto (macro-hangupcall,s,9)
– Executing Wait(“Local/[email protected],2”, “5”) in new stack
– Executing Hangup(“Local/[email protected],2”, “”) in new stack
== Spawn extension (macro-hangupcall, s, 10) exited non-zero on ‘Local/[email protected],2’ in macro ‘hangupcall’
== Spawn extension (macro-hangupcall, s, 10) exited non-zero on 'Local/[email protected],2’
manzetti*CLI>

Has anyone gotten this to work? I’ve spent too long trying to figure out what’s going on. After an upgrade to 2.2.2 CID Prefix is no longer working for queues.