The script should authenticate REGISTER
and INVITE
messages. Let's show how this happens before changing the openser.cfg
script. When OpenSER receives the REGISTER
message it checks for the existence of the Authorize header. If it does not find one, it will challenge UAC for the credentials and exit.
After being challenged the UAC should send a REGISTER
message with an Authorize header field.
The register process can be seen in the packet capture shown below:
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:[email protected]>. From: "1000"<sip:[email protected]>;tag=0d10cc75. Call-ID: e0739d571d287264NjhiZjM2N2UyMjhmNDViYTgzY2I4ODMxYTVlZTY0NDc.. CSeq: 1 REGISTER....