On Sat, Jun 14, 2008 at 8:46 PM, Venefax <[EMAIL PROTECTED]> wrote:
> Believe it or not, I cannot find online a single piece of documentation for
> the Asterisk function SPRINTF. This example does not work, for it changes
> the caller id.
> Set(CALLERID(num)=${SPRINTF(%010lld,0${CALLERID(num)})}),
> For instance, if the incoming caller id is 17864335989, I get 0684466805 out
> of that function, which is not intended one. To be precise, of the caller
> has less than 10 chars, I want to complete it with a string of '0's. If the
> caller id is nothing, or empty, I want to replace it with 10 zeroes. I guess
> I can figure it out if a link to the documentation of SPRINTF is provided.

Well, 10 chars or 4294967296 to be precise is the limit of integer, so
on 32 bit platform this won't work. Just do the string processing :)

Btw - some kind of str_pad function in dialplan would be nice ;)

Regards,
Atis


-- 
Atis Lezdins,
VoIP Project Manager / Developer,
[EMAIL PROTECTED]
Skype: atis.lezdins
Cell Phone: +371 28806004
Cell Phone: +1 800 7300689
Work phone: +1 800 7502835

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

Reply via email to