<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Gokul Krishna</title>
    <description>The latest articles on DEV Community by Gokul Krishna (@gokul_krishna_5cb68b2138c).</description>
    <link>https://dev.to/gokul_krishna_5cb68b2138c</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4197878%2F473bb15a-8309-4c9c-9e2b-cbf4d9d7f679.png</url>
      <title>DEV Community: Gokul Krishna</title>
      <link>https://dev.to/gokul_krishna_5cb68b2138c</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/gokul_krishna_5cb68b2138c"/>
    <language>en</language>
    <item>
      <title>Setting Up VoIP for a Small Business: Porting, Call Flows, Business Texting Registration and 7 Systems Compared</title>
      <dc:creator>Gokul Krishna</dc:creator>
      <pubDate>Tue, 24 Nov 2026 11:19:01 +0000</pubDate>
      <link>https://dev.to/gokul_krishna_5cb68b2138c/setting-up-voip-for-a-small-business-porting-call-flows-business-texting-registration-and-7-36f7</link>
      <guid>https://dev.to/gokul_krishna_5cb68b2138c/setting-up-voip-for-a-small-business-porting-call-flows-business-texting-registration-and-7-36f7</guid>
      <description>&lt;p&gt;&lt;strong&gt;Summary:&lt;/strong&gt; Setting up VoIP for a small business takes four steps: port or buy numbers, design call flows, register for business texting if you send SMS in the US, and connect your CRM or help desk. This guide covers each step and compares seven VoIP systems for small businesses, with JustCall first for small teams that talk to customers all day.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 1: Numbers
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Porting&lt;/strong&gt; keeps the numbers customers already know. Gather the account number, PIN and a recent bill from your current carrier. Port during a quiet period.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;New numbers:&lt;/strong&gt; choose local numbers for each market you serve, or toll-free for national reach.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Step 2: Call flows
&lt;/h2&gt;

&lt;p&gt;Sketch your flow before configuring it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Main number
  -&amp;gt; Business hours?
       yes -&amp;gt; IVR: 1 Sales, 2 Support
                 Sales   -&amp;gt; ring group (simultaneous)
                 Support -&amp;gt; queue -&amp;gt; overflow to voicemail or AI
       no  -&amp;gt; AI receptionist or voicemail -&amp;gt; summary to team
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Keep menus short. Two or three options are easier for callers.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 3: Business texting
&lt;/h2&gt;

&lt;p&gt;If you send SMS from US local numbers, carriers require 10DLC brand and campaign registration. Plan for registration time before launching text campaigns.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 4: Integrations
&lt;/h2&gt;

&lt;p&gt;Connect the CRM or help desk so calls and texts log automatically. Test with a real call before rollout.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 5: Network
&lt;/h2&gt;

&lt;p&gt;Use a stable connection, prioritize voice traffic on your router if possible, and test call quality from each location.&lt;/p&gt;

&lt;h2&gt;
  
  
  7 VoIP systems for small businesses
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. JustCall
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://justcall.io/solution/business-phone-system/" rel="noopener noreferrer"&gt;JustCall&lt;/a&gt; fits small teams that handle a lot of customer calls:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Numbers&lt;/strong&gt; in 70+ countries, plus porting for existing US numbers. See &lt;a href="https://justcall.io/product/country-coverage/" rel="noopener noreferrer"&gt;country coverage&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Calling and SMS&lt;/strong&gt; on one platform, with calls, texts and recordings syncing to CRMs such as HubSpot, Salesforce, Pipedrive and Zoho.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;After-hours coverage&lt;/strong&gt; with the &lt;a href="https://justcall.io/product/ai-receptionist/" rel="noopener noreferrer"&gt;AI Receptionist&lt;/a&gt;, which answers 24/7, books appointments and transfers with context.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Dialers&lt;/strong&gt; for outbound follow-up.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Security:&lt;/strong&gt; SOC 2 Type II certified.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A 14-day free trial is available with no credit card required.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Quo (formerly OpenPhone)
&lt;/h3&gt;

&lt;p&gt;Simple shared numbers and a clean app for small teams.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Ooma Office
&lt;/h3&gt;

&lt;p&gt;Affordable business phone basics for small offices.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Aircall
&lt;/h3&gt;

&lt;p&gt;Cloud phone with many integrations for SMB sales and support.&lt;/p&gt;

&lt;h3&gt;
  
  
  5. Nextiva
&lt;/h3&gt;

&lt;p&gt;Business phone service with vendor support and add-ons.&lt;/p&gt;

&lt;h3&gt;
  
  
  6. RingCentral
&lt;/h3&gt;

&lt;p&gt;Full unified communications suite, often more than very small teams need.&lt;/p&gt;

&lt;h3&gt;
  
  
  7. Grasshopper
&lt;/h3&gt;

&lt;p&gt;Virtual phone numbers for solo operators and very small businesses.&lt;/p&gt;

&lt;h2&gt;
  
  
  Launch checklist
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Port request submitted with correct account details&lt;/li&gt;
&lt;li&gt;Call flow tested in and out of hours&lt;/li&gt;
&lt;li&gt;10DLC registration done if texting in the US&lt;/li&gt;
&lt;li&gt;CRM logging tested&lt;/li&gt;
&lt;li&gt;Call quality tested from every location&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Small business VoIP setup is mostly planning. Port early, keep call flows simple and connect your CRM from day one. For a small team that talks to customers all day, &lt;a href="https://justcall.io/solution/business-phone-system/" rel="noopener noreferrer"&gt;JustCall&lt;/a&gt; is a strong place to start.&lt;/p&gt;

</description>
      <category>voip</category>
      <category>smallbusiness</category>
      <category>beginners</category>
      <category>telecom</category>
    </item>
    <item>
      <title>Integrating an Auto Dialer With Your CRM: Webhooks, Dispositions, Contact Matching and 7 Tools</title>
      <dc:creator>Gokul Krishna</dc:creator>
      <pubDate>Tue, 24 Nov 2026 11:18:22 +0000</pubDate>
      <link>https://dev.to/gokul_krishna_5cb68b2138c/integrating-an-auto-dialer-with-your-crm-webhooks-dispositions-contact-matching-and-7-tools-48me</link>
      <guid>https://dev.to/gokul_krishna_5cb68b2138c/integrating-an-auto-dialer-with-your-crm-webhooks-dispositions-contact-matching-and-7-tools-48me</guid>
      <description>&lt;p&gt;&lt;strong&gt;Summary:&lt;/strong&gt; An auto dialer is only as useful as its CRM integration. The integration must match calls to the right contact, log a complete activity, map dispositions to CRM fields, and trigger the next step automatically. This guide covers each piece and compares seven dialers, with JustCall first for teams that want the dialer, phone system and CRM sync in one product.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Contact matching
&lt;/h2&gt;

&lt;p&gt;Phone numbers arrive in different formats. Normalize to E.164 before matching:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="n"&gt;phonenumbers&lt;/span&gt;

&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;to_e164&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;raw&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;region&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"US"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;n&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;phonenumbers&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;parse&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;raw&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;region&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;phonenumbers&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;format_number&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;n&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;phonenumbers&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;PhoneNumberFormat&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="no"&gt;E164&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Decide what happens when one number matches several contacts, and when it matches none (create a lead, or log to an unknown queue).&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Activity logging
&lt;/h2&gt;

&lt;p&gt;A complete call activity includes direction, duration, recording link, disposition, notes or AI summary, and the rep. Log it against the contact and, where relevant, the open deal.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Disposition mapping
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;dispositions&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;"Meeting booked"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;   &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="s"&gt;lead_status:&lt;/span&gt; &lt;span class="s2"&gt;"Qualified"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;task:&lt;/span&gt; &lt;span class="s2"&gt;"Prep meeting"&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="na"&gt;"Call back later"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;  &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="s"&gt;task:&lt;/span&gt; &lt;span class="s2"&gt;"Call back"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;due:&lt;/span&gt; &lt;span class="s2"&gt;"+2d"&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="na"&gt;"Not interested"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;   &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="s"&gt;lead_status:&lt;/span&gt; &lt;span class="s2"&gt;"Unqualified"&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="na"&gt;"Do not call"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;      &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="s"&gt;dnc:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="na"&gt;"No answer"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;        &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="s"&gt;retry:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Require a disposition at the end of every call. Without it, automation has nothing to act on.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Webhooks and automation
&lt;/h2&gt;

&lt;p&gt;Use call-ended webhooks to update lead status, create tasks, enroll contacts in sequences or notify a channel. Make handlers idempotent, because webhooks can be delivered more than once.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Compliance data
&lt;/h2&gt;

&lt;p&gt;Store consent and DNC status in the CRM and check them before a contact enters a dialing list.&lt;/p&gt;

&lt;h2&gt;
  
  
  7 dialers compared
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. JustCall Sales Dialer
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://justcall.io/product/sales-dialer/" rel="noopener noreferrer"&gt;JustCall Sales Dialer&lt;/a&gt; offers auto, parallel and dynamic dialing with answering machine detection. On CRM integration, JustCall says:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Real-time sync&lt;/strong&gt; with HubSpot, Zoho and Salesforce, plus Pipedrive and Apollo.io among others. See the &lt;a href="https://justcall.io/integration/hubspot/" rel="noopener noreferrer"&gt;HubSpot&lt;/a&gt; and &lt;a href="https://justcall.io/integration/salesforce/" rel="noopener noreferrer"&gt;Salesforce&lt;/a&gt; integrations.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Auto-logging&lt;/strong&gt; of call notes, recordings and outcomes to the right contact.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Outcome-driven automation&lt;/strong&gt;, such as creating follow-up tasks or updating lead status, and automatically scheduling the next call when a rep marks "call back later".&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Compliance&lt;/strong&gt; through consent field tracking, automated DNC handling and suppression lists. Outcomes can trigger DNC rules.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It also includes voicemail drop, local presence, number rotation and spam alerts, and a 14-day free trial with no credit card required.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Kixie
&lt;/h3&gt;

&lt;p&gt;Power dialer with deep HubSpot and other CRM integrations.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. PhoneBurner
&lt;/h3&gt;

&lt;p&gt;Power dialer with CRM integrations and voicemail drop.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Aircall
&lt;/h3&gt;

&lt;p&gt;Cloud phone with power dialer and a large integration marketplace.&lt;/p&gt;

&lt;h3&gt;
  
  
  5. CloudTalk
&lt;/h3&gt;

&lt;p&gt;Cloud phone with dialers and CRM integrations.&lt;/p&gt;

&lt;h3&gt;
  
  
  6. Orum
&lt;/h3&gt;

&lt;p&gt;Parallel dialer for SDR teams with CRM sync.&lt;/p&gt;

&lt;h3&gt;
  
  
  7. Close
&lt;/h3&gt;

