<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Operations on Ulai Docs</title><link>https://docs.ulai.co.in/docs/sip/operations/</link><description>Recent content in Operations on Ulai Docs</description><generator>Hugo</generator><language>en</language><atom:link href="https://docs.ulai.co.in/docs/sip/operations/index.xml" rel="self" type="application/rss+xml"/><item><title>Deployment</title><link>https://docs.ulai.co.in/docs/sip/operations/deployment/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://docs.ulai.co.in/docs/sip/operations/deployment/</guid><description>&lt;p&gt;The gateway is distributed as a container image. A deployment is one container&#10;on a host with a routable public IP, run with host networking.&lt;/p&gt;&#10;&lt;h2 id="docker-run"&gt;docker run&lt;a class="td-heading-self-link" href="#docker-run" aria-label="Heading self-link"&gt;&lt;/a&gt;&lt;/h2&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-sh" data-lang="sh"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;docker run -d --name ulai-sip &lt;span class="se"&gt;\&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; -e &lt;span class="nv"&gt;ULAI_CONTROL_PLANE_URL&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;https://stgcp.ulai.co.in &lt;span class="se"&gt;\&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; -e &lt;span class="nv"&gt;SIP_ROUTING_REDIS_URL&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;redis://USER:PASSWORD@redis.ulai.co.in:6379&amp;#39;&lt;/span&gt; &lt;span class="se"&gt;\&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; -e &lt;span class="nv"&gt;SIP_PUBLIC_IP&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;148.113.58.51 &lt;span class="se"&gt;\&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; -e &lt;span class="nv"&gt;SIP_LISTEN_ADDR&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;0.0.0.0:5060 &lt;span class="se"&gt;\&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; -e &lt;span class="nv"&gt;SIP_TRANSPORT&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;udp &lt;span class="se"&gt;\&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; -e &lt;span class="nv"&gt;SIP_RTP_HOST&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;0.0.0.0 &lt;span class="se"&gt;\&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; -e &lt;span class="nv"&gt;SIP_RTP_PORT_LOW&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;10000&lt;/span&gt; &lt;span class="se"&gt;\&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; -e &lt;span class="nv"&gt;SIP_RTP_PORT_HIGH&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;10500&lt;/span&gt; &lt;span class="se"&gt;\&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; -e &lt;span class="nv"&gt;SIP_HTTP_PORT&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;8082&lt;/span&gt; &lt;span class="se"&gt;\&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; --network host &lt;span class="se"&gt;\&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; asia-south1-docker.pkg.dev/arctic-operand-415316/ulai/sip:v6&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Three things in that command are load-bearing:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;strong&gt;&lt;code&gt;--network host&lt;/code&gt;&lt;/strong&gt; — see &lt;a href="https://docs.ulai.co.in/docs/sip/operations/networking/"&gt;networking&lt;/a&gt;.&#10;Publishing the RTP range with &lt;code&gt;-p&lt;/code&gt; spawns hundreds of userland proxies and&#10;rewrites the INVITE&amp;rsquo;s source address, which the trunk ACL then rejects with&#10;&lt;code&gt;403&lt;/code&gt;.&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;&lt;code&gt;SIP_PUBLIC_IP&lt;/code&gt;&lt;/strong&gt; — the address the carrier is told to send media to. It must&#10;be the host&amp;rsquo;s own routable address, and never &lt;code&gt;0.0.0.0&lt;/code&gt;.&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;&lt;code&gt;SIP_RTP_HOST=0.0.0.0&lt;/code&gt;&lt;/strong&gt; — what the RTP sockets &lt;em&gt;bind&lt;/em&gt; to. On a cloud VM the&#10;public IP usually is not on any interface, so binding to it fails outright.&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;Pass secrets with &lt;code&gt;--env-file&lt;/code&gt; rather than &lt;code&gt;-e&lt;/code&gt; if the host&amp;rsquo;s process list is&#10;readable:&lt;/p&gt;</description></item><item><title>Networking</title><link>https://docs.ulai.co.in/docs/sip/operations/networking/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://docs.ulai.co.in/docs/sip/operations/networking/</guid><description>&lt;h2 id="ports"&gt;Ports&lt;a class="td-heading-self-link" href="#ports" aria-label="Heading self-link"&gt;&lt;/a&gt;&lt;/h2&gt;&#10;&lt;table&gt;&#10;&#9;&lt;thead&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;th&gt;Port&lt;/th&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;th&gt;Protocol&lt;/th&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;th&gt;Purpose&lt;/th&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&lt;/thead&gt;&#10;&#9;&lt;tbody&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;&lt;code&gt;8082&lt;/code&gt;&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;TCP&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;HTTP API — &lt;code&gt;/health&lt;/code&gt;, &lt;code&gt;/calls&lt;/code&gt;, &lt;code&gt;/sip/originate&lt;/code&gt;&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;&lt;code&gt;5060&lt;/code&gt;&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;UDP and/or TCP&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;SIP signalling (&lt;code&gt;5061&lt;/code&gt; conventionally for TLS)&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;&lt;code&gt;10000–10500&lt;/code&gt;&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;UDP&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;RTP media, one even port per call&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&lt;/tbody&gt;&#10;&lt;/table&gt;&#10;&lt;p&gt;The RTP range sizes the gateway&amp;rsquo;s concurrency: roughly 250 simultaneous calls at&#10;the default range, since allocation uses even ports only by RTCP convention.&#10;Widen &lt;code&gt;SIP_RTP_PORT_LOW&lt;/code&gt;/&lt;code&gt;HIGH&lt;/code&gt; to carry more.&lt;/p&gt;&#10;&lt;p&gt;The carrier must be able to reach &lt;code&gt;SIP_PUBLIC_IP&lt;/code&gt; on the SIP port &lt;strong&gt;and&lt;/strong&gt; the&#10;whole RTP range. A firewall that allows 5060 but not 10000–10500 produces a call&#10;that connects and then has no audio — the single most common misconfiguration.&lt;/p&gt;</description></item><item><title>Observability</title><link>https://docs.ulai.co.in/docs/sip/operations/observability/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://docs.ulai.co.in/docs/sip/operations/observability/</guid><description>&lt;h2 id="reading-the-log"&gt;Reading the log&lt;a class="td-heading-self-link" href="#reading-the-log" aria-label="Heading self-link"&gt;&lt;/a&gt;&lt;/h2&gt;&#10;&lt;p&gt;Every line of a call is prefixed with the number and the leg it arrived on, so&#10;a busy gateway&amp;rsquo;s log can be read one call at a time:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;[+919363399639] [sip-originate] call answered — call_id=3e114ad4…, joining room 527f78a3…&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;[+919363399639] [sfugw] webrtc state: connected&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;[+919363399639] [sfugw] DTMF: 5&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;[+919363399639] [sip-originate] call finished (session 527f78a3…, call_id 3e114ad4…)&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;table&gt;&#10;&#9;&lt;thead&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;th&gt;Prefix&lt;/th&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;th&gt;Emitted by&lt;/th&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&lt;/thead&gt;&#10;&#9;&lt;tbody&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;&lt;code&gt;[sip-gw]&lt;/code&gt;&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;The inbound path&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;&lt;code&gt;[sip-originate]&lt;/code&gt;&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;The outbound path&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;&lt;code&gt;[sfugw]&lt;/code&gt;&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;The room/WebRTC bridge&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;&lt;code&gt;[control-plane]&lt;/code&gt;&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;The control-plane wire log&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;&lt;code&gt;[runtime]&lt;/code&gt;&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Startup runtime tuning&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&lt;/tbody&gt;&#10;&lt;/table&gt;&#10;&lt;p&gt;&lt;code&gt;grep&lt;/code&gt; on the number gives one call; &lt;code&gt;grep&lt;/code&gt; on the &lt;code&gt;sip_call_id&lt;/code&gt; joins the&#10;gateway&amp;rsquo;s log to carrier CDRs and to the published telecom events.&lt;/p&gt;</description></item><item><title>Troubleshooting</title><link>https://docs.ulai.co.in/docs/sip/operations/troubleshooting/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://docs.ulai.co.in/docs/sip/operations/troubleshooting/</guid><description>&lt;h2 id="the-gateway-will-not-start"&gt;The gateway will not start&lt;a class="td-heading-self-link" href="#the-gateway-will-not-start" aria-label="Heading self-link"&gt;&lt;/a&gt;&lt;/h2&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;sip-sfu-gateway: ULAI_CONTROL_PLANE_URL is required (e.g. https://stgcp.ulai.co.in)&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;SIP_PUBLIC_IP must be a routable address, not 0.0.0.0 — it is advertised to the carrier&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Configuration is validated once, and every problem is reported together — fix&#10;them all, then restart. &lt;code&gt;0.0.0.0&lt;/code&gt; in &lt;code&gt;SIP_PUBLIC_IP&lt;/code&gt; is rejected on purpose: it&#10;is not a listen address, it is what the carrier is told to stream media to.&lt;/p&gt;&#10;&lt;p&gt;Other startup failures:&lt;/p&gt;</description></item></channel></rss>