[asterisk-users] Debug: how to print a variable?

Danny Nicholas danny at debsinc.com
Wed Jun 17 08:12:02 CDT 2009


This is what I do
Exten => s,1,Verbose(var is <${var}>)

The <> is to tell me that the variable is empty or to let me determine the
length.

-----Original Message-----
From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Jaap Winius
Sent: Wednesday, June 17, 2009 8:03 AM
To: asterisk-users at lists.digium.com
Subject: [asterisk-users] Debug: how to print a variable?

Hi all,

Is it possible to display or print variables in Asterisk (e.g. in the  
CLI) for debugging purposes?

For example, I'm using two different types of SIP phones: the Snom M3  
and the Siemens S675IP. However, when anonymous callers submit a  
number to the PrivacyManager, only the Siemens displays the new CID  
correctly; the Snom shows "unknown" (even though the new CID looks  
okay in the database). That's as opposed to when the CID is visible to  
begin with, in which case both phones display the CID correctly.

For this reason it seems to me that there is a difference between a  
normal CID and the one generated by the PrivacyManager. If I knew what  
that difference was, perhaps I could correct it with some more  
scripting, but I don't know of any way to display such variables. In  
this case I believe the relevant variable to display is  
"${CALLERID(num)}".

Can anyone help?

Thanks,

Jaap

_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users




More information about the asterisk-users mailing list