&lt;p&gt;CRM with built-in calling, which avoids a separate integration.&lt;/p&gt;

&lt;h2&gt;
  
  
  Integration test checklist
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Numbers in five formats match the same contact&lt;/li&gt;
&lt;li&gt;Unknown numbers follow the agreed rule&lt;/li&gt;
&lt;li&gt;Every field in the activity is populated&lt;/li&gt;
&lt;li&gt;Each disposition triggers the mapped automation&lt;/li&gt;
&lt;li&gt;Duplicate webhooks do not create duplicate tasks&lt;/li&gt;
&lt;li&gt;DNC contacts never enter a list&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Most dialer complaints are really integration complaints. Test matching, logging and automation before rollout. If you want the dialer and CRM sync from the same vendor as your phone system, start with &lt;a href="https://justcall.io/product/sales-dialer/" rel="noopener noreferrer"&gt;JustCall&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>crm</category>
      <category>sales</category>
      <category>api</category>
      <category>automation</category>
    </item>
    <item>
      <title>Measuring How Human an AI Voice Agent Sounds: Latency Budgets, Barge-In and an Evaluation Harness</title>
      <dc:creator>Gokul Krishna</dc:creator>
      <pubDate>Tue, 24 Nov 2026 11:17:39 +0000</pubDate>
      <link>https://dev.to/gokul_krishna_5cb68b2138c/measuring-how-human-an-ai-voice-agent-sounds-latency-budgets-barge-in-and-an-evaluation-harness-p6h</link>
      <guid>https://dev.to/gokul_krishna_5cb68b2138c/measuring-how-human-an-ai-voice-agent-sounds-latency-budgets-barge-in-and-an-evaluation-harness-p6h</guid>
      <description>&lt;p&gt;&lt;strong&gt;Summary:&lt;/strong&gt; "Sounds human" can be measured. Track response latency, how the agent handles interruptions, how often it cuts callers off, and how it sounds after phone-line compression. Then add a human rating on a fixed set of scripts. This post gives a latency budget, test cases and a simple harness, and lists platforms to evaluate, starting with JustCall AI Voice Agent.&lt;/p&gt;

&lt;h2&gt;
  
  
  Latency budget
&lt;/h2&gt;

&lt;p&gt;For a cascaded pipeline (speech-to-text, language model, text-to-speech), a rough budget for the gap between the caller finishing and the agent starting:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Endpointing (detect caller stopped)   200-500 ms
STT finalization                       100-300 ms
LLM first token                        200-600 ms
TTS first audio                        100-300 ms
Network / telephony                     50-200 ms
-------------------------------------------------
Total                                  ~0.7-1.9 s
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;These ranges are illustrative. Measure your own on real phone calls. Streaming at each stage and starting TTS on the first sentence are the biggest wins.&lt;/p&gt;

&lt;h2&gt;
  
  
  Turn-taking metrics
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Metric&lt;/th&gt;
&lt;th&gt;What it measures&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Response gap&lt;/td&gt;
&lt;td&gt;Time from caller end to agent start&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;False cut-ins&lt;/td&gt;
&lt;td&gt;Agent starts while caller is still speaking&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Barge-in stop time&lt;/td&gt;
&lt;td&gt;Time for agent to stop after caller interrupts&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Talk-over ratio&lt;/td&gt;
&lt;td&gt;Share of time both speak at once&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  Phone audio
&lt;/h2&gt;

&lt;p&gt;Phone calls are narrowband or compressed. Evaluate voices after passing them through a real phone call, not from studio output.&lt;/p&gt;

&lt;h2&gt;
  
  
  Evaluation harness
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="no"&gt;SCRIPTS&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
    &lt;span class="s2"&gt;"simple_faq"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;          &lt;span class="c1"&gt;# one question, one answer&lt;/span&gt;
    &lt;span class="s2"&gt;"interrupt_midway"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;    &lt;span class="c1"&gt;# caller interrupts after 2 seconds&lt;/span&gt;
    &lt;span class="s2"&gt;"long_pause"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;          &lt;span class="c1"&gt;# caller pauses 2 seconds mid-sentence&lt;/span&gt;
    &lt;span class="s2"&gt;"unknown_question"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;    &lt;span class="c1"&gt;# agent must admit it does not know&lt;/span&gt;
    &lt;span class="s2"&gt;"ask_for_human"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;       &lt;span class="c1"&gt;# transfer on first request&lt;/span&gt;
    &lt;span class="s2"&gt;"noisy_background"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;    &lt;span class="c1"&gt;# play street noise under caller&lt;/span&gt;
&lt;span class="p"&gt;]&lt;/span&gt;

&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;evaluate&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;call_recording&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;events&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="s2"&gt;"response_gap_ms"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;median_gap&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;events&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="s2"&gt;"false_cutins"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;count_cutins&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;events&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="s2"&gt;"bargein_stop_ms"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;median_bargein&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;events&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="s2"&gt;"human_rating"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;None&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;  &lt;span class="c1"&gt;# 1-5 from blind listeners&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Use blind listeners who do not know which platform they hear.&lt;/p&gt;

&lt;h2&gt;
  
  
  Platforms to evaluate
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. JustCall AI Voice Agent
&lt;/h3&gt;

&lt;p&gt;The &lt;a href="https://justcall.io/product/ai-voice-agent/" rel="noopener noreferrer"&gt;JustCall AI Voice Agent&lt;/a&gt; runs inside JustCall's phone system, so you can test it on real phone calls from day one. Relevant features:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;14 languages, with real-time language detection on the &lt;a href="https://justcall.io/product/ai-receptionist/" rel="noopener noreferrer"&gt;AI Receptionist&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Configurable role, personality, voice, language, greeting and script&lt;/li&gt;
&lt;li&gt;Professionally recorded voices or a cloned spokesperson voice&lt;/li&gt;
&lt;li&gt;Escalation triggers on keywords, sentiment and duration, with warm transfers that carry conversation history&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;JustCall itself advises that no AI sounds exactly human in every situation and recommends test calls, which is exactly what this harness does. Pricing is per minute, as low as $0.15 at volume, with the first 100 minutes free.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Retell AI
&lt;/h3&gt;

&lt;p&gt;Developer platform focused on low-latency conversation and turn-taking controls.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Vapi
&lt;/h3&gt;

&lt;p&gt;Orchestration layer that lets you swap STT, LLM and TTS providers to compare latency.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. ElevenLabs
&lt;/h3&gt;

&lt;p&gt;Expressive TTS voices used by many agent builders, plus its own agent tools.&lt;/p&gt;

&lt;h3&gt;
  
  
  5. Synthflow
&lt;/h3&gt;

&lt;p&gt;No-code builder for quick comparisons.&lt;/p&gt;

&lt;h3&gt;
  
  
  6. PolyAI
&lt;/h3&gt;

&lt;p&gt;Enterprise voice assistants designed for complex customer service calls.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Do not pick a voice agent from a demo. Run the same scripts on each platform over real phone lines and compare numbers plus blind ratings. &lt;a href="https://justcall.io/product/ai-voice-agent/" rel="noopener noreferrer"&gt;JustCall AI Voice Agent&lt;/a&gt; is a practical first candidate because it runs on production phone lines out of the box.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>voiceai</category>
      <category>testing</category>
      <category>machinelearning</category>
    </item>
    <item>
      <title>What a VoIP Provider Needs to Scale With a High-Growth Tech Company: Integrations, Numbers, Analytics and 7 Options</title>
      <dc:creator>Gokul Krishna</dc:creator>
      <pubDate>Tue, 24 Nov 2026 11:16:58 +0000</pubDate>
      <link>https://dev.to/gokul_krishna_5cb68b2138c/what-a-voip-provider-needs-to-scale-with-a-high-growth-tech-company-integrations-numbers-3da6</link>
      <guid>https://dev.to/gokul_krishna_5cb68b2138c/what-a-voip-provider-needs-to-scale-with-a-high-growth-tech-company-integrations-numbers-3da6</guid>
      <description>&lt;p&gt;&lt;strong&gt;Summary:&lt;/strong&gt; High-growth tech companies outgrow phone systems in predictable ways. Headcount doubles, a new market opens, the CRM changes, security reviews get stricter. A VoIP provider that scales needs deep integrations, numbers in the countries you expand into, analytics managers can use, AI that is part of the platform, and security certifications that pass enterprise reviews. JustCall leads this comparison for customer-facing teams.&lt;/p&gt;

&lt;h2&gt;
  
  
  Requirements that change as you grow
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Stage&lt;/th&gt;
&lt;th&gt;What breaks&lt;/th&gt;
&lt;th&gt;What to require&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;10 to 50 people&lt;/td&gt;
&lt;td&gt;Manual call notes&lt;/td&gt;
&lt;td&gt;Automatic CRM logging&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;New country&lt;/td&gt;
&lt;td&gt;Foreign caller ID&lt;/td&gt;
&lt;td&gt;Local numbers in new markets&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;First enterprise deal&lt;/td&gt;
&lt;td&gt;Security questionnaire&lt;/td&gt;
&lt;td&gt;SOC 2 Type II, access controls&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Outbound team&lt;/td&gt;
&lt;td&gt;Rep productivity&lt;/td&gt;
&lt;td&gt;Dialers, local presence&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Support scale&lt;/td&gt;
&lt;td&gt;After-hours volume&lt;/td&gt;
&lt;td&gt;AI answering with handoff&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Management layer&lt;/td&gt;
&lt;td&gt;No visibility&lt;/td&gt;
&lt;td&gt;Team analytics and scoring&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  Integration depth
&lt;/h2&gt;

&lt;p&gt;Ask what the integration actually writes. A shallow integration adds a note. A deep one creates an activity on the right contact and deal, with recording, summary, disposition and follow-up task, and lets reps click to call from the CRM.&lt;/p&gt;

&lt;h2&gt;
  
  
  Numbers and porting
&lt;/h2&gt;

&lt;p&gt;Plan for the next two markets, not just today's. Check which number types are available per country and what documents each country requires. Port numbers early in any migration.&lt;/p&gt;

&lt;h2&gt;
  
  
  Analytics
&lt;/h2&gt;

&lt;p&gt;Managers need connects, answer rates, talk time, SLA and outcomes by team without exporting CSVs. AI scoring and topic tracking help when you cannot listen to every call.&lt;/p&gt;

&lt;h2&gt;
  
  
  AI as part of the platform
&lt;/h2&gt;

&lt;p&gt;If the AI voice agent is a separate vendor, you maintain another integration and another data store. If it is part of the phone system, transfers and records stay in one place.&lt;/p&gt;

