Setting PRI callerid

Hello all,

We just got our PRI T1 installed and everything seems to be going well. I just have a little problem with callerid and CDR. I’m using a mysql database to store cdr info and with the new PRI I have to manually set the callerid info on outgoing calls or * uses the SIP channel callerid.

So I used callerid() to set the ID info on outbound calls like so:

exten => _NXXXXXX,1,Set(CALLERID(all)="myname" <1231234567>)
exten => _NXXXXXX,n,Dial(ZAP/g1/${EXTEN})

That works great to set the callerid on the outgoing call, but the problem is that * then writes “1231234567” as the src extension in the mysql database instead of the actual extension of the person that dialed the number. Is there a way to change this behaviour so that the cdr is accurate?

I also tried settings the callerid info in zapata.conf with a callerid=“myname” <1231234567> - but * seemed to ignore it and sent the SIP callerid instead.