Hi,
Today I needed to format a number to contain 2 decimal places, it’s a bit weird way to do it but here is how I did it, if anyone else knows a better way please tell!
number format ‘,.99′: #numberformat(num,’,.99′)#
I ran into a few problems while trying to compile the app_conference addon for Asterisk both this week and last week.
conflicting types for ‘strtoq’ from stdlib.h and concat.h
error: ‘AST_MODULE’ undeclared here (not in a function)
The error was confusing and I found it difficult to find any solution to my problem. Everywhere just indicated that you didn’t need to do anything to get the source to compile. I got the Asterisk source apt-get install apt-get install asterisk-dev and modified the Makefile in the app_conference directory to point at the asterisk includes (/usr/src/asterisk/include for me). When I attempted to make the application but got the errors above.
The solution I sort of stumbled onto inadvertently actually. I tried to place the code in the asterisk-src/apps directory in the hope it would pickup the includes properly, not sure why I was doing it actually. Anyway when I tried to re-compile the asterisk source(which automatically compiles the app directory) I saw that I was getting an error in the build. After a quick google I found that this was because libncurses5-dev wasn’t installed. I also installed pkg-config and libtool but I’ve a feeling that it was libncurses that fixed my problem. Anyway after this I compile it ok with now errors, copied the app_conference.so into the /usr/lib/asterisk/modules.so directory restarted asterisk and bingo it worked. Only pity is that it is literally a conference application it does nothing else really, no voice prompts or admin sort of features like allowing a user to kick other users but I hope to either add those or come up with a work-around for this.
Xlite is available for Mac OS Leopard now http://www.counterpath.com/, it wasn’t previously. I was using Zoiper but it is nowhere near as good as XLite in my opinion so I’m happy with that.