&lt;h2&gt;
  
  
  7 providers compared
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. JustCall
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://justcall.io/solution/business-phone-system/" rel="noopener noreferrer"&gt;JustCall&lt;/a&gt; is built for sales and support teams:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Integrations:&lt;/strong&gt; HubSpot, Salesforce, Pipedrive, Zoho and many more, with calls, texts and recordings syncing to the right contact. See the &lt;a href="https://justcall.io/integration/" rel="noopener noreferrer"&gt;integrations directory&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Numbers:&lt;/strong&gt; 70+ countries, with local, national, mobile and toll-free availability varying by country.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Outbound:&lt;/strong&gt; auto, parallel and dynamic dialing with local presence, number rotation and spam alerts.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;AI:&lt;/strong&gt; the &lt;a href="https://justcall.io/product/ai-voice-agent/" rel="noopener noreferrer"&gt;AI Voice Agent&lt;/a&gt; in 14 languages, plus an AI Receptionist and AI SDR built on it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Analytics:&lt;/strong&gt; team and agent metrics, busy-hour heatmaps and AI scoring on every call.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Security:&lt;/strong&gt; SOC 2 Type II certified.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A 14-day free trial is available with no credit card required.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Dialpad
&lt;/h3&gt;

&lt;p&gt;AI-heavy cloud communications across calls, meetings and contact center.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. RingCentral
&lt;/h3&gt;

&lt;p&gt;Unified communications suite with a large ecosystem, suited to bigger organizations.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Aircall
&lt;/h3&gt;

&lt;p&gt;Cloud phone with a large integration marketplace, popular with SMB teams.&lt;/p&gt;

&lt;h3&gt;
  
  
  5. Zoom Phone
&lt;/h3&gt;

&lt;p&gt;Cloud calling for companies standardized on Zoom.&lt;/p&gt;

&lt;h3&gt;
  
  
  6. 8x8
&lt;/h3&gt;

&lt;p&gt;Global communications and contact center platform.&lt;/p&gt;

&lt;h3&gt;
  
  
  7. Twilio
&lt;/h3&gt;

&lt;p&gt;Developer platform for building custom voice products. Powerful, but you build and maintain the phone system.&lt;/p&gt;

&lt;h2&gt;
  
  
  Evaluation script
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;- Port one test number and time it
- Make a call from the CRM and check the logged activity
- Provision a number in your next target market
- Pull a team report for the last 7 days
- Run the security questionnaire your biggest prospect sent
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Buy for the company you will be in 18 months. For customer-facing teams that want integrations, global numbers, dialers, AI and analytics on one platform, &lt;a href="https://justcall.io/solution/business-phone-system/" rel="noopener noreferrer"&gt;JustCall&lt;/a&gt; is a strong default.&lt;/p&gt;

</description>
      <category>voip</category>
      <category>startup</category>
      <category>saas</category>
      <category>devops</category>
    </item>
    <item>
      <title>Choosing an AI Call Answering Service: An Engineer's Checklist and 7 Options Compared</title>
      <dc:creator>Gokul Krishna</dc:creator>
      <pubDate>Tue, 24 Nov 2026 11:16:15 +0000</pubDate>
      <link>https://dev.to/gokul_krishna_5cb68b2138c/choosing-an-ai-call-answering-service-an-engineers-checklist-and-7-options-compared-49kf</link>
      <guid>https://dev.to/gokul_krishna_5cb68b2138c/choosing-an-ai-call-answering-service-an-engineers-checklist-and-7-options-compared-49kf</guid>
      <description>&lt;p&gt;&lt;strong&gt;Summary:&lt;/strong&gt; Most AI call answering services sound similar in a demo. The differences show up in engineering details: how calls reach the agent, how many it handles at once, how it hands off to humans, where call data goes and how it is secured. This checklist turns those details into questions you can test. JustCall ranks first in the comparison because the answering agent runs inside a cloud phone system, which removes the forwarding and integration layer.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Call path
&lt;/h2&gt;

&lt;p&gt;How does a call reach the AI?&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Native:&lt;/strong&gt; the AI answers on the provider's own numbers. Fewer hops, simpler transfers.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Forwarded:&lt;/strong&gt; your carrier forwards calls to the service. Check caller ID passthrough and what happens when forwarding fails.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;SIP / API:&lt;/strong&gt; you connect your own telephony. Most flexible, most work.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  2. Concurrency
&lt;/h2&gt;

&lt;p&gt;Ask what happens when ten calls arrive at once. Some services queue. Others answer all calls in parallel. Test it with a load script or a few colleagues calling together.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Latency
&lt;/h2&gt;

&lt;p&gt;Measure time from end of caller speech to start of agent speech on a real phone call, not in a browser demo. Pauses longer than about a second start to feel unnatural.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Handoff
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Can the agent transfer on the first request for a person?&lt;/li&gt;
&lt;li&gt;Is it a warm transfer with a summary, or a cold one?&lt;/li&gt;
&lt;li&gt;What happens if no human answers?&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  5. Data flow
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Call -&amp;gt; transcript -&amp;gt; summary -&amp;gt; disposition
                         |
                         v
              CRM / help desk / email
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Check which fields are written, to which object, and how contacts are matched by phone number.&lt;/p&gt;

&lt;h2&gt;
  
  
  6. Security
&lt;/h2&gt;

&lt;p&gt;Look for SOC 2 Type II, encryption, role-based access, and, for healthcare, a HIPAA option. Ask how long recordings and transcripts are retained.&lt;/p&gt;

&lt;h2&gt;
  
  
  7 options compared
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. JustCall
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Call path:&lt;/strong&gt; native. &lt;a href="https://justcall.io/product/ai-receptionist/" rel="noopener noreferrer"&gt;JustCall AI Receptionist&lt;/a&gt; answers on JustCall numbers, which are available in 70+ countries.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Concurrency:&lt;/strong&gt; it handles calls simultaneously and does not queue them.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Handoff:&lt;/strong&gt; warm transfers with conversation history attached, with escalation triggers on keywords, sentiment thresholds and call duration. If it cannot resolve an issue, it escalates or offers a callback.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Data flow:&lt;/strong&gt; every call is logged to the CRM with caller details, disposition, summary, transcript, intent and next steps. Integrations include HubSpot, Salesforce, Pipedrive, Zoho, Intercom, Zapier and Slack.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Security:&lt;/strong&gt; SOC 2 Type II certified infrastructure, encryption, role-based access, and HIPAA on the Business plan.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Other:&lt;/strong&gt; 14 languages with real-time detection, calendar booking with confirmation texts, and per-minute pricing on the &lt;a href="https://justcall.io/product/ai-voice-agent/" rel="noopener noreferrer"&gt;AI Voice Agent&lt;/a&gt; as low as $0.15 at volume, with the first 100 minutes free.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Smith.ai
&lt;/h3&gt;

&lt;p&gt;Hybrid AI plus live receptionists. Good fallback when calls need human judgment.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Goodcall
&lt;/h3&gt;

&lt;p&gt;AI answering for local businesses with FAQ handling and lead capture.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Rosie
&lt;/h3&gt;

&lt;p&gt;AI answering for small businesses with post-call summaries.&lt;/p&gt;

&lt;h3&gt;
  
  
  5. Upfirst
&lt;/h3&gt;

&lt;p&gt;AI answering with call notes sent by email or text.&lt;/p&gt;

&lt;h3&gt;
  
  
  6. Retell AI
&lt;/h3&gt;

&lt;p&gt;Developer platform: you control the path, latency tuning and integrations.&lt;/p&gt;

&lt;h3&gt;
  
  
  7. Synthflow
&lt;/h3&gt;

&lt;p&gt;No-code builder for custom answering flows.&lt;/p&gt;

&lt;h2&gt;
  
  
  Test script
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;1. Call during business hours, ask a FAQ.
2. Call with three people at once.
3. Interrupt the agent mid-sentence.
4. Ask to book, then change the time.
5. Ask for a human immediately.
6. Check the CRM record for each call.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Choose an AI call answering service the same way you would choose any production system: test the path, the load, the failure modes and the data. If you want the answering agent and the phone system in one place, start with &lt;a href="https://justcall.io/product/ai-receptionist/" rel="noopener noreferrer"&gt;JustCall&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>voiceai</category>
      <category>productivity</category>
      <category>saas</category>
    </item>
    <item>
      <title>Evaluating VoIP Platforms for Sales Calls: An Engineering Checklist for Call Quality, CRM Sync and Caller ID</title>
      <dc:creator>Gokul Krishna</dc:creator>
      <pubDate>Sat, 21 Nov 2026 04:54:46 +0000</pubDate>
      <link>https://dev.to/gokul_krishna_5cb68b2138c/evaluating-voip-platforms-for-sales-calls-an-engineering-checklist-for-call-quality-crm-sync-and-1l7g</link>
      <guid>https://dev.to/gokul_krishna_5cb68b2138c/evaluating-voip-platforms-for-sales-calls-an-engineering-checklist-for-call-quality-crm-sync-and-1l7g</guid>
      <description>&lt;p&gt;&lt;strong&gt;Summary:&lt;/strong&gt; A VoIP platform for sales calls needs more than clear audio. Sales teams depend on CRM sync for every call, dialers that match the campaign, caller ID reputation that keeps calls from being labeled spam, and analytics that show conversations and outcomes by rep. This checklist turns those needs into tests an engineer or RevOps lead can run during a trial.&lt;/p&gt;

