Authentication in sip phones

Hello everyone
plz help me out regarding issues in sip server. i m using asterisknow as pbx as well as proxy server
As i m new bie to pbx. problems are coming in my server.

when i use softphones without iptables, it works fine.but when i use rules of iptables then sometimes phone get registered but sometimes not…and at the time of calling to other phone,it sometimes ask for authentication and sometimes not.i m not getting why it does not ask for authentication each time i use softphone?
Thanx in advance

Asterisk cannot act as a proxy server (although you might configure it in the phone as one).

You need to provide a trace of the SIP registration dialogue. You also need to say how you have configured iptables.

Also note that any help on this forum will be in terms of direct manipulation of the Asterisk configuration files. There are separate forums for people who only want to work with the GUI.