Subversion Repositories SmartDukaan

Rev

Show changed files | Details | Compare with Previous | Blame | RSS feed

Filtering Options

Rev Age Author Path Log message Diff
37552 28 d 1 h amit /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/ lead/knowlarity: stop a null lookup key from matching every row

selectByEquals maps a null VALUE to NO PREDICATE AT ALL rather than to "= null",
because GenericRepositoryImpl.prepareEqualPredicate skips null entries. So a null
lookup key does not miss -- it selects the whole table and dies on
NonUniqueResultException. Two live call paths were doing exactly that.

RecordingService.updateAgentCallLog read caller_id, which knowlarity has never sent
on push-call-log: a sample of 50 live webhooks contained it zero times. Every call
therefore ran selectByCallerId(null) -> "select every sip_master row" -> throw, and
the whole feed was discarded. 17 of those 50 were Connected calls with a real agent.
Resolve the agent from agent_number instead, which is the field that actually
identifies them and holds the sip_url; it arrives bare, sip:-prefixed, or as the
literals "False"/"None" when nobody picked up. caller_id is still honoured first in
case they ever start sending it. A payload naming no agent is INFO, and an agent
missing from sip_master is WARN (an ops fix, and per-agent, so an ERROR would
fingerprint into one GlitchTip issue per agent).

AuthRepositoryImpl.putEmailOrMobile had the same hole via Long.parseLong(null)
falling into the catch and putting a null email. selectByEmailOrMobile(null)
degenerated to "select all 405 users", and authenticate(null, hash) degenerated to
"does ANY user have this password hash", which would answer true. Both fail closed
today only as an accident of how many rows the table holds, so the guard goes on the
one path they share.

Fixes GlitchTip #58/#1324/#1335 (fofo, 281 events) and #10 (web).
 
36018 202 d 20 h amit /trunk/profitmandi-dao/ Add Knowlarity live call monitoring - WebSocket client, auth, agent resolver, event processing. Maps CC-Agent-Number/CC-SR-Number to sip_master for agent identification. Added authId to SipMaster entity, selectBySipUrl and selectAll to SipRepository. Added Tyrus WebSocket client dependency.  
35679 241 d 20 h ranu /trunk/ calling webhook updated  
34658 482 d 20 h ranu /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/ knowlarity api updation on sip_url