&lt;p&gt;General "top VoIP" lists rank providers on price and features for all businesses. Sales teams have narrower and stricter requirements. Use the checklist below to compare platforms on what affects revenue.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Call quality under real conditions
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Test softphone calls on home Wi-Fi and office networks at peak hours.&lt;/li&gt;
&lt;li&gt;Measure MOS or jitter/loss reports if the platform exposes them.&lt;/li&gt;
&lt;li&gt;Check which codecs are used (Opus adapts better to poor networks).&lt;/li&gt;
&lt;li&gt;Confirm media servers are in regions close to your reps.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  2. CRM synchronization
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Every outbound and inbound call creates an activity on the right record within seconds.&lt;/li&gt;
&lt;li&gt;Recording, transcript and summary are attached.&lt;/li&gt;
&lt;li&gt;Dispositions map to CRM fields and trigger workflows.&lt;/li&gt;
&lt;li&gt;Unknown numbers follow a defined rule (create lead, log unmatched).&lt;/li&gt;
&lt;li&gt;SMS and WhatsApp messages also log.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  3. Dialers
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Power dialing for warm leads and account-based outreach.&lt;/li&gt;
&lt;li&gt;Parallel or predictive dialing for high-volume lists, with abandonment controls.&lt;/li&gt;
&lt;li&gt;Voicemail drop.&lt;/li&gt;
&lt;li&gt;Mode selectable per campaign.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  4. Caller ID and reputation
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;STIR/SHAKEN attestation on outbound calls.&lt;/li&gt;
&lt;li&gt;Number registration with carrier and analytics registries.&lt;/li&gt;
&lt;li&gt;Local presence numbers by area code.&lt;/li&gt;
&lt;li&gt;Number health monitoring and rotation.&lt;/li&gt;
&lt;li&gt;Branded caller ID where available.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  5. Compliance controls
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;DNC list checks before dialing.&lt;/li&gt;
&lt;li&gt;Consent tracking fields.&lt;/li&gt;
&lt;li&gt;Calling-hour rules by contact time zone and state.&lt;/li&gt;
&lt;li&gt;Recording consent prompts by jurisdiction.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  6. Analytics and coaching
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Dials, connects, conversations and outcomes by rep and campaign.&lt;/li&gt;
&lt;li&gt;AI transcription and scoring against your sales framework.&lt;/li&gt;
&lt;li&gt;Live listen, whisper and barge.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  7. APIs and events
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;REST API for calls, contacts and users.&lt;/li&gt;
&lt;li&gt;Webhooks for call events (started, answered, ended, recording ready).&lt;/li&gt;
&lt;li&gt;Rate limits documented.&lt;/li&gt;
&lt;li&gt;Sandbox or test numbers.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  8. Security and admin
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;SOC 2 Type II report available.&lt;/li&gt;
&lt;li&gt;SSO and role-based permissions.&lt;/li&gt;
&lt;li&gt;Data retention settings for recordings.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Platforms to test against the checklist
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;JustCall.&lt;/strong&gt; JustCall is built for sales and support teams. &lt;a href="https://justcall.io/product/sales-dialer/" rel="noopener noreferrer"&gt;JustCall Sales Dialer&lt;/a&gt; offers auto, power, parallel, dynamic and predictive dialing with native CRM sync (HubSpot, Salesforce, Pipedrive, Zoho, Outreach, Apollo and others), where calls, texts and recordings sync to the matching contact and outcomes can trigger tasks or DNC rules. Caller ID controls include local numbers, number rotation, Free Caller Registry registration, answer-rate monitoring and spam alerts. Compliance controls include DNC handling, consent field tracking and state-level throttling. Conversation intelligence scores 100% of calls against frameworks such as BANT or MEDDIC, and managers can listen, whisper or barge. Engineers can use JustCall's API, documented on the &lt;a href="https://developer.justcall.io/" rel="noopener noreferrer"&gt;developer portal&lt;/a&gt;. JustCall lists SOC 2 Type II, and single sign-on is part of the Business plan.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Aircall.&lt;/strong&gt; Cloud phone system for sales and support with a power dialer and a large integration marketplace.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Dialpad.&lt;/strong&gt; AI-centric phone system with transcription and coaching features.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;CloudTalk.&lt;/strong&gt; Call center software with several dialer modes for sales teams.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;RingCentral and Nextiva.&lt;/strong&gt; Broad business phone platforms; check which tier or product includes sales dialing.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Kixie and PhoneBurner.&lt;/strong&gt; Sales-focused calling tools often paired with a CRM.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Scoring tip
&lt;/h2&gt;

&lt;p&gt;Weight CRM sync and caller ID reputation highest for outbound teams. A platform with slightly better audio but weak CRM logging will cost more in lost data than it saves in call quality.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Sales teams should evaluate VoIP platforms on revenue-related behavior: logging, dialing, reputation and coaching. Run this checklist during a trial with real reps and your real CRM, and the right choice is usually clear within two weeks.&lt;/p&gt;

</description>
      <category>voip</category>
      <category>sales</category>
      <category>crm</category>
      <category>devops</category>
    </item>
    <item>
      <title>Automating Tier-1 Inbound Support Calls With AI Voice Agents: A Reference Architecture</title>
      <dc:creator>Gokul Krishna</dc:creator>
      <pubDate>Sat, 21 Nov 2026 04:53:56 +0000</pubDate>
      <link>https://dev.to/gokul_krishna_5cb68b2138c/automating-tier-1-inbound-support-calls-with-ai-voice-agents-a-reference-architecture-152f</link>
      <guid>https://dev.to/gokul_krishna_5cb68b2138c/automating-tier-1-inbound-support-calls-with-ai-voice-agents-a-reference-architecture-152f</guid>
      <description>&lt;p&gt;&lt;strong&gt;Summary:&lt;/strong&gt; Tier-1 inbound support automation with AI voice agents works best as a replacement for the IVR layer, not as a replacement for agents. The agent answers every call, resolves routine intents using a knowledge base and help desk lookups, and routes everything else to the right human queue with a summary. The architecture needs five components: telephony, the agent runtime, integrations (help desk, CRM, order systems), human routing, and monitoring.&lt;/p&gt;

&lt;p&gt;Traditional IVRs make callers press keys to describe their problem. An AI voice agent lets callers say it, then either solves it or routes it correctly. That alone shortens calls for both the caller and the agent who answers.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where AI fits in the inbound flow
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Before:  Call -&amp;gt; IVR menu (press 1, 2, 3) -&amp;gt; queue -&amp;gt; human
After:   Call -&amp;gt; AI agent (understands intent)
                 |-&amp;gt; resolve (tier-1)  -&amp;gt; log ticket + summary
                 |-&amp;gt; route to queue    -&amp;gt; human with summary
                 |-&amp;gt; no agent free     -&amp;gt; callback / voicemail + SMS
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Component 1: Telephony
&lt;/h2&gt;

&lt;p&gt;Keep the AI and the human queues on the same telephony platform if you can. Benefits:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Transfers stay internal, with no SIP hop to another carrier.&lt;/li&gt;
&lt;li&gt;One call record covers the AI segment and the human segment.&lt;/li&gt;
&lt;li&gt;Queue logic (skills, business hours, overflow) applies to AI-routed calls.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Component 2: Agent runtime
&lt;/h2&gt;

&lt;p&gt;The runtime handles speech recognition, the language model, tools and speech synthesis. Configure per intent:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Intent&lt;/th&gt;
&lt;th&gt;Action&lt;/th&gt;
&lt;th&gt;Data source&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Order status&lt;/td&gt;
&lt;td&gt;Resolve&lt;/td&gt;
&lt;td&gt;Order system&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Password reset&lt;/td&gt;
&lt;td&gt;Resolve&lt;/td&gt;
&lt;td&gt;Identity system, SMS link&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Appointment change&lt;/td&gt;
&lt;td&gt;Resolve&lt;/td&gt;
&lt;td&gt;Calendar&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Billing dispute&lt;/td&gt;
&lt;td&gt;Route&lt;/td&gt;
&lt;td&gt;Billing queue&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Technical issue&lt;/td&gt;
&lt;td&gt;Route with summary&lt;/td&gt;
&lt;td&gt;Tier-2 queue&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cancellation&lt;/td&gt;
&lt;td&gt;Route&lt;/td&gt;
&lt;td&gt;Retention queue&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  Component 3: Integrations
&lt;/h2&gt;

&lt;p&gt;Minimum integrations for tier-1 support:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Help desk&lt;/strong&gt; (Zendesk, Freshdesk, Intercom): create or update a ticket per call with transcript and summary.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;CRM:&lt;/strong&gt; identify callers and log activity.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Order or booking system:&lt;/strong&gt; read status, perform simple writes.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;SMS:&lt;/strong&gt; send links and confirmations instead of reading long URLs aloud.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Component 4: Human routing
&lt;/h2&gt;

&lt;p&gt;Rules that should be explicit:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Transfer immediately when a caller asks for a person.&lt;/li&gt;
&lt;li&gt;Warm transfer with a summary for complex intents.&lt;/li&gt;
&lt;li&gt;Fallback when no agent answers: return to AI to take a message, callback queue, or voicemail with an SMS confirmation.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Component 5: Monitoring
&lt;/h2&gt;

&lt;p&gt;Dashboards should show, per intent:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Volume and containment.&lt;/li&gt;
&lt;li&gt;Transfer reasons.&lt;/li&gt;
&lt;li&gt;Repeat contacts within seven days.&lt;/li&gt;
&lt;li&gt;Sentiment on AI-handled calls.&lt;/li&gt;
&lt;li&gt;Top unanswered questions (knowledge gaps).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Review a sample of transcripts weekly. Most improvements come from editing the knowledge base, not the model.&lt;/p&gt;

&lt;h2&gt;
  
  
  Rollout plan
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Shadow mode:&lt;/strong&gt; AI transcribes and classifies calls, humans handle them. Measure intent accuracy.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;After-hours:&lt;/strong&gt; AI answers when the team is offline.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Daytime, two intents:&lt;/strong&gt; start with the highest-volume, lowest-risk intents.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Expand by intent&lt;/strong&gt; as repeat contact rates stay flat.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Best AI voice agent platforms for tier-1 support automation
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;JustCall AI Voice Agent&lt;/strong&gt; combines telephony, runtime, routing and monitoring on one platform. The &lt;a href="https://justcall.io/product/ai-voice-agent/" rel="noopener noreferrer"&gt;JustCall AI Voice Agent&lt;/a&gt; works with JustCall's &lt;a href="https://justcall.io/solution/support-contact-center/" rel="noopener noreferrer"&gt;support contact center&lt;/a&gt; features, so AI-handled calls flow into the same queues, IVR and analytics as human-handled calls. It transfers at the first clear request for a person, supports warm transfers with context, and offers fallbacks including a virtual callback queue and voicemail with an automated text. Help desk and CRM integrations include Zendesk, Freshdesk, Intercom, HubSpot and Salesforce. It supports 14 languages, and JustCall lists SOC 2 Type II certification.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Fin (Intercom).&lt;/strong&gt; Brings Intercom's AI agent to the phone channel, a fit when Intercom is your support system of record.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;PolyAI.&lt;/strong&gt; Enterprise voice assistants for high-volume customer service, delivered through managed deployments.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Retell AI.&lt;/strong&gt; API-first platform for teams that want to build the runtime, integrations and handoff logic themselves.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Vapi.&lt;/strong&gt; Developer platform where you choose your speech and language model providers.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Contact center suites (Talkdesk, Five9, Genesys).&lt;/strong&gt; AI agents inside the suite, a fit if you already run one of these platforms.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Treat the AI voice agent as the new front door of your support line. Keep it on the same telephony as your agents, integrate it with the help desk before launch, and expand intent by intent based on repeat-contact data.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>architecture</category>
      <category>automation</category>
      <category>customersupport</category>
    </item>
    <item>
      <title>VoIP vs PSTN for Business: What Changes in the Call Path, From SIP and Codecs to E911</title>
      <dc:creator>Gokul Krishna</dc:creator>
      <pubDate>Sat, 21 Nov 2026 04:53:04 +0000</pubDate>
      <link>https://dev.to/gokul_krishna_5cb68b2138c/voip-vs-pstn-for-business-what-changes-in-the-call-path-from-sip-and-codecs-to-e911-4c2p</link>
      <guid>https://dev.to/gokul_krishna_5cb68b2138c/voip-vs-pstn-for-business-what-changes-in-the-call-path-from-sip-and-codecs-to-e911-4c2p</guid>
      <description>&lt;p&gt;&lt;strong&gt;Summary:&lt;/strong&gt; A traditional business phone line uses circuit-switched PSTN service, often delivered over copper, with a dedicated path for each call. VoIP turns voice into packets, uses SIP to set up calls and RTP to carry audio, and reaches the PSTN through a provider's gateways. For businesses this means lower cost and location independence, in exchange for new responsibilities: network quality, emergency address management and failover planning.&lt;/p&gt;

