The script should authenticate REGISTER and INVITE messages. Let's see how this happens before changing the opensips.cfg
script. When OpenSIPS receives the REGISTER message, it checks for the existence of the Authorization header. If it is not found, it will challenge UAC for the credentials and exit.
After being challenged, the UAC should send a REGISTER message with an Authorization header field:
See the following registration process shown by these packets captured by the ngrep utility. The ngrep tool is a handy utility, easy to install on any Linux server. The ngrep command used to capture the packet is as follows:
ngrep –p –q –W byline port 5060 U 192.168.1.119:29040 -> 192.168.1.155:5060 REGISTER sip:192.168.1.155 SIP/2.0. Via: SIP/2.0/UDP 192.168.1.119:29040;branch=z9hG4bK-d87543-13517a5a8218ff45-1--d87543-;rport. Max-Forwards: 70. Contact: <sip:[email protected]:29040;rinstance=2286bddd834b3cfe>. To: "1000"<sip...