[Home]

Summary:ASTERISK-00255: [patch] NAT via H.323
Reporter:adam (adam)Labels:
Date Opened:2003-09-12 00:10:26Date Closed:2004-09-25 02:40:13
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Core/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) chan_h323.diff
Description: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.

****** ADDITIONAL INFORMATION ******

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;
Comments:By: Brian West (bkw918) 2003-09-12 17:30:46

Good job adam... Hope it works as well as you say.  :P  I don't have nat or I would test it.  But msg JerJer since he does chan_h323

bkw

By: John Todd (jtodd) 2003-09-12 18:23:45

For future bug reports, please use diff -u   for diff format.  Keep 'em coming!

By: jerjer (jerjer) 2003-09-13 19:17:47

Merged untested into cvs.

This may work for the RTP channel but the other channels that get setup (ie H.245) would still get setup to the private IP address.

I cannot find any major issues with this unless you are NOT using the RFC2833 type DTMF payload.

By: jerjer (jerjer) 2003-09-13 19:18:15

Merged into cvs.