&lt;p&gt;Comparisons of VoIP and landlines usually focus on price. This article looks at what changes technically, which is what IT teams need to plan a migration.&lt;/p&gt;

&lt;h2&gt;
  
  
  The call path, side by side
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Traditional (PSTN):&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Desk phone -&amp;gt; on-prem PBX -&amp;gt; analog/digital trunk -&amp;gt; local exchange -&amp;gt; PSTN -&amp;gt; callee
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Each call gets a dedicated circuit. Quality is consistent because capacity is reserved.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Cloud VoIP:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Softphone/IP phone -&amp;gt; internet -&amp;gt; provider's SIP platform -&amp;gt; PSTN gateway -&amp;gt; callee
          (SIP signaling + RTP media over UDP)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;There is no reserved circuit. Quality depends on the network path between the user and the provider.&lt;/p&gt;

&lt;h2&gt;
  
  
  Signaling and media
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;SIP (Session Initiation Protocol)&lt;/strong&gt; sets up, modifies and ends calls (INVITE, 200 OK, ACK, BYE).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;SDP&lt;/strong&gt; inside SIP negotiates codecs and media ports.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;RTP&lt;/strong&gt; carries the audio; &lt;strong&gt;SRTP&lt;/strong&gt; encrypts it, and SIP over TLS protects signaling.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;NAT traversal&lt;/strong&gt; is a common source of one-way audio. Providers use techniques such as STUN, TURN or session border controllers.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Codecs and bandwidth
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Codec&lt;/th&gt;
&lt;th&gt;Payload bitrate&lt;/th&gt;
&lt;th&gt;Notes&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;G.711&lt;/td&gt;
&lt;td&gt;64 kbps&lt;/td&gt;
&lt;td&gt;PSTN-equivalent quality; with IP overhead roughly 80 to 90 kbps per direction&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;G.729&lt;/td&gt;
&lt;td&gt;8 kbps&lt;/td&gt;
&lt;td&gt;Compressed, roughly 30 kbps with overhead&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Opus&lt;/td&gt;
&lt;td&gt;Variable (about 6 to 510 kbps)&lt;/td&gt;
&lt;td&gt;Wideband, adapts to network conditions&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Bandwidth is rarely the constraint on a business connection. Jitter, packet loss and latency are.&lt;/p&gt;

&lt;h2&gt;
  
  
  Quality targets
&lt;/h2&gt;

&lt;p&gt;Common planning targets for voice:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;One-way latency under about 150 ms.&lt;/li&gt;
&lt;li&gt;Jitter under about 30 ms (a jitter buffer smooths the rest).&lt;/li&gt;
&lt;li&gt;Packet loss under about 1%.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Use QoS (DSCP marking, often EF for voice) on your LAN and avoid congested Wi-Fi for heavy phone users.&lt;/p&gt;

&lt;h2&gt;
  
  
  Emergency calling
&lt;/h2&gt;

&lt;p&gt;In the US, Kari's Law requires multi-line telephone systems to allow direct 911 dialing and to notify a central point when 911 is called. RAY BAUM'S Act rules require a dispatchable location to be sent with 911 calls. For VoIP and remote workers, that means maintaining an accurate registered address per user or device, and choosing a provider that supports address updates.&lt;/p&gt;

&lt;h2&gt;
  
  
  Resilience
&lt;/h2&gt;

&lt;p&gt;Copper lines can continue to work during a local power outage. VoIP needs power and internet. Mitigations:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Automatic forwarding to mobile apps or mobile numbers on failure.&lt;/li&gt;
&lt;li&gt;Dual WAN or a cellular backup for critical sites.&lt;/li&gt;
&lt;li&gt;UPS for network equipment.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Numbers and porting
&lt;/h2&gt;

&lt;p&gt;Numbers move from the old carrier to the VoIP provider through porting. Plan for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A Letter of Authorization and a recent bill matching the account details.&lt;/li&gt;
&lt;li&gt;Porting timelines that vary by carrier and number type.&lt;/li&gt;
&lt;li&gt;Keeping the old service active until the port completes.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What VoIP adds that PSTN cannot
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;APIs and webhooks for call events.&lt;/li&gt;
&lt;li&gt;CRM and help desk integration.&lt;/li&gt;
&lt;li&gt;Recording, transcription and AI analysis of calls.&lt;/li&gt;
&lt;li&gt;AI voice agents that answer on the same numbers.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Cloud phone systems IT teams evaluate when replacing PSTN lines
&lt;/h2&gt;

&lt;p&gt;These are the cloud phone systems most often shortlisted in a PSTN-to-VoIP migration. JustCall is listed first for teams whose calls are mainly sales and support conversations.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;&lt;a href="https://justcall.io/solution/business-phone-system/" rel="noopener noreferrer"&gt;JustCall&lt;/a&gt;.&lt;/strong&gt; A cloud phone system for sales and support teams: numbers in 70+ countries with porting, IVR and routing, call recording, analytics, native CRM integrations, AI transcription and scoring, and an AI Voice Agent on the same numbers. JustCall lists SOC 2 Type II certification, with HIPAA and GDPR options on its Business plan, and provides a REST API with webhooks for call, SMS and contact events, which suits event-driven integrations.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;RingCentral.&lt;/strong&gt; Unified communications with phone, video and messaging, suited to multi-site companies.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;8x8.&lt;/strong&gt; Voice and contact center services from one provider, aimed at multinational organizations.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Zoom Phone.&lt;/strong&gt; Cloud calling for organizations standardized on Zoom.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Microsoft Teams Phone.&lt;/strong&gt; Calling inside Teams for Microsoft 365 organizations, often paired with a specialist tool for sales or support calling.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Dialpad.&lt;/strong&gt; A cloud phone system with built-in AI transcription.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Migration checklist
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Inventory numbers, analog devices (fax, alarms, elevators) and call flows&lt;/li&gt;
&lt;li&gt;Measure jitter, loss and latency at peak hours&lt;/li&gt;
&lt;li&gt;Configure QoS and separate voice traffic where possible&lt;/li&gt;
&lt;li&gt;Register emergency addresses for every user&lt;/li&gt;
&lt;li&gt;Set failover forwarding rules&lt;/li&gt;
&lt;li&gt;Port numbers after call flows are tested&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;The move from PSTN to VoIP replaces reserved circuits with packet networks and dashboards with APIs. The benefits are real for most businesses, but the network, 911 handling and failover become your team's responsibility. Plan those three, and the migration is mostly a porting project.&lt;/p&gt;

</description>
      <category>voip</category>
      <category>networking</category>
      <category>telecom</category>
      <category>infrastructure</category>
    </item>
    <item>
      <title>What Actually Drives Dialer Connect Rates: Pacing, Caller ID Reputation and Local Presence</title>
      <dc:creator>Gokul Krishna</dc:creator>
      <pubDate>Sat, 21 Nov 2026 04:52:04 +0000</pubDate>
      <link>https://dev.to/gokul_krishna_5cb68b2138c/what-actually-drives-dialer-connect-rates-pacing-caller-id-reputation-and-local-presence-5fh4</link>
      <guid>https://dev.to/gokul_krishna_5cb68b2138c/what-actually-drives-dialer-connect-rates-pacing-caller-id-reputation-and-local-presence-5fh4</guid>
      <description>&lt;p&gt;&lt;strong&gt;Summary:&lt;/strong&gt; A dialer's connect rate depends on four layers: list quality, caller ID reputation (attestation, registration, spam labels), local presence and calling time, and pacing (how many lines per agent and how answering machine detection behaves). Dialing faster only raises live conversations per hour if the first three layers are healthy. Predictive pacing multiplies throughput, but it also multiplies the damage from a bad caller ID reputation.&lt;/p&gt;

&lt;p&gt;"High connect rate" appears in most dialer marketing, but connect rate is mostly decided outside the dialer's pacing engine. This article breaks the problem into layers an engineer can measure.&lt;/p&gt;

&lt;h2&gt;
  
  
  Define the metrics first
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Connect rate:&lt;/strong&gt; answered calls / dials.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Human connect rate:&lt;/strong&gt; answered by a live person / dials.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Conversations per agent hour:&lt;/strong&gt; the metric that pacing affects most.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Abandonment rate:&lt;/strong&gt; live answers not connected to an agent within the allowed time / live answers.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Teams often compare connect rates calculated differently. Agree on definitions before benchmarking tools.&lt;/p&gt;

&lt;h2&gt;
  
  
  Layer 1: list quality
&lt;/h2&gt;

&lt;p&gt;Wrong numbers, disconnected lines and contacts without consent lower every downstream metric. Validate numbers, remove duplicates, check DNC status, and track connect rate by list source.&lt;/p&gt;

&lt;h2&gt;
  
  
  Layer 2: caller ID reputation
&lt;/h2&gt;

&lt;p&gt;Carriers and analytics engines decide whether your call shows a "Spam Likely" label. Inputs include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;STIR/SHAKEN attestation:&lt;/strong&gt; a signed assertion that the originating provider knows the caller has the right to use the number. Full (A-level) attestation helps.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Number registration&lt;/strong&gt; with carrier and analytics registries.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Call patterns:&lt;/strong&gt; high volume from one number, short call durations and low answer rates look like robocalling.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Complaints:&lt;/strong&gt; recipients marking calls as spam.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Engineering controls:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;number&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="n"&gt;outbound_pool&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="nf"&gt;answer_rate&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;number&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;last_7d&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="n"&gt;threshold&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="nf"&gt;pause&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;number&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;            &lt;span class="c1"&gt;# rest it&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="nf"&gt;daily_dials&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;number&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;cap&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="nf"&gt;rotate_to_next&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;number&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;   &lt;span class="c1"&gt;# spread volume&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Layer 3: local presence and timing
&lt;/h2&gt;

