It looks to me that if the test clause is false then ast_gethostbyname is called. Presumably not needed when NAT is enabled.

Bob...

jezzzz . wrote:
In chan_sip.c, line 5876 (Asterisk-1.2.13), the
function parse_ok_contact returns whether the host
that requested an invite is a valid or invalid host.

In line 5925 the following clause is tested:

if (!(ast_test_flag(pvt, SIP_NAT) & SIP_NAT_ROUTE))
    hp = ast_gethostbyname(n, &ahp);

If this clause is true then Asterisk will attempt to
retrieve the IP address by using the hostname provided
in the invite.

My question is, is this test always going to be true
if a user (who receives the invite) uses NAT? (this is
set up in sip.conf as nat=yes) Is there a reason why
this was set up only for NAT?
Thanks,

Jez

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com _______________________________________________
--Bandwidth and Colocation provided by Easynews.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users
_______________________________________________
--Bandwidth and Colocation provided by Easynews.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to