[asterisk-dev] a few newbie questions about asterisk and voicemail code

Caio Begotti caio at ueberalles.net
Sat Sep 8 11:57:23 CDT 2007


On 08/09/2007, at 10:59, Russell Bryant wrote:
> ast_test_flag() will give you the current value of the flag for an  
> object.  If
> set, it will return the flag, if not, it will return 0.

Ahh, I got it now.

> I don't quite understand this question.  Could you provide the  
> output that is
> not correct, and the completion function that is generating the  
> incorrect results?

Sorry, it's all in handle_voicemail_show_users from app_voicemail.c.  
I'm using it as a starting guide, there's no extra code yet. For  
example, when you do:

*CLI> voicemail show users for<TAB>
default  other  people  foo

Is there a way to only output "other  people  foo" and never  
"default"? It's not a big problem to try to manually remove it in the  
code, but perhaps already exist something usable for this?

> If your question is if you can print a string *or* an integer in  
> the same format
> string, then no, you can't do that unless you convert one to the  
> type of the other.

Yeah, that's what I asked. I'll declare a new output format then, for  
digits only.

Thank you, Russell!

--
Caio Begotti (caio1982)
http://caio.ueberalles.net





More information about the asterisk-dev mailing list