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

2009-06-17 Thread Jaap Winius
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


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

2009-06-17 Thread Danny Nicholas
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-boun...@lists.digium.com
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Jaap Winius
Sent: Wednesday, June 17, 2009 8:03 AM
To: asterisk-users@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


___
-- 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