[Asterisk-Dev] Patch for H.323 behind NAT

Adam Hart work at adamhart.net
Thu Sep 11 19:08:58 MST 2003


I've made a patch so you can call asterisk boxes from behind NAT using H.323. It uses the same logic as SIP, to use it just put nat=1 in h323.conf under the user's profile. The only issue is with MS's internet sharing which tries to proxy any connections on port 1720. I suggest you change port if you have this issue.

I'm not sure of the procedure for submitting this.. here's the diff

diff -r1.3 chan_h323.c
234a235,236
>                       } else if (!strcasecmp(v->name, "nat")) {
>                               user->nat = ast_true(v->value);
499a502,509
> 
>       /* Only apply it for the first packet, we just need the correct ip/port */
>       if(p->nat)
>       {
>               ast_rtp_setnat(p->rtp,p->nat);
>               p->nat = 0;
>       }
> 
1033a1044
>                       p->nat = user->nat;

thanks,
    Adam Hart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-dev/attachments/20030911/8537b37d/attachment.htm


More information about the asterisk-dev mailing list