[asterisk-dev] [Code Review] Add TestEvents for callID changes on channels.

Mark Michelson reviewboard at asterisk.org
Wed Jul 18 13:52:43 CDT 2012


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/2054/#review6716
-----------------------------------------------------------



/trunk/main/channel_internal_api.c
<https://reviewboard.asterisk.org/r/2054/#comment12753>

    If you take my suggestion below, you won't have to include manager.h, but you will have to include test.h



/trunk/main/channel_internal_api.c
<https://reviewboard.asterisk.org/r/2054/#comment12752>

    Rather than raising your test event this way, you should make use of the ast_test_suite_event_notify() function.
    
    ast_test_suite_event_notify("CallIDChange",
        "Type: CallIDChange\r\n"
        "Channel: %s\r\n"
        "CallID: %s\r\n"
        "PriorCallID: %s",
        ast_channel_name(chan),
        call_identifier_to,
        call_identifier_from);
    
    The only real difference here is that the "Type" field you currently have will be called "State" instead. Alternately, you could put in something random to be the state and keep the "Type" field you currently have. This way, you don't need the #ifdef checks since ast_test_suite_event_notify() will not do anything if TEST_FRAMEWORK is not defined.


- Mark


On July 18, 2012, 1:32 p.m., jrose wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/2054/
> -----------------------------------------------------------
> 
> (Updated July 18, 2012, 1:32 p.m.)
> 
> 
> Review request for Asterisk Developers and Matt Jordan.
> 
> 
> Summary
> -------
> 
> Adds the issuing of a test event when a call ID is set on a channel and TEST_FRAMEWORK is enabled which will include the following information:
> Channel name
> Call ID previous to the change
> Call ID the channel was set to
> 
> There might not have been a callID set prior to the change, in which case the value for priorCallID will simply be an empty string.
> 
> 
> Diffs
> -----
> 
>   /trunk/main/channel_internal_api.c 370202 
> 
> Diff: https://reviewboard.asterisk.org/r/2054/diff
> 
> 
> Testing
> -------
> 
> Tested some call ID changes to see how they were behaving. The events seem like what was expected.
> 
> I'm also working on some testsuite tests that use this event.
> 
> 
> Thanks,
> 
> jrose
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20120718/05a31400/attachment.htm>


More information about the asterisk-dev mailing list