[asterisk-dev] stun support in asterisk ? (and a related hack for rtp.c)

Dinesh Nair dinesh at alphaque.com
Wed Jul 11 06:30:46 CDT 2007


On Wed, 11 Jul 2007 04:02:37 -0700, Luigi Rizzo wrote:
> As a temporary workaround, I implemented a simple hack inspired by
> an idea from Olle at
>     http://www.voip-info.org/wiki/view/Asterisk+SIP+chan_sip2
> where the remote endpoint of the rtp is rewritten with the source
> address from incoming RTP packets. This way, if asterisk receives
> the audio stream, can reply back to the sender even if sdp had
> a bogus address.

code to do the same thing exists in asterisk 1.2.21 as well, and is turned
on by setting the nat option in sip.conf, for sip channels. there's even
an api, ast_rtp_setnat which can be used to turn it on and off for
different rtp structures.

i presume this patch is for 1.4/1.6 then ?

-- 
Regards,                           /\_/\   "All dogs go to heaven."
dinesh at alphaque.com                (0 0)   http://www.openmalaysiablog.com/
+==========================----oOO--(_)--OOo----==========================+
| for a in past present future; do                                        |
|   for b in clients employers associates relatives neighbours pets; do   |
|   echo "The opinions here in no way reflect the opinions of my $a $b."  |
| done; done                                                              |
+=========================================================================+



More information about the asterisk-dev mailing list