On Mon, Jun 16, 2008 at 2:29 PM, Iñaki Baz Castillo <ibc(a)in.ilimit.es>
wrote:
El Monday 16 June 2008 13:45:07 escribió:
Jola, ¿tal vez iba para la lista? XDDDDD
> If you manage clients behind NAT with no
STUN you need to fix NAT in
SIP
> signalling. For that you need managing
rport, rewritting "Contact"
header
and so.
Of course, if you are not the responsible of the clients you don't need
it. :)
As i'm not responsible for the clients I always do:
setbflag(7);
force_rport();
fix_contact();
append_hf("P-hint: Route[6]: mediaproxy \r\n");
use_media_proxy();
on an INVITE, as I don't care whether they are behind NAT or not. And
on the REPLYs:
append_hf("P-hint: Onreply-route - fixcontact \r\n");
fix_contact();
if (search("^Content-Type:[ ]*application/sdp")) {
append_hf("P-hint: onreply_route|usemediaproxy \r\n");
use_media_proxy();
};
You only have to "fix_contact" if the reply
is a 180|183 or 2XX
Be careful, if you get a REDIRECT (3XX) whose information is in it
"CONTACT" (who to redirect to), you'll delete the "contact"
this way if the are behind NAT or not, i'll
always fix the contacts
and force mediaproxy....
do you think this is correct?
Have you had problems with calls getting cut off? BYE/CANCEL/ACK that
didn't reach its destination?
If you haven't, the it is correct ;)