Issue with extension callerid

SIP and DAHDI extensions show callerid of device<101> when calling extension to extension.

What is the purpose of the following line of code in /var/www/html/admin/modules/core/functions.inc.php:
line 3015
$zapfields[] = array($account,‘callerid’,($_REQUEST[‘description’])?$_REQUEST[‘description’]." <".$account.’>’:‘device’." <".$account.’>’);

and

line 2851
$sipfields[] = array($account,‘callerid’,(isset($_REQUEST[‘description’]) && $_REQUEST[‘description’])?$_REQUEST[‘description’]." <".$account.’>’:‘device’." <".$account.’>’);

These two lines of code sets callerid=device in table sip and zap. The description field is actually the name of the user fixed to the device. Why would you set the callerid to “device”?

ronw

if you are getting device as your callerid then something is corrupt on your system. The callerid fields displayed on the system to not come from there, they come from the AMPUSER object. The device specific settings (sip, iax, zap, etc.) are used to lookup the DEVICE object which points to the AMPUSER object. See macro-user-callerid.

Thanks for the reply, Philippe. After performing more tests, I have narrowed the issue down to extension calls to Nortel phones using UNISTIM. Asterisk 1.6 supports UNISTIM out of the box. In Asterisk 1.4, the FreePBX code is utilized to call custom UNISTIM extensions. In Asterisk 1.6, the Asterisk Dial command is invoked and the FreePBX macro code is bypassed, so macro-user-callerid is never used.

ronw