From 8bc7c1193f96f55cb3b8f510725f38b8dad3a62f Mon Sep 17 00:00:00 2001 From: djfiander Date: Sat, 29 Jul 2006 17:44:50 +0000 Subject: [PATCH] Allow clients to violate the protocol specification by not sending and SC Status message first after they log in. This should work fine for SIP Login clients, but clients that use telnet to log in MUST send an SC Status message, or they'll be trapped using SIP rev 1.00. --- SIPServer.pm | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/SIPServer.pm b/SIPServer.pm index 0f53ca0..a1daec4 100644 --- a/SIPServer.pm +++ b/SIPServer.pm @@ -257,7 +257,17 @@ sub sip_protocol_loop { # we recieve must be an SC_STATUS message. But it might be # an SC_REQUEST_RESEND. So, as long as we keep receiving # SC_REQUEST_RESEND, we keep waiting for an SC_STATUS - $expect = SC_STATUS; + + # Comprise reports that no other ILS actually enforces this + # constraint, so we'll relax about it too. As long as everybody + # uses the SIP "raw" login process, rather than telnet, this + # will be fine, becaues the LOGIN protocol exchange will force + # us into SIP 2.00 anyway. Machines that want to log in using + # telnet MUST send an SC Status message first, even though we're + # not enforcing it. + # + #$expect = SC_STATUS; + $expect = ''; while ($input = Sip::read_SIP_packet(*STDIN)) { my $status; -- 2.11.0