[asterisk-dev] app_meetme - distinguish between redirect and hangup?
Mark Michelson
mmichelson at digium.com
Tue May 12 16:17:16 CDT 2009
Tony Mountifield wrote:
> In article <4A09B29B.90202 at digium.com>,
> Russell Bryant <russell at digium.com> wrote:
>> Tony Mountifield wrote:
>>> One other thing I've stumbled across while doing this is that I have run
>>> out of flag bits for CONFFLAG_XXXX in my version of MeetMe. What is the
>>> best way to overcome this? I tried changing flags to unsigned long long in
>>> ast_flags, but that has had all sorts of knock-on effects and seems too
>>> invasive.
>>>
>>> I looked in trunk to see if the latest app_meetme had hit and solved this
>>> problem, but it hadn't (although it now uses all 32 bits!)
>> I believe there is a 64-bit version of ast_flags.
>>
>> You could also start using bit fields - "unsigned int myflag:1;".
>>
>> If all else fails, you can follow the chan_sip example of having
>> multiple ast_flag instances in a struct, but that gets quite ugly.
>
> The problem I have found is that none of the above approaches seems to
> be compatible with AST_APP_OPTIONS. chan_sip only uses multiple ast_flag
> instances for internal state flags, not for option parsing.
>
> Cheers
> Tony
You should take a look at app_dial.c in trunk. For AST_APP_OPTIONS, there is a
function called ast_app_parse_options64 should do what you want. app_dial.c also
may provide you with other insights regarding the use of 64-bit options, flags, etc.
Mark Michelson
More information about the asterisk-dev
mailing list