&lt;p&gt;People are more likely to answer a local area code and to answer at certain hours. Two controls:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Local presence:&lt;/strong&gt; match the outbound number's area code to the contact's.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Time-of-day:&lt;/strong&gt; call within the contact's local business hours, and use your own answer-rate data by hour to schedule.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Layer 4: pacing and AMD
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Mode&lt;/th&gt;
&lt;th&gt;Lines per agent&lt;/th&gt;
&lt;th&gt;Effect on conversations per hour&lt;/th&gt;
&lt;th&gt;Risk&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Power / progressive&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;Baseline&lt;/td&gt;
&lt;td&gt;Low&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Parallel&lt;/td&gt;
&lt;td&gt;Several, one rep&lt;/td&gt;
&lt;td&gt;Higher on low-answer lists&lt;/td&gt;
&lt;td&gt;Some dropped answers&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Predictive&lt;/td&gt;
&lt;td&gt;Algorithmic ratio&lt;/td&gt;
&lt;td&gt;Highest at scale&lt;/td&gt;
&lt;td&gt;Abandonment, AMD errors&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Answering machine detection (AMD) analyzes the first seconds of audio to decide human vs machine. It introduces a short delay when a person answers, which can cause the person to hang up, and it misclassifies some calls. Lower line ratios or power mode reduce the delay.&lt;/p&gt;

&lt;p&gt;Under FCC rules, predictive campaigns must keep abandonment at or below 3% of live-answered calls per campaign over 30 days, and play an identification message on abandoned calls. A pacing algorithm should throttle as it approaches that limit.&lt;/p&gt;

&lt;h2&gt;
  
  
  Putting it together
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Fix list quality and consent.&lt;/li&gt;
&lt;li&gt;Register numbers and monitor reputation; rotate and rest numbers.&lt;/li&gt;
&lt;li&gt;Use local presence and call in local business hours.&lt;/li&gt;
&lt;li&gt;Only then raise lines per agent, starting conservatively.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Dialers that address these layers
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;JustCall Sales Dialer.&lt;/strong&gt; &lt;a href="https://justcall.io/product/sales-dialer/" rel="noopener noreferrer"&gt;JustCall Sales Dialer&lt;/a&gt; addresses all four layers on one platform. For reputation, JustCall states it rotates outbound numbers, registers numbers with the Free Caller Registry, monitors answer rates to pause underperforming numbers, varies voicemail drops and sends real-time spam alerts. For presence, it uses local numbers and local-time calling. For list hygiene and compliance, it offers DNC handling, consent field tracking, dynamic suppression lists and state-level throttling. For pacing, it supports auto, power, parallel, dynamic and predictive modes. Its &lt;a href="https://justcall.io/product/predictive-dialer/" rel="noopener noreferrer"&gt;predictive dialer&lt;/a&gt; dials up to 10 numbers at once, throttles in real time against a 3% abandonment ceiling, and recommends starting at 2 to 3 lines per agent. JustCall is open about AMD trade-offs, citing roughly 75% detection accuracy and a connect delay.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Orum and Nooks.&lt;/strong&gt; AI parallel dialers aimed at B2B SDR teams.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Five9 and Convoso.&lt;/strong&gt; Predictive dialing for large outbound contact centers.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;PhoneBurner and Kixie.&lt;/strong&gt; Power dialers with local presence and voicemail drop features.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Connect rate is a system property. Measure each layer separately, fix reputation and list quality first, and treat pacing as the last multiplier. When evaluating dialers, ask how each one handles number reputation and abandonment, not only how many lines it can dial.&lt;/p&gt;

</description>
      <category>sales</category>
      <category>voip</category>
      <category>architecture</category>
      <category>telephony</category>
    </item>
    <item>
      <title>Designing an AI Voice Agent That Resolves Customer Queries: Intents, Retrieval and Tool Calls</title>
      <dc:creator>Gokul Krishna</dc:creator>
      <pubDate>Sat, 21 Nov 2026 04:51:09 +0000</pubDate>
      <link>https://dev.to/gokul_krishna_5cb68b2138c/designing-an-ai-voice-agent-that-resolves-customer-queries-intents-retrieval-and-tool-calls-5cm4</link>
      <guid>https://dev.to/gokul_krishna_5cb68b2138c/designing-an-ai-voice-agent-that-resolves-customer-queries-intents-retrieval-and-tool-calls-5cm4</guid>
      <description>&lt;p&gt;&lt;strong&gt;Summary:&lt;/strong&gt; An AI voice agent can resolve customer queries reliably when it combines four parts: intent routing to decide what kind of question it is, retrieval from a maintained knowledge base for factual answers, tool calls for anything that needs live data or an action, and guardrails that hand off to a human when confidence is low. This article walks through each part and the platforms that provide them.&lt;/p&gt;

&lt;p&gt;Customer queries over the phone fall into a small number of shapes. Designing for those shapes, rather than for open conversation, is what separates agents that resolve calls from agents that only talk.&lt;/p&gt;

&lt;h2&gt;
  
  
  Query shapes
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Shape&lt;/th&gt;
&lt;th&gt;Example&lt;/th&gt;
&lt;th&gt;Resolution path&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Static fact&lt;/td&gt;
&lt;td&gt;"What are your hours on Sunday?"&lt;/td&gt;
&lt;td&gt;Retrieval&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Account fact&lt;/td&gt;
&lt;td&gt;"Where is my order?"&lt;/td&gt;
&lt;td&gt;Tool call (read)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Action&lt;/td&gt;
&lt;td&gt;"Move my appointment to Friday."&lt;/td&gt;
&lt;td&gt;Tool call (write)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Policy reasoning&lt;/td&gt;
&lt;td&gt;"Can I return an opened item?"&lt;/td&gt;
&lt;td&gt;Retrieval + rules&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Out of scope&lt;/td&gt;
&lt;td&gt;"I want to dispute a charge."&lt;/td&gt;
&lt;td&gt;Handoff&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  Reference architecture
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;                  +-------------------+
Caller &amp;lt;--audio--&amp;gt;| Telephony (SIP)   |
                  +---------+---------+
                            |
                  +---------v---------+
                  | STT (streaming)   |
                  +---------+---------+
                            |
                  +---------v---------+       +----------------+
                  | Orchestrator/LLM  |&amp;lt;-----&amp;gt;| Knowledge index |
                  | - intent router   |       +----------------+
                  | - policy prompts  |       +----------------+
                  | - tool calling    |&amp;lt;-----&amp;gt;| CRM / OMS / Cal |
                  +---------+---------+       +----------------+
                            |
                  +---------v---------+
                  | TTS (streaming)   |
                  +-------------------+
                            |
               Post-call: transcript, summary, disposition -&amp;gt; CRM
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Intent routing
&lt;/h2&gt;

&lt;p&gt;A lightweight router classifies each turn into one of the shapes above. Routing first has three benefits:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Static questions skip tool calls, which lowers latency.&lt;/li&gt;
&lt;li&gt;Out-of-scope intents go to a human immediately.&lt;/li&gt;
&lt;li&gt;Analytics can report containment by intent, which is the metric you will tune against.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Retrieval for voice
&lt;/h2&gt;

&lt;p&gt;Retrieval for a voice agent is different from retrieval for a chatbot:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Answers must be short.&lt;/strong&gt; Store a spoken-friendly answer field alongside the source text.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Freshness matters.&lt;/strong&gt; Opening hours and prices change. Schedule re-indexing of source URLs.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Numbers need normalization.&lt;/strong&gt; Store prices and times in formats TTS reads correctly.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Tool calls
&lt;/h2&gt;

&lt;p&gt;Design tools around customer intents, not your database schema.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;"name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"get_order_status"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"description"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"Return status and ETA for the caller's most recent order"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"parameters"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"object"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nl"&gt;"properties"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;"phone"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"string"&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nl"&gt;"required"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"phone"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Guidelines:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Return compact results (status, ETA) rather than full records.&lt;/li&gt;
&lt;li&gt;Put a timeout on every tool and give the model a fallback line.&lt;/li&gt;
&lt;li&gt;Make write tools idempotent and confirm before executing ("I'll move your appointment to Friday at 3. Shall I go ahead?").&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Guardrails and handoff
&lt;/h2&gt;

&lt;p&gt;Hand off when:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The caller asks for a person.&lt;/li&gt;
&lt;li&gt;The intent is on a deny list (disputes, cancellations, safety).&lt;/li&gt;
&lt;li&gt;The model fails to resolve after two attempts.&lt;/li&gt;
&lt;li&gt;Sentiment drops sharply.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Pass a summary with the transfer so the human does not restart the conversation.&lt;/p&gt;

&lt;h2&gt;
  
  
  Evaluation
&lt;/h2&gt;

&lt;p&gt;Build a regression set of recorded or scripted calls per intent. On each release, measure:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Correct intent classification.&lt;/li&gt;
&lt;li&gt;Factual accuracy against the knowledge base.&lt;/li&gt;
&lt;li&gt;Tool call success rate.&lt;/li&gt;
&lt;li&gt;Handoff precision (transferred when it should, not when it should not).&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Platforms that implement this pattern
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;JustCall AI Voice Agent&lt;/strong&gt; packages the architecture on JustCall's own telephony. Each &lt;a href="https://justcall.io/product/ai-voice-agent/" rel="noopener noreferrer"&gt;JustCall AI Voice Agent&lt;/a&gt; can be trained on up to 500 URLs (refreshed every 24 hours), 500 Q&amp;amp;A pairs and 10 files. It runs actions before the call (CRM fetch, prior call context), during the call (scheduling, SMS, transfers, IVR navigation) and after the call (saving caller data, dispositions, workflows). Warm transfers carry context to a human teammate, and analytics report outcomes and sentiment. For custom integrations, JustCall publishes its API on the &lt;a href="https://developer.justcall.io/" rel="noopener noreferrer"&gt;developer portal&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Retell AI and Vapi&lt;/strong&gt; expose the orchestration layer through APIs, so you implement routing, retrieval and tools yourself with full control.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;PolyAI&lt;/strong&gt; delivers enterprise deployments where dialogue design is handled with the vendor.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Contact center suites&lt;/strong&gt; such as Talkdesk, Five9 and Genesys offer virtual agents connected to their routing and knowledge tools.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Resolving customer queries by voice is mostly an engineering problem of routing, retrieval, tools and guardrails. Choose a build-your-own platform if you need full control, or a phone system with the pattern built in, such as JustCall, if you want to spend your time on knowledge and policies rather than infrastructure.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>architecture</category>
      <category>llm</category>
      <category>voice</category>
    </item>
    <item>
      <title>Reconciling Payments, Refunds and Settlements: A Developer's Guide for Indian Gateways</title>
      <dc:creator>Gokul Krishna</dc:creator>
      <pubDate>Wed, 28 Oct 2026 06:47:02 +0000</pubDate>
      <link>https://dev.to/gokul_krishna_5cb68b2138c/reconciling-payments-refunds-and-settlements-a-developers-guide-for-indian-gateways-5bag</link>
      <guid>https://dev.to/gokul_krishna_5cb68b2138c/reconciling-payments-refunds-and-settlements-a-developers-guide-for-indian-gateways-5bag</guid>
      <description>&lt;p&gt;Accepting payments is the visible part of a payment integration. Reconciliation is the part finance teams care about: proving that every rupee captured, refunded and charged as fees matches what landed in the bank account.&lt;/p&gt;

