[asterisk-dev] [Code Review] directmediapermit/directmediadeny support to restrict which peers can do directmedia based on ip address

Terry Wilson twilson at digium.com
Wed Apr 21 13:29:01 CDT 2010


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


Looks good. I was going over it one last time before I committed it and came up with a suggestion and a question. If you don't have time to make the changes, I can make them. I just wanted to check that you didn't really mean &global_jbconf for some reason.


/trunk/channels/chan_sip.c
<https://reviewboard.asterisk.org/r/467/#comment4068>

    This block of code is repeated almost verbatim 4 times. I think it would be better to have a utility function that just took a pointer to p and then returned the result of the ast_apply_ha() call which would let you set your res variables as needed.



/trunk/channels/chan_sip.c
<https://reviewboard.asterisk.org/r/467/#comment4067>

    Should this be:
    
    else if (ast_test_flag(&p->flags[0], SIP_DIRECT_MEDIA_NAT)) instead of &global_jbconf? It looks like the original test which was split out was against &p->flags[0].


- Terry


On 2010-01-28 11:42:04, raarts wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/467/
> -----------------------------------------------------------
> 
> (Updated 2010-01-28 11:42:04)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Summary
> -------
> 
> In some networks not all phones are fully routed, i.e. not all phones can ping each other. This patch adds a way to restrict directmedia for certain peers between certain networks. Only implemented for the SIP channel.
> 
> See https://issues.asterisk.org/view.php?id=16645
> 
> 
> This addresses bug 16645.
>     https://issues.asterisk.org/view.php?id=16645
> 
> 
> Diffs
> -----
> 
>   /trunk/channels/chan_sip.c 241101 
>   /trunk/configs/sip.conf.sample 241101 
>   /trunk/main/acl.c 241101 
> 
> Diff: https://reviewboard.asterisk.org/r/467/diff
> 
> 
> Testing
> -------
> 
> I tested this in our lab where phones where located on separate VLAN's. The phones that were on the same VLAN talked directly to eachother, and phones that weren't didn't. 
> 
> 
> Thanks,
> 
> raarts
> 
>




More information about the asterisk-dev mailing list