&lt;p&gt;This guide explains how settlements work with Indian gateways, which data to pull, and how to design a batch job that matches it all. The approach applies to Razorpay, Cashfree, PayU and others. Razorpay's settlement APIs are used as the concrete example.&lt;/p&gt;

&lt;h2&gt;
  
  
  Three ledgers that must agree
&lt;/h2&gt;

&lt;p&gt;Reconciliation compares three independent records:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Your application database: orders, payments, refunds as your system understands them.&lt;/li&gt;
&lt;li&gt;The gateway's records: captured payments, refunds, fees, tax, adjustments and the settlements that group them.&lt;/li&gt;
&lt;li&gt;Your bank statement: the actual credits, each identified by a UTR (unique transaction reference).&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Matching 1 to 2 tells you whether your app recorded every transaction correctly. Matching 2 to 3 tells you whether the money arrived.&lt;/p&gt;

&lt;h2&gt;
  
  
  How a settlement is built
&lt;/h2&gt;

&lt;p&gt;Gateways do not send each payment to your bank individually. They batch transactions into settlements on a schedule. For Indian domestic payments, Razorpay's &lt;a href="https://razorpay.com/docs/payments/settlements/faqs/" rel="noopener noreferrer"&gt;settlement FAQs&lt;/a&gt; describe a default T+2 working day cycle, where T is the capture date. Working days exclude Sundays, the second and fourth Saturdays, and bank holidays, so long weekends shift settlements.&lt;/p&gt;

&lt;p&gt;Conceptually, each settlement amount is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;settled = captured payments
        - gateway fees
        - tax on fees
        - refunds
        +/- adjustments
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Only captured payments are settled. Authorized but uncaptured payments do not appear.&lt;/p&gt;

&lt;h2&gt;
  
  
  Pulling settlement data
&lt;/h2&gt;

&lt;p&gt;The most useful endpoint for reconciliation returns line items, not just totals. Razorpay's &lt;a href="https://razorpay.com/docs/api/settlements/fetch-recon/" rel="noopener noreferrer"&gt;settlement recon API&lt;/a&gt; is GET /v1/settlements/recon/combined with year and month as required parameters, plus optional day, count (up to 1000) and skip for pagination.&lt;/p&gt;

&lt;p&gt;Each record includes fields such as entity_id, type (payment, refund, transfer or adjustment), debit, credit, amount, fee, tax, settled, settlement_id, settlement_utr and order_receipt. All amounts are in paise.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;requests&lt;/span&gt;

&lt;span class="n"&gt;URL&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;https://api.razorpay.com/v1/settlements/recon/combined&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;

&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;fetch_recon&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;key_id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;key_secret&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;year&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;month&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;day&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="n"&gt;rows&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;skip&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[],&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;
    &lt;span class="k"&gt;while&lt;/span&gt; &lt;span class="bp"&gt;True&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="n"&gt;resp&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;requests&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;URL&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;auth&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;key_id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;key_secret&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="n"&gt;params&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;year&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;year&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;month&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;month&lt;/span&gt;&lt;span class="si"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;02&lt;/span&gt;&lt;span class="n"&gt;d&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;day&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;day&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;count&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1000&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;skip&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;skip&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="p"&gt;},&lt;/span&gt; &lt;span class="n"&gt;timeout&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;30&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="n"&gt;resp&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;raise_for_status&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
        &lt;span class="n"&gt;items&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;resp&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;json&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;items&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;[])&lt;/span&gt;
        &lt;span class="n"&gt;rows&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;extend&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;items&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="nf"&gt;len&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;items&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="mi"&gt;1000&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;rows&lt;/span&gt;
        &lt;span class="n"&gt;skip&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="mi"&gt;1000&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The call uses HTTP basic authentication with your API key ID and key secret, so run it only on the server and load the credentials from a secrets store. Paginate until a page returns fewer rows than you asked for, because a busy day can easily exceed a single page.&lt;/p&gt;

&lt;p&gt;Store these rows as is, in a staging table, before transforming them. Raw data makes later investigations much easier.&lt;/p&gt;

&lt;p&gt;The order_receipt field is worth planning for at integration time. If you pass your internal order ID as the receipt when creating orders, every settled payment row carries a direct pointer back to your database.&lt;/p&gt;

&lt;h2&gt;
  
  
  Fees and GST
&lt;/h2&gt;

&lt;p&gt;Gateway fees are deducted at source, and GST is charged on the fee. In Razorpay's &lt;a href="https://razorpay.com/docs/api/payments/fetch-with-id/" rel="noopener noreferrer"&gt;payment entity&lt;/a&gt;, fee is the total charged including tax, and tax is the tax component. In the recon data, fee is the processing fee and tax is the tax on that fee.&lt;/p&gt;

&lt;p&gt;Two practical points:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Do not hard-code a fee percentage in your reconciliation logic. Rates vary by method, card type and negotiated pricing. Read the fee from the data.&lt;/li&gt;
&lt;li&gt;Keep fee and tax as separate columns. Finance teams typically need the tax total to tie back to the gateway's tax invoice for the period.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Your expected net for a payment is amount minus fee, where fee already includes tax. Getting that relationship wrong, by subtracting tax twice, is a common source of small, persistent mismatches.&lt;/p&gt;

&lt;h2&gt;
  
  
  Refunds and adjustments
&lt;/h2&gt;

&lt;p&gt;Refunds appear as debit rows in settlement data, linked to the original payment through payment_id. They reduce the settlement for the period in which they are processed, not the period of the original payment.&lt;/p&gt;

&lt;p&gt;Track refund status separately from payment status. Razorpay refunds move through pending, processed and failed, and its &lt;a href="https://razorpay.com/docs/webhooks/refunds/" rel="noopener noreferrer"&gt;refund webhooks&lt;/a&gt; include refund.created, refund.processed, refund.failed and refund.speed_changed. A payment's refund_status of partial or full tells you how much has been reversed overall.&lt;/p&gt;

&lt;p&gt;Adjustments are the catch-all: corrections and other manual entries, which can include dispute-related debits depending on the gateway. Never auto-match them. Route every adjustment row to a human review queue with its description.&lt;/p&gt;

&lt;h2&gt;
  
  
  Matching bank credits
&lt;/h2&gt;

&lt;p&gt;The settlement UTR is the bridge between gateway and bank. When Razorpay transfers a settlement, it fires the settlement.processed webhook, described in the &lt;a href="https://razorpay.com/docs/webhooks/settlements/" rel="noopener noreferrer"&gt;settlement webhook reference&lt;/a&gt;, with the settlement id, amount, fees, tax and utr.&lt;/p&gt;

&lt;p&gt;Match on UTR first, then confirm the amount:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;match_bank_credit&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;stmt_line&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;settlements_by_utr&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="n"&gt;s&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;settlements_by_utr&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;stmt_line&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;utr&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;s&lt;/span&gt; &lt;span class="ow"&gt;is&lt;/span&gt; &lt;span class="bp"&gt;None&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="nf"&gt;return &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;unmatched_bank_credit&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;stmt_line&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;amount&lt;/span&gt; &lt;span class="o"&gt;!=&lt;/span&gt; &lt;span class="n"&gt;stmt_line&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;amount_paise&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="nf"&gt;return &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;amount_mismatch&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;stmt_line&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="nf"&gt;return &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;matched&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Bank statement formats vary. Normalise the UTR (trim spaces, uppercase) and convert amounts to paise before comparing, so floating point rupees never enter the comparison.&lt;/p&gt;

&lt;h2&gt;
  
  
  Designing the batch job
&lt;/h2&gt;

&lt;p&gt;A daily job works well for most businesses. A reasonable shape:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Pull recon rows for the previous few days, not just yesterday, to catch late entries.&lt;/li&gt;
&lt;li&gt;Upsert into staging keyed by entity_id and settlement_id, so reruns are safe.&lt;/li&gt;
&lt;li&gt;Match payment rows to your orders using order_receipt or the gateway order ID.&lt;/li&gt;
&lt;li&gt;Match refund rows to your refund records using the refund ID.&lt;/li&gt;
&lt;li&gt;Sum each settlement's rows and compare with the settlement amount.&lt;/li&gt;
&lt;li&gt;Match settlements to bank credits by UTR.&lt;/li&gt;
&lt;li&gt;Write every unmatched or mismatched item to an exceptions table with a reason code.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Run the job in IST and store timestamps in UTC. Date boundaries are a frequent cause of rows appearing in the "wrong" day.&lt;/p&gt;

&lt;h2&gt;
  
  
  Common mismatch causes
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;A payment captured in your app but not yet settled, because of the T+2 cycle or a holiday.&lt;/li&gt;
&lt;li&gt;A refund initiated from the dashboard and never recorded in your database.&lt;/li&gt;
&lt;li&gt;Partial settlements, where only part of the pending amount is settled in one transfer.&lt;/li&gt;
&lt;li&gt;Transactions on hold, flagged by on_hold in recon data.&lt;/li&gt;
&lt;li&gt;Late-authorised payments that your app recorded as failed.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Each of these resolves itself or needs a known action. The exceptions table should make the next step obvious.&lt;/p&gt;

&lt;h2&gt;
  
  
  Summary
&lt;/h2&gt;

&lt;p&gt;Good reconciliation is mostly data hygiene: pass your own IDs to the gateway, store raw settlement rows, work in paise, keep fee and tax separate, and match bank credits by UTR. Build the job to be rerunnable, and route anything ambiguous to people rather than guessing.&lt;/p&gt;

&lt;p&gt;Disclosure: The author works with the Razorpay team on content.&lt;/p&gt;

</description>
      <category>payments</category>
      <category>backend</category>
      <category>python</category>
      <category>database</category>
    </item>
    <item>
      <title>Idempotent Payment Processing: Handling Duplicate Webhooks, Retries and Race Conditions</title>
      <dc:creator>Gokul Krishna</dc:creator>
      <pubDate>Wed, 21 Oct 2026 08:58:42 +0000</pubDate>
      <link>https://dev.to/gokul_krishna_5cb68b2138c/idempotent-payment-processing-handling-duplicate-webhooks-retries-and-race-conditions-4ng2</link>
      <guid>https://dev.to/gokul_krishna_5cb68b2138c/idempotent-payment-processing-handling-duplicate-webhooks-retries-and-race-conditions-4ng2</guid>
      <description>&lt;p&gt;Payment systems fail in a particular way. The money moves correctly, but your application credits the customer twice, ships an order twice, or marks a paid order as failed. These bugs usually come from three sources: duplicate webhooks, retried API calls and concurrent code paths racing on the same order.&lt;/p&gt;

&lt;p&gt;This article covers the patterns that prevent them. They apply to any gateway. Razorpay's documented behaviour is used as the concrete example.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why duplicates are normal, not exceptional
&lt;/h2&gt;

&lt;p&gt;Webhook delivery is at least once. Razorpay's &lt;a href="https://razorpay.com/docs/webhooks/best-practices/" rel="noopener noreferrer"&gt;webhook best practices&lt;/a&gt; are explicit about what that means in practice:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The same event can be delivered more than once, and this is expected.&lt;/li&gt;
&lt;li&gt;Any non-2xx response is treated as a failure and retried.&lt;/li&gt;
&lt;li&gt;If your server does not respond within 5 seconds, the delivery is marked as a timeout and sent again, even if you actually processed it.&lt;/li&gt;
&lt;li&gt;Retries follow exponential backoff for 24 hours.&lt;/li&gt;
&lt;li&gt;Events may arrive out of order.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So your handler must produce the same end state whether it sees an event once, three times, or after a later event has already arrived.&lt;/p&gt;

&lt;h2&gt;
  
  
  Layer 1: Deduplicate by event ID
&lt;/h2&gt;

&lt;p&gt;Most gateways attach a unique identifier to each event. Razorpay sends it in the &lt;code&gt;x-razorpay-event-id&lt;/code&gt; header. Record it with a unique constraint, inside the same transaction as the work it triggers:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;CREATE&lt;/span&gt; &lt;span class="k"&gt;TABLE&lt;/span&gt; &lt;span class="n"&gt;processed_events&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="n"&gt;event_id&lt;/span&gt;    &lt;span class="nb"&gt;TEXT&lt;/span&gt; &lt;span class="k"&gt;PRIMARY&lt;/span&gt; &lt;span class="k"&gt;KEY&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;event_type&lt;/span&gt;  &lt;span class="nb"&gt;TEXT&lt;/span&gt; &lt;span class="k"&gt;NOT&lt;/span&gt; &lt;span class="k"&gt;NULL&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;received_at&lt;/span&gt; &lt;span class="n"&gt;TIMESTAMPTZ&lt;/span&gt; &lt;span class="k"&gt;NOT&lt;/span&gt; &lt;span class="k"&gt;NULL&lt;/span&gt; &lt;span class="k"&gt;DEFAULT&lt;/span&gt; &lt;span class="n"&gt;now&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;handleEvent&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;eventId&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;event&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;db&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;tx&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;async &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;t&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;inserted&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;t&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;result&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
      &lt;span class="s2"&gt;`INSERT INTO processed_events (event_id, event_type)
       VALUES ($1, $2) ON CONFLICT DO NOTHING`&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;eventId&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;event&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;event&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
    &lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;inserted&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;rowCount&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// already handled&lt;/span&gt;
    &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;applyEvent&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;t&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;event&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Do not check with a SELECT and then insert. Two deliveries arriving together can both pass the SELECT. Let the database constraint decide.&lt;/p&gt;

&lt;h2&gt;
  
  
  Layer 2: Make the business effect idempotent
&lt;/h2&gt;

&lt;p&gt;Event-ID deduplication is necessary but not sufficient. Different events can describe the same business fact. For example, Razorpay fires both &lt;code&gt;payment.captured&lt;/code&gt; and &lt;code&gt;order.paid&lt;/code&gt; when a payment on an order is captured. If both handlers fulfil the order, you ship twice.&lt;/p&gt;

&lt;p&gt;Key every side effect by the business entity, not the event:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;One fulfilment per order: a unique constraint on &lt;code&gt;fulfilments(order_id)&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;One ledger credit per payment: a unique constraint on &lt;code&gt;ledger_entries(payment_id, entry_type)&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;One refund per refund request: your own refund request ID, stored before calling the gateway.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;With these constraints in place, a duplicate that slips through still cannot create a second row.&lt;/p&gt;

&lt;h2&gt;
  
  
  Layer 3: Idempotent outbound calls
&lt;/h2&gt;

&lt;p&gt;Retries also happen in the other direction. Your server calls the gateway, the network times out, and you do not know whether the request succeeded.&lt;/p&gt;

&lt;p&gt;Some APIs accept an idempotency key header for this. Where an API does not, look for a field that serves the same purpose. Razorpay's &lt;a href="https://razorpay.com/docs/api/refunds/create-normal/" rel="noopener noreferrer"&gt;create refund API&lt;/a&gt; accepts a &lt;code&gt;receipt&lt;/code&gt; value, and the documented errors include "Duplicate receipt found for this refund request", so passing your own refund request ID as the receipt protects against double refunds on retry.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;requests&lt;/span&gt;

&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;refund&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;payment_id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;request_id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;amount_paise&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="n"&gt;resp&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;requests&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;post&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;https://api.razorpay.com/v1/payments/&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;payment_id&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;/refund&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;auth&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;KEY_ID&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;KEY_SECRET&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
        &lt;span class="n"&gt;json&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;amount&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;amount_paise&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;receipt&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;request_id&lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;
        &lt;span class="n"&gt;timeout&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;30&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;resp&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;json&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;  &lt;span class="c1"&gt;# retry with the same request_id on timeout
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For order creation, store the gateway order ID against your internal order the first time, and reuse it on retry rather than creating a new one.&lt;/p&gt;

&lt;h2&gt;
  
  
  Order and payment state machines
&lt;/h2&gt;

&lt;p&gt;Orders and payments are separate entities with separate lifecycles. Conflating them is a common source of state bugs.&lt;/p&gt;

&lt;p&gt;Razorpay's &lt;a href="https://razorpay.com/docs/payments/orders/" rel="noopener noreferrer"&gt;orders documentation&lt;/a&gt; describes order states of created, attempted and paid. An order can have several payment attempts, but only one successful payment. Payments move through created, authorized, captured, refunded and failed.&lt;/p&gt;

&lt;p&gt;Model your own order as a state machine with allowed transitions, and apply updates only when they move forward:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;NEXT&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;pending&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;paid&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;failed&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
  &lt;span class="na"&gt;failed&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;  &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;paid&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;          &lt;span class="c1"&gt;// late success is possible&lt;/span&gt;
  &lt;span class="na"&gt;paid&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;    &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;refunded&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;partially_refunded&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
  &lt;span class="na"&gt;partially_refunded&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;refunded&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;canMove&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;from&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;to&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;return &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;NEXT&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="k"&gt;from&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="p"&gt;[]).&lt;/span&gt;&lt;span class="nf"&gt;includes&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;to&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Note the transition from failed to paid. Razorpay documents &lt;a href="https://razorpay.com/docs/payments/payments/late-authorisation/" rel="noopener noreferrer"&gt;late authorisation&lt;/a&gt;: if the bank does not respond in time, a payment can be marked failed and later move to authorized when the bank confirms. Razorpay polls the bank for up to 3 days, and uncaptured payments where money was debited are refunded automatically. If your state machine treats failed as terminal, you can end up with a customer who paid but never received the order.&lt;/p&gt;

&lt;p&gt;Apply transitions with a conditional update so the database enforces them:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;UPDATE&lt;/span&gt; &lt;span class="n"&gt;orders&lt;/span&gt;
&lt;span class="k"&gt;SET&lt;/span&gt; &lt;span class="n"&gt;status&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'paid'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;payment_id&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="err"&gt;$&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;
&lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="n"&gt;id&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="err"&gt;$&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="k"&gt;AND&lt;/span&gt; &lt;span class="n"&gt;status&lt;/span&gt; &lt;span class="k"&gt;IN&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'pending'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'failed'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If zero rows are updated, someone else already moved the order. That is not an error; log it and return.&lt;/p&gt;

&lt;h2&gt;
  
  
  The callback versus webhook race
&lt;/h2&gt;

&lt;p&gt;On a successful checkout, two things usually happen almost at the same time. The browser returns to your app with the payment details, and the gateway sends a webhook to your server. Either can arrive first. Sometimes the browser never returns at all, because the user closed the tab.&lt;/p&gt;

&lt;p&gt;The fix is to route both paths through one function that is safe to run twice:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Verify the input. For Razorpay's checkout response, that means checking the payment signature; for the webhook, checking the webhook signature.&lt;/li&gt;
&lt;li&gt;Lock or conditionally update the order row.&lt;/li&gt;
&lt;li&gt;Apply the transition and side effects only if the order was not already paid.&lt;/li&gt;
&lt;li&gt;Return the current state to the caller.
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;markPaid&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;orderId&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;paymentId&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;db&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;tx&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;async &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;t&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;order&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;t&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;one&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
      &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;SELECT * FROM orders WHERE id = $1 FOR UPDATE&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;orderId&lt;/span&gt;&lt;span class="p"&gt;]);&lt;/span&gt;
    &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;order&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;status&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;paid&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;order&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;t&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;none&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
      &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;UPDATE orders SET status='paid', payment_id=$2 WHERE id=$1&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;orderId&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;paymentId&lt;/span&gt;&lt;span class="p"&gt;]);&lt;/span&gt;
    &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;t&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;none&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
      &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;INSERT INTO fulfilments (order_id) VALUES ($1) ON CONFLICT DO NOTHING&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;orderId&lt;/span&gt;&lt;span class="p"&gt;]);&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="p"&gt;...&lt;/span&gt;&lt;span class="nx"&gt;order&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;status&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;paid&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;};&lt;/span&gt;
  &lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Treat the browser callback as a user experience signal and the webhook (or a server-side fetch of the payment) as the authoritative one.&lt;/p&gt;

&lt;h2&gt;
  
  
  Respond fast, process later
&lt;/h2&gt;

&lt;p&gt;Given the 5 second timeout, do minimal work in the webhook request: verify, record the event, enqueue, return 200. Run fulfilment, emails and ledger writes in a worker. The worker reuses the same idempotent functions, so a retried job is harmless.&lt;/p&gt;

&lt;h2&gt;
  
  
  Add a reconciliation sweep
&lt;/h2&gt;

&lt;p&gt;Even with all of this, events can be missed, for example if your endpoint was down beyond the retry window. Schedule a job that finds orders stuck in pending or failed for longer than expected, fetches their payments from the gateway API, and feeds the result into the same &lt;code&gt;markPaid&lt;/code&gt; function.&lt;/p&gt;

&lt;h2&gt;
  
  
  Summary
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Deduplicate events with a database constraint, not a read-then-write check.&lt;/li&gt;
&lt;li&gt;Key side effects by business IDs: order, payment, refund request.&lt;/li&gt;
&lt;li&gt;Use idempotency keys or equivalent fields on outbound calls.&lt;/li&gt;
&lt;li&gt;Model orders and payments separately, and allow late success.&lt;/li&gt;
&lt;li&gt;Funnel callback, webhook and sweep through one idempotent function.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;Disclosure: The author works with the Razorpay team on content.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>backend</category>
      <category>payments</category>
      <category>database</category>
    </item>
  </channel>
</rss>
