<?xml version="1.0" encoding="utf-8"?>






<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0">
    <channel>
        <title>Telecom and Software Insights</title>
        <link>https://cloudtelcohub.com/</link>
        <description>Technical things around telecom and software</description>
        <generator>Hugo 0.135.0 https://gohugo.io/</generator>
        
            <language>en</language>
        
        
            <managingEditor>hyavari26@gmail.com (Hossein Yavari)</managingEditor>
        
        
            <webMaster>hyavari26@gmail.com (Hossein Yavari)</webMaster>
        
        
            <copyright>[Reposting requires attribution, **use canonical links** &gt;&gt;](https://en.wikipedia.org/wiki/Canonical_link_element)</copyright>
        
        <lastBuildDate>Wed, 15 Jul 2026 09:55:16 -0400</lastBuildDate>
        
            <atom:link rel="self" type="application/rss&#43;xml" href="https://cloudtelcohub.com/rss.xml" />
        
        
            <item>
                <title>Testing NTN Apps Without Waiting for a Satellite Pass</title>
                <link>https://cloudtelcohub.com/posts/ntn-in-a-box/</link>
                <guid isPermaLink="true">https://cloudtelcohub.com/posts/ntn-in-a-box/</guid>
                <pubDate>Tue, 14 Jul 2026 22:00:52 -0400</pubDate>
                
                    <author>hyavari26@gmail.com (Hossein Yavari)</author>
                
                <copyright>[Reposting requires attribution, **use canonical links** &gt;&gt;](https://en.wikipedia.org/wiki/Canonical_link_element)</copyright>
                
                    <description>&lt;div style=&#34;text-align: center;&#34;&gt;
  &lt;img src=&#34;https://cloudtelcohub.com/images/ntn-in-a-box/NTN-Satellites.jpg&#34; alt=&#34;NTN Satellites&#34; style=&#34;width:500px; max-width:100%; height:auto;&#34;/&gt;
&lt;/div&gt;
&lt;p&gt;I have been thinking about NTN from a very practical angle: if an app is supposed to work over satellite, how do we test it before the real network is available?&lt;/p&gt;
&lt;p&gt;That sounds simple, but it is not. A satellite link is not just &amp;ldquo;slow internet&amp;rdquo;. It can be available for a short window, become worse near the edge of coverage, disappear completely, and come back later. If we only test with normal Wi-Fi or a basic offline toggle, we miss a lot of the behavior that matters.&lt;/p&gt;
&lt;p&gt;That is why I started &lt;a href=&#34;https://github.com/hyavari/ntn-in-a-box&#34;&gt;NTN-in-a-Box&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The goal is not to simulate the radio layer. There are already good projects for PHY and RAN research. I wanted something closer to the developer workflow: run an app, put it behind NTN-like conditions, and see what breaks.&lt;/p&gt;
&lt;p&gt;&lt;img
src=&#34;/images/ntn-in-a-box/gui.png&#34;
alt=&#34;NTN-in-a-Box GUI showing satellite pass visualization and live link metrics&#34;
width=&#34;800&#34;
loading=&#34;lazy&#34;
/&gt;&lt;/p&gt;
&lt;h2 id=&#34;what-it-does&#34;&gt;What it does&lt;/h2&gt;
&lt;p&gt;NTN-in-a-Box creates a local sandbox where the network changes over time. A profile can describe things like:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;coverage windows&lt;/li&gt;
&lt;li&gt;latency and jitter&lt;/li&gt;
&lt;li&gt;packet loss&lt;/li&gt;
&lt;li&gt;bandwidth limits&lt;/li&gt;
&lt;li&gt;when the next window starts or ends&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;On Linux, it can run a command inside a shaped network namespace. That means the application does not need to know it is being tested. Requests get delayed, dropped, or timed out by the sandbox.&lt;/p&gt;
&lt;p&gt;For example:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;2
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;3
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;4
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;5
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;6
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;go build -o ntnbox ./cmd/ntnbox/
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;go build -o poller ./cmd/poller/
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;sudo ./ntnbox run &lt;span class=&#34;se&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;se&#34;&gt;&lt;/span&gt;  --profile testdata/profiles/leo_pass_90s.yaml &lt;span class=&#34;se&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;se&#34;&gt;&lt;/span&gt;  -- ./poller
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;During the pass, the poller starts with a usable but not perfect link. The link improves, then degrades, then disappears. When the next window opens, it recovers. This is the part I care about most: not just &amp;ldquo;does the app work&amp;rdquo;, but &amp;ldquo;does the app recover cleanly after a weird network period&amp;rdquo;.&lt;/p&gt;
&lt;h2 id=&#34;why-this-matters&#34;&gt;Why this matters&lt;/h2&gt;
&lt;p&gt;Most apps still treat connectivity as a yes/no state. NTN is more annoying than that. The app may technically be online, but the next two minutes might be a terrible time to upload a large file. Or the app may be offline now, but a short window is coming soon and queued work should be ready.&lt;/p&gt;
&lt;p&gt;Those details change application behavior. I want to test questions like:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Does retry logic back off, or does it hammer the link?&lt;/li&gt;
&lt;li&gt;Does the app queue messages locally when coverage is gone?&lt;/li&gt;
&lt;li&gt;Does it flush the queue when the window returns?&lt;/li&gt;
&lt;li&gt;Does it avoid starting a large transfer when the window is almost over?&lt;/li&gt;
&lt;li&gt;Can the UI explain what is happening instead of showing a generic failure?&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;These are not only telecom problems. They are product and UX problems too.&lt;/p&gt;
&lt;p&gt;The project includes small sample apps for things like adaptive polling, offline queues, store-and-forward messaging, Android emulator testing, and CI replay. They are intentionally simple because I wanted the failure mode to be visible.&lt;/p&gt;
&lt;h2 id=&#34;tle-support&#34;&gt;TLE support&lt;/h2&gt;
&lt;p&gt;Static profiles are good for repeatable tests. For example, &amp;ldquo;give me a 90 second LEO-style pass every 10 minutes&amp;rdquo; is perfect for CI or demos.&lt;/p&gt;
&lt;p&gt;But I also wanted to play with real satellite orbit data, so NTN-in-a-Box supports TLE files. You can generate a profile from a TLE and an observer location:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;2
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;3
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;4
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;5
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;./ntnbox tle generate &lt;span class=&#34;se&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;se&#34;&gt;&lt;/span&gt;  --file testdata/tle/iss.tle &lt;span class=&#34;se&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;se&#34;&gt;&lt;/span&gt;  --lat 37.7749 &lt;span class=&#34;se&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;se&#34;&gt;&lt;/span&gt;  --lon -122.4194 &lt;span class=&#34;se&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;se&#34;&gt;&lt;/span&gt;  --output iss-pass.yaml
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Or you can run from predicted passes directly:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;2
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;3
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;4
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;5
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;6
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;7
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;sudo ./ntnbox run &lt;span class=&#34;se&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;se&#34;&gt;&lt;/span&gt;  --tle testdata/tle/iss.tle &lt;span class=&#34;se&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;se&#34;&gt;&lt;/span&gt;  --lat 37.7749 &lt;span class=&#34;se&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;se&#34;&gt;&lt;/span&gt;  --lon -122.4194 &lt;span class=&#34;se&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;se&#34;&gt;&lt;/span&gt;  --start-at next-pass &lt;span class=&#34;se&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;se&#34;&gt;&lt;/span&gt;  --speed &lt;span class=&#34;m&#34;&gt;10&lt;/span&gt; &lt;span class=&#34;se&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;se&#34;&gt;&lt;/span&gt;  -- ./poller
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;The GUI shows the orbit, the observer, and the coverage beam. It is not meant to be a mission planning tool, but it makes the pass feel much more real than a YAML file.&lt;/p&gt;
&lt;p&gt;&lt;img
src=&#34;/images/ntn-in-a-box/tle.png&#34;
alt=&#34;NTN-in-a-Box TLE globe visualization showing orbit, observer, and coverage beam&#34;
width=&#34;800&#34;
loading=&#34;lazy&#34;
/&gt;&lt;/p&gt;
&lt;p&gt;This is useful when the scenario is tied to a location or a specific satellite, not just a synthetic &amp;ldquo;good link / bad link&amp;rdquo; timeline.&lt;/p&gt;
&lt;h2 id=&#34;api-first-testing&#34;&gt;API-first testing&lt;/h2&gt;
&lt;p&gt;Not every test needs traffic shaping. Sometimes the application just needs to know what the satellite state looks like and make a better decision.&lt;/p&gt;
&lt;p&gt;NTN-in-a-Box exposes a local API for that:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;2
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;3
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;4
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;5
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;6
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;./ntnbox serve --profile testdata/profiles/leo_pass_90s.yaml
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;curl http://localhost:8080/devices/sandbox-0/condition
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;curl http://localhost:8080/devices/sandbox-0/lookahead
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;curl http://localhost:8080/devices/sandbox-0/capabilities
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;curl -N http://localhost:8080/events
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;An app can ask:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Am I in coverage right now?&lt;/li&gt;
&lt;li&gt;How long until the next transition?&lt;/li&gt;
&lt;li&gt;What is the current delay, jitter, loss, and bandwidth?&lt;/li&gt;
&lt;li&gt;Is a usable window coming soon?&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This is where the developer workflow becomes interesting. You can build a countdown, delay a sync job, show a better message to the user, or test store-and-forward behavior without needing access to a commercial NTN environment.&lt;/p&gt;
&lt;h2 id=&#34;android-and-mobile-workflows&#34;&gt;Android and mobile workflows&lt;/h2&gt;
&lt;p&gt;Android already has NTN-related platform work, but most developers cannot easily test the behavior end to end. NTN-in-a-Box has two paths for this.&lt;/p&gt;
&lt;p&gt;On Linux or WSL2, you can shape emulator traffic directly. On macOS, you can still expose the API to the emulator with &lt;code&gt;adb reverse&lt;/code&gt; and test how the app responds to coverage changes.&lt;/p&gt;
&lt;p&gt;I like keeping those two modes separate:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;traffic shaping tells you whether the network path actually fails and recovers&lt;/li&gt;
&lt;li&gt;the API path tells you whether the app understands NTN state and reacts properly&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Both are useful. They answer different questions.&lt;/p&gt;
&lt;h2 id=&#34;ci-and-replay&#34;&gt;CI and replay&lt;/h2&gt;
&lt;p&gt;One feature I like is record and replay. If a test fails during a simulated pass, I do not want to explain it with &amp;ldquo;well, the network was weird&amp;rdquo;. I want to replay the same weirdness.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;2
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;./scripts/demo.sh --record session.jsonl
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;./ntnbox replay --file session.jsonl --speed &lt;span class=&#34;m&#34;&gt;10&lt;/span&gt; -- ./my-app
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;There is also a GitHub Action so a team can wrap normal tests in an NTN profile:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;2
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;3
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;4
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-yaml&#34; data-lang=&#34;yaml&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;- &lt;span class=&#34;nt&#34;&gt;uses&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;l&#34;&gt;hyavari/ntn-in-a-box@v1&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;  &lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;with&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;    &lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;profile&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;l&#34;&gt;leo_pass_90s&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;    &lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;command&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;l&#34;&gt;npm test&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;The command still exits like a normal test command. The difference is that it ran through a network condition that looks more like the real world we are trying to prepare for.&lt;/p&gt;
&lt;h2 id=&#34;where-it-fits&#34;&gt;Where it fits&lt;/h2&gt;
&lt;p&gt;I see NTN-in-a-Box as a small bridge between telecom concepts and everyday software testing.&lt;/p&gt;
&lt;p&gt;For telco engineers, it is a way to explain coverage windows and constrained links without needing a full network setup. For app developers, it is a way to test ugly network behavior before users find it. For platform teams, it can help design APIs and UX around intermittent connectivity.&lt;/p&gt;
&lt;p&gt;The project is still early, but that is the direction: make NTN conditions easy to run locally, easy to observe, and easy to repeat.&lt;/p&gt;
&lt;p&gt;You can find the project here:&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://github.com/hyavari/ntn-in-a-box&#34;&gt;https://github.com/hyavari/ntn-in-a-box&lt;/a&gt;&lt;/p&gt;
</description>
                
                
                
                
                
                    
                        
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/categories/ntn/">NTN</category>
                                
                            
                        
                    
                        
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/ntn/">NTN</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/satellite/">Satellite</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/5g/">5G</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/android/">Android</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/developer-tools/">Developer Tools</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/open-source/">Open Source</category>
                                
                            
                        
                    
                
            </item>
        
            <item>
                <title>Anonymize SIP Traffic in PCAP Files</title>
                <link>https://cloudtelcohub.com/posts/anonymize-sip-pcap/</link>
                <guid isPermaLink="true">https://cloudtelcohub.com/posts/anonymize-sip-pcap/</guid>
                <pubDate>Tue, 25 Nov 2025 08:00:00 -0800</pubDate>
                
                    <author>hyavari26@gmail.com (Hossein Yavari)</author>
                
                <copyright>[Reposting requires attribution, **use canonical links** &gt;&gt;](https://en.wikipedia.org/wiki/Canonical_link_element)</copyright>
                
                    <description>&lt;p&gt;&lt;img src=&#34;https://cloudtelcohub.com/images/anonymize_sip/anonymize_sip.png&#34; alt=&#34;Anonymize SIP Tool Image&#34;&gt;&lt;/p&gt;
&lt;p&gt;When working with SIP traffic captures for debugging, analysis, or sharing with colleagues, you often need to protect sensitive information like phone numbers, domains, and IP addresses. However, you still want to maintain the ability to follow call flows and understand the signaling behavior. This is where anonymization becomes crucial.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;ve created a simple Python tool called &lt;code&gt;anonymize_sip&lt;/code&gt; that helps you anonymize SIP traffic in PCAP/PCAPNG files while preserving the structure and relationships in your captures.&lt;/p&gt;
&lt;h2 id=&#34;why-anonymize-sip-captures&#34;&gt;Why Anonymize SIP Captures?&lt;/h2&gt;
&lt;p&gt;There are several scenarios where you need to anonymize SIP traffic:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Sharing captures for troubleshooting&lt;/strong&gt;: When you need to share a PCAP file with a vendor or colleague, you want to protect customer privacy&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Documentation and training&lt;/strong&gt;: Creating examples or training materials without exposing real phone numbers or network infrastructure&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Compliance&lt;/strong&gt;: Meeting privacy requirements when storing or analyzing call data&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Testing&lt;/strong&gt;: Creating sanitized test data from production captures&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The challenge is that simple find-and-replace doesn&amp;rsquo;t work well because:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The same phone number appears in multiple headers (From, To, Contact, P-Asserted-Identity, etc.)&lt;/li&gt;
&lt;li&gt;You need consistent mapping so &lt;code&gt;+11234567890&lt;/code&gt; in one packet maps to the same anonymized value in all packets&lt;/li&gt;
&lt;li&gt;Call-IDs need to be anonymized but still allow you to correlate messages within the same dialog&lt;/li&gt;
&lt;li&gt;Phone numbers can appear in different formats (&lt;code&gt;+11234567890&lt;/code&gt;, &lt;code&gt;11234567890&lt;/code&gt;, &lt;code&gt;1234567890&lt;/code&gt;) but should map to the same anonymized value&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;features&#34;&gt;Features&lt;/h2&gt;
&lt;p&gt;The tool provides several key features:&lt;/p&gt;
&lt;h3 id=&#34;consistent-anonymization&#34;&gt;Consistent Anonymization&lt;/h3&gt;
&lt;p&gt;The same original value always maps to the same anonymized value throughout the entire capture. This means if &lt;code&gt;+11234567890&lt;/code&gt; appears in the From header of an INVITE and later in the Contact header of a 200 OK, both will be replaced with the same anonymized identifier (e.g., &lt;code&gt;user_001&lt;/code&gt;).&lt;/p&gt;
&lt;h3 id=&#34;phone-number-normalization&#34;&gt;Phone Number Normalization&lt;/h3&gt;
&lt;p&gt;Phone numbers are normalized before anonymization, so &lt;code&gt;+11234567890&lt;/code&gt;, &lt;code&gt;11234567890&lt;/code&gt;, and &lt;code&gt;1234567890&lt;/code&gt; all map to the same anonymized value. This is especially important for North American numbers where the country code &lt;code&gt;+1&lt;/code&gt; might be included or omitted.&lt;/p&gt;
&lt;h3 id=&#34;comprehensive-header-support&#34;&gt;Comprehensive Header Support&lt;/h3&gt;
&lt;p&gt;The tool anonymizes all common SIP headers that contain user identities:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;From, To, Contact&lt;/li&gt;
&lt;li&gt;P-Asserted-Identity, Remote-Party-ID&lt;/li&gt;
&lt;li&gt;Diversion, P-Called-Party-ID&lt;/li&gt;
&lt;li&gt;History-Info, P-Charge-Info&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;call-id-correlation&#34;&gt;Call-ID Correlation&lt;/h3&gt;
&lt;p&gt;Call-IDs are anonymized consistently, so you can still follow a call flow from INVITE through BYE, even though the Call-ID itself is anonymized.&lt;/p&gt;
&lt;h3 id=&#34;optional-ip-anonymization&#34;&gt;Optional IP Anonymization&lt;/h3&gt;
&lt;p&gt;You can optionally anonymize IP addresses at both the packet layer and within SIP/SDP content. When enabled, it anonymizes:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Packet source and destination IPs&lt;/li&gt;
&lt;li&gt;IPs in Via, Route, Record-Route, Path headers&lt;/li&gt;
&lt;li&gt;IPs in SDP &lt;code&gt;c=&lt;/code&gt; and &lt;code&gt;o=&lt;/code&gt; lines&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;memory-efficient&#34;&gt;Memory Efficient&lt;/h3&gt;
&lt;p&gt;The tool streams packets instead of loading the entire file into memory, making it suitable for large capture files.&lt;/p&gt;
&lt;h2 id=&#34;usage&#34;&gt;Usage&lt;/h2&gt;
&lt;p&gt;Basic usage is straightforward:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;python anonymize_sip.py input.pcap output.pcap
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;To also anonymize IP addresses:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;python anonymize_sip.py --anonymize-ips input.pcap output.pcap
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;To see the mapping table after processing:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;python anonymize_sip.py --show-mapping input.pcap output.pcap
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;h2 id=&#34;what-gets-anonymized&#34;&gt;What Gets Anonymized&lt;/h2&gt;
&lt;h3 id=&#34;always-anonymized&#34;&gt;Always Anonymized&lt;/h3&gt;
&lt;table&gt;
  &lt;thead&gt;
      &lt;tr&gt;
          &lt;th style=&#34;text-align: left&#34;&gt;Field&lt;/th&gt;
          &lt;th style=&#34;text-align: left&#34;&gt;Example Before&lt;/th&gt;
          &lt;th style=&#34;text-align: left&#34;&gt;Example After&lt;/th&gt;
      &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
      &lt;tr&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;From header&lt;/td&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;&lt;code&gt;sip:+11234567890@example1.com&lt;/code&gt;&lt;/td&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;&lt;code&gt;sip:user_001@domain_001.example&lt;/code&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;To header&lt;/td&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;&lt;code&gt;sip:+10987654321@example2.com&lt;/code&gt;&lt;/td&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;&lt;code&gt;sip:user_002@domain_002.example&lt;/code&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;Contact&lt;/td&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;&lt;code&gt;sip:+11234567890@10.0.0.1:5060&lt;/code&gt;&lt;/td&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;&lt;code&gt;sip:user_001@domain_003.example&lt;/code&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;P-Asserted-Identity&lt;/td&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;&lt;code&gt;tel:+11234567890&lt;/code&gt;&lt;/td&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;&lt;code&gt;tel:user_001&lt;/code&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;Call-ID&lt;/td&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;&lt;code&gt;abc123@host.example.com&lt;/code&gt;&lt;/td&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;&lt;code&gt;call-id-0001@anonymous.example&lt;/code&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;Request-URI&lt;/td&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;&lt;code&gt;INVITE sip:+10987654321@...&lt;/code&gt;&lt;/td&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;&lt;code&gt;INVITE sip:user_002@...&lt;/code&gt;&lt;/td&gt;
      &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;
&lt;h3 id=&#34;with---anonymize-ips&#34;&gt;With &lt;code&gt;--anonymize-ips&lt;/code&gt;&lt;/h3&gt;
&lt;table&gt;
  &lt;thead&gt;
      &lt;tr&gt;
          &lt;th style=&#34;text-align: left&#34;&gt;Field&lt;/th&gt;
          &lt;th style=&#34;text-align: left&#34;&gt;Example Before&lt;/th&gt;
          &lt;th style=&#34;text-align: left&#34;&gt;Example After&lt;/th&gt;
      &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
      &lt;tr&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;Packet source IP&lt;/td&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;&lt;code&gt;192.168.1.100&lt;/code&gt;&lt;/td&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;&lt;code&gt;10.0.0.1&lt;/code&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;Packet dest IP&lt;/td&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;&lt;code&gt;192.168.1.200&lt;/code&gt;&lt;/td&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;&lt;code&gt;10.0.0.2&lt;/code&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;Via header&lt;/td&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;&lt;code&gt;Via: SIP/2.0/UDP 192.168.1.100:5060&lt;/code&gt;&lt;/td&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;&lt;code&gt;Via: SIP/2.0/UDP 10.0.0.1:5060&lt;/code&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;SDP c= line&lt;/td&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;&lt;code&gt;c=IN IP4 192.168.1.100&lt;/code&gt;&lt;/td&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;&lt;code&gt;c=IN IP4 10.0.0.1&lt;/code&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;SDP o= line&lt;/td&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;&lt;code&gt;o=- 123 456 IN IP4 192.168.1.100&lt;/code&gt;&lt;/td&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;&lt;code&gt;o=- 123 456 IN IP4 10.0.0.1&lt;/code&gt;&lt;/td&gt;
      &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;
&lt;h2 id=&#34;how-it-works&#34;&gt;How It Works&lt;/h2&gt;
&lt;p&gt;The tool uses &lt;a href=&#34;https://scapy.net/&#34;&gt;Scapy&lt;/a&gt; to read and write PCAP files. It processes each packet by:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Identifying SIP packets&lt;/strong&gt;: Quick signature check for SIP indicators (SIP/2.0, INVITE, REGISTER, etc.)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Extracting SIP content&lt;/strong&gt;: Decoding the UDP/TCP payload as UTF-8&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Anonymizing SIP headers&lt;/strong&gt;: Using regex patterns to find and replace URIs, phone numbers, and Call-IDs&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Maintaining mappings&lt;/strong&gt;: Keeping dictionaries that map original values to anonymized values&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Reconstructing packets&lt;/strong&gt;: Rebuilding the packet with anonymized content and recalculating checksums&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The anonymization maintains consistency by using the same mapping dictionaries throughout the entire file processing.&lt;/p&gt;
&lt;h2 id=&#34;example-output&#34;&gt;Example Output&lt;/h2&gt;
&lt;p&gt;When you run the tool with &lt;code&gt;--show-mapping&lt;/code&gt;, you get a summary of all anonymizations:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ python anonymize_sip.py --anonymize-ips --show-mapping capture.pcap anon.pcap

Processing: capture.pcap
IP anonymization: enabled
Processed 1500 packets...
Done! Processed 1523 packets.
Anonymized: 5 users, 3 domains, 12 Call-IDs, 8 IPv4
Output: anon.pcap

============================================================
ANONYMIZATION MAPPING SUMMARY
============================================================

User Mappings (phone numbers normalized):
  user_001 &amp;lt;- 1234567890
  user_002 &amp;lt;- 0987654321
  user_003 &amp;lt;- 1112223333

Domain Mappings:
  domain_001.example &amp;lt;- example1.com
  domain_002.example &amp;lt;- example2.com
  domain_003.example &amp;lt;- ims.mnc000.mcc000.3gppnetwork.org

IPv4 Mappings:
  10.0.0.1 &amp;lt;- 192.168.1.100
  10.0.0.2 &amp;lt;- 192.168.1.200
  10.0.0.3 &amp;lt;- 10.10.44.131

Call-ID Mappings: 12 unique Call-IDs
============================================================
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;extending-the-tool&#34;&gt;Extending the Tool&lt;/h2&gt;
&lt;p&gt;The tool is designed to be easily extensible. You can add support for additional SIP headers by modifying the &lt;code&gt;IDENTITY_HEADERS&lt;/code&gt; or &lt;code&gt;IP_HEADERS&lt;/code&gt; lists in the code:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;2
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;3
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;4
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;5
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;6
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;7
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;8
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;# Headers containing user identities (URIs with phone numbers)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;IDENTITY_HEADERS&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;s1&#34;&gt;&amp;#39;From&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;To&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;Contact&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;P-Asserted-Identity&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;...&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;s1&#34;&gt;&amp;#39;Your-Custom-Header&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;  &lt;span class=&#34;c1&#34;&gt;# Add your header here&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;# Headers containing IP addresses (used with --anonymize-ips)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;IP_HEADERS&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;Via&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;Contact&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;Route&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;Record-Route&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;Path&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;h2 id=&#34;important-notes&#34;&gt;Important Notes&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;The output file has recalculated checksums, so it&amp;rsquo;s a valid PCAP file&lt;/li&gt;
&lt;li&gt;Ports are preserved (not anonymized)&lt;/li&gt;
&lt;li&gt;The mapping is deterministic within a single run but changes between runs&lt;/li&gt;
&lt;li&gt;Keep the &lt;code&gt;--show-mapping&lt;/code&gt; output private if you need to correlate back to original values&lt;/li&gt;
&lt;li&gt;The tool only processes SIP packets; other traffic passes through unchanged&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;installation&#34;&gt;Installation&lt;/h2&gt;
&lt;p&gt;The tool requires only Scapy:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;pip install scapy
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;You can find the source code and more details in the &lt;a href=&#34;https://github.com/hyavari/anonymize_sip&#34;&gt;anonymize_sip repository&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;This tool has been useful for me when sharing captures for troubleshooting or creating documentation. If you find it helpful or have suggestions for improvements, feel free to contribute!&lt;/p&gt;
&lt;p&gt;Take care and stay safe! ;)&lt;/p&gt;
</description>
                
                
                
                
                
                    
                        
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/categories/sip/">SIP</category>
                                
                            
                        
                    
                        
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/sip/">SIP</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/pcap/">PCAP</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/privacy/">Privacy</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/python/">Python</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/wireshark/">Wireshark</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/anonymization/">Anonymization</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/security/">Security</category>
                                
                            
                        
                    
                
            </item>
        
            <item>
                <title>Useful Resources for LLMs</title>
                <link>https://cloudtelcohub.com/posts/useful_llm_resources/</link>
                <guid isPermaLink="true">https://cloudtelcohub.com/posts/useful_llm_resources/</guid>
                <pubDate>Tue, 04 Mar 2025 11:37:39 -0500</pubDate>
                
                    <author>hyavari26@gmail.com (Hossein Yavari)</author>
                
                <copyright>[Reposting requires attribution, **use canonical links** &gt;&gt;](https://en.wikipedia.org/wiki/Canonical_link_element)</copyright>
                
                    <description>&lt;p&gt;&lt;img 
src=&#34;/images/useful_llm_resources/image.jpg&#34; 
alt=&#34;Image Alt Text&#34; 
width=&#34;450&#34; 
loading=&#34;lazy&#34;
/&gt;&lt;/p&gt;
&lt;p&gt;LLMs and Agentic AI are evolving fast, and like many in tech, I’ve been diving into them. Here’s a collection of resources I’ve found useful—hope they help you too!&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Community-driven Evaluation for the Best LLM and AI Chatbots&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;📌 &lt;a href=&#34;https://lmarena.ai/&#34;&gt;&lt;strong&gt;Llama Arena&lt;/strong&gt;&lt;/a&gt; – A platform that lets users compare and vote on AI chatbot performance.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;SEAL LLM Leaderboards for Precise and Reliable LLM Rankings&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;📌 &lt;a href=&#34;https://scale.com/leaderboard&#34;&gt;&lt;strong&gt;Scale SEAL Leaderboard&lt;/strong&gt;&lt;/a&gt; – A benchmark for evaluating and ranking AI models across multiple dimensions.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Tokenizer&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;📌 &lt;a href=&#34;https://tiktokenizer.vercel.app/&#34;&gt;&lt;strong&gt;Tiktokenizer&lt;/strong&gt;&lt;/a&gt; – A handy tool for visualizing how text is tokenized before being processed by LLMs.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Local Chatbot with Different Models&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;📌 &lt;a href=&#34;https://www.nomic.ai/&#34;&gt;&lt;strong&gt;Nomic AI&lt;/strong&gt;&lt;/a&gt; – A platform for running open-source LLMs locally on your machine.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Personalized AI Assistant from Google&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;📌 &lt;a href=&#34;https://notebooklm.google/&#34;&gt;&lt;strong&gt;NotebookLM&lt;/strong&gt;&lt;/a&gt; – A research tool from Google that helps summarize, analyze, and interact with your personal notes using AI.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Building AI Agents with a Powerful Toolset&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;📌 &lt;a href=&#34;https://www.llamaindex.ai/&#34;&gt;&lt;strong&gt;LlamaIndex&lt;/strong&gt;&lt;/a&gt; – A framework for connecting LLMs with private or structured data to create intelligent agents.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Extracting Metadata and Text from Sources&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;📌 &lt;a href=&#34;https://tika.apache.org/&#34;&gt;&lt;strong&gt;Apache Tika&lt;/strong&gt;&lt;/a&gt; - A toolkit detects and extracts metadata and text from over a thousand different file types.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Embeddings, Rerankers and Readers&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;📌 &lt;a href=&#34;https://jina.ai/&#34;&gt;&lt;strong&gt;Jina AI&lt;/strong&gt;&lt;/a&gt; – Different tools/products for building LMs.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Working with Complex Workflow&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;📌 &lt;a href=&#34;https://www.langchain.com/&#34;&gt;&lt;strong&gt;LangChain&lt;/strong&gt;&lt;/a&gt; – Build context-aware and reasoning applications.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Build and Manage MLOps&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;📌 &lt;a href=&#34;https://metaflow.org/&#34;&gt;&lt;strong&gt;METAFLOW&lt;/strong&gt;&lt;/a&gt; – A Python library that makes it straightforward to develop data-intensive applications.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;LLM Testing and Evaluation&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;📌 &lt;a href=&#34;https://llmstudio.ai/&#34;&gt;&lt;strong&gt;LLM Studio&lt;/strong&gt;&lt;/a&gt; - A platform for testing and evaluating LLMs.&lt;/p&gt;
&lt;p&gt;🚀 To be continued…&lt;/p&gt;
</description>
                
                
                
                
                
                    
                        
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/categories/llm/">LLM</category>
                                
                            
                        
                    
                        
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/llm/">LLM</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/ai/">AI</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/ml/">ML</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/agentic-ai/">Agentic AI</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/chatgpt/">ChatGPT</category>
                                
                            
                        
                    
                
            </item>
        
            <item>
                <title>Testing RTT Feature with iPhone</title>
                <link>https://cloudtelcohub.com/posts/iphone_rtt_feature/</link>
                <guid isPermaLink="true">https://cloudtelcohub.com/posts/iphone_rtt_feature/</guid>
                <pubDate>Sat, 22 Feb 2025 10:42:08 -0500</pubDate>
                
                    <author>hyavari26@gmail.com (Hossein Yavari)</author>
                
                <copyright>[Reposting requires attribution, **use canonical links** &gt;&gt;](https://en.wikipedia.org/wiki/Canonical_link_element)</copyright>
                
                    <description>&lt;div style=&#34;text-align: center;&#34;&gt;
  &lt;img src=&#34;https://cloudtelcohub.com/images/iphone_rtt_feature/RTT_iPhone.PNG&#34; alt=&#34;RTT in iPhone&#34; style=&#34;width:400px; height:auto;&#34;/&gt;
&lt;/div&gt;
&lt;p&gt;Real-Time Text (RTT) is a feature designed to improve communication in situations where talking or making a voice call is not possible—such as emergencies or for individuals who are deaf, hard of hearing, or rely on TTY for phone calls. In this post, I’ve put together a quick overview of RTT and how it works: &lt;a href=&#34;https://cloudtelcohub.com/posts/real_time_text_in_ims/&#34;&gt;&lt;strong&gt;Real-Time Text (RTT) in IMS&lt;/strong&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;RTT has been available in the U.S. since around 2021, and in Canada, the CRTC mandated its implementation in 2020. However, as of now (at the time of writing), Canadian providers are being urged to deploy it as soon as possible, especially for NG911 and emergency calls.&lt;/p&gt;
&lt;p&gt;I recently implemented RTT support in our IMS core and tested it using two iPhones. Below, I’ll share some screenshots and a video to give a clearer picture of how RTT works and how it enhances communication.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s see what we have in RTT Settings: (Settings &amp;gt; Accessibility &amp;gt; RTT/TTY)&lt;/p&gt;
&lt;div style=&#34;text-align: center;&#34;&gt;
  &lt;img src=&#34;https://cloudtelcohub.com/images/iphone_rtt_feature/RTT_Settings.JPEG&#34; alt=&#34;RTT Settings iPhone&#34; style=&#34;width:400px; height:auto;&#34;/&gt;
&lt;/div&gt;
&lt;p&gt;First, you need to enable the RTT feature. There are three interesting settings you can adjust:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Send Immediately: When enabled, the phone sends each character as you type, rather than waiting for you to finish your message.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Answer RTT Calls as Muted: This setting caught me off guard at first—I couldn’t figure out why my calls had no audio. If enabled, RTT calls start with the microphone muted, so you’ll need to manually unmute if you want to speak.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Live Captions: A great accessibility feature for individuals with hearing disabilities. It allows users to read messages before answering and respond via text.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&#34;text-align: center;&#34;&gt;
  &lt;img src=&#34;https://cloudtelcohub.com/images/iphone_rtt_feature/rtt_call.jpg&#34; alt=&#34;RTT Call&#34; style=&#34;width:500px; height:auto;&#34;/&gt;
&lt;/div&gt;
&lt;p&gt;Let&amp;rsquo;s have a quick demo:&lt;/p&gt;
&lt;div style=&#34;text-align: center;&#34;&gt;
  &lt;video width=&#34;500&#34; controls&gt;
    &lt;source src=&#34;https://cloudtelcohub.com/videos/iphone_rtt_feature/rtt_demo.mp4&#34; type=&#34;video/mp4&#34;&gt;
    Your browser does not support the video tag.
  &lt;/video&gt;
&lt;/div&gt;
&lt;p&gt;As you can see, one phone has the Send Immediately option enabled, while the other requires pressing Enter to send messages. You can also mute and unmute the audio during the call.&lt;/p&gt;
&lt;p&gt;I hope this helps you understand how to enable and use the RTT feature, especially in emergency situations where you might not have been aware of it before.&lt;/p&gt;
&lt;p&gt;Take care ;)&lt;/p&gt;
</description>
                
                
                
                
                
                    
                        
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/categories/ims/">IMS</category>
                                
                            
                        
                    
                        
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/rtt/">RTT</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/ims/">IMS</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/ng911/">NG911</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/rtp/">RTP</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/volte/">VoLTE</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/emergency/">Emergency</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/vonr/">VoNR</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/text/">Text</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/iphone/">iPhone</category>
                                
                            
                        
                    
                
            </item>
        
            <item>
                <title>Reading Logs</title>
                <link>https://cloudtelcohub.com/posts/reading_logs/</link>
                <guid isPermaLink="true">https://cloudtelcohub.com/posts/reading_logs/</guid>
                <pubDate>Mon, 13 Jan 2025 14:08:24 -0500</pubDate>
                
                    <author>hyavari26@gmail.com (Hossein Yavari)</author>
                
                <copyright>[Reposting requires attribution, **use canonical links** &gt;&gt;](https://en.wikipedia.org/wiki/Canonical_link_element)</copyright>
                
                    <description>&lt;div style=&#34;text-align: center;&#34;&gt;
  &lt;img src=&#34;https://cloudtelcohub.com/images/reading_logs/reading_logs_chatgpt_generated.jpg&#34; alt=&#34;Image Alt Text&#34; style=&#34;width:600px; height:auto;&#34;/&gt;
  &lt;p&gt;&lt;em&gt;Generated by AI&lt;/em&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;Welcome to My Reading Logs&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Books are more than just stories; they’re journeys, lessons, and companions through the different phases of life. This page is a curated collection of the books I’ve read, each holding a special place in my personal reading journey. While I prefer not to write detailed opinions about the books, I do provide a personal rating (1-10 stars) to reflect how enjoyable and impactful I found them overall. I update this list regularly, adding each book as I finish it, so it helps me to remember what I read ;)&lt;/p&gt;
&lt;p&gt;I hope it inspires you to explore some of these titles yourself!&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Stop Overthinking: 23 Techniques to Relieve Stress, Stop Negative Spirals, Declutter Your Mind, and Focus on the Present&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img src=&#34;https://cloudtelcohub.com/images/reading_logs/Stop_Overthinking.jpg&#34; alt=&#34;Stop Overthinking Image&#34;&gt;&lt;/p&gt;
&lt;p&gt;by Nick Trenton&lt;/p&gt;
&lt;p&gt;Rate: (8/10)&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://a.co/d/cKzuteS&#34;&gt;&lt;em&gt;Amazon Link&lt;/em&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Reading Date: Jan/2025&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;The 10X Rule: The Only Difference Between Success and Failure&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img src=&#34;https://cloudtelcohub.com/images/reading_logs/10x_rule.jpg&#34; alt=&#34;The 10X Rule Image&#34;&gt;&lt;/p&gt;
&lt;p&gt;by Grant Cardone&lt;/p&gt;
&lt;p&gt;Rate: (7/10)&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://a.co/d/hki256U&#34;&gt;&lt;em&gt;Amazon Link&lt;/em&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Reading Date: Feb/2025&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;No Rules Rules: Netflix and the Culture of Reinvention&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img src=&#34;https://cloudtelcohub.com/images/reading_logs/no_rules_rules.jpg&#34; alt=&#34;No Rules Rules Image&#34;&gt;&lt;/p&gt;
&lt;p&gt;by Reed Hastings and Erin Meyer&lt;/p&gt;
&lt;p&gt;Rate: (9/10)&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://a.co/d/35gENDh&#34;&gt;&lt;em&gt;Amazon Link&lt;/em&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Reading Date: March/2025&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Think Again: The Power of Knowing What You Don&amp;rsquo;t Know&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img src=&#34;https://cloudtelcohub.com/images/reading_logs/think_again_adam_grant.jpg&#34; alt=&#34;Think Again Image&#34;&gt;&lt;/p&gt;
&lt;p&gt;by Adam Grant&lt;/p&gt;
&lt;p&gt;Rate: (5/10)&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://a.co/d/bJw0ab9&#34;&gt;&lt;em&gt;Amazon Link&lt;/em&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Reading Date: March/2025&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;The Psychology of Money: Timeless lessons on wealth, greed, and happiness&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img src=&#34;https://cloudtelcohub.com/images/reading_logs/psychology_of_money.jpg&#34; alt=&#34;The Psychology of Money&#34;&gt;&lt;/p&gt;
&lt;p&gt;by Adam Grant&lt;/p&gt;
&lt;p&gt;Rate: (9/10)&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://a.co/d/0aA3jfI&#34;&gt;&lt;em&gt;Amazon Link&lt;/em&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Reading Date: August/2025&lt;/p&gt;
</description>
                
                
                
                
                
                    
                        
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/categories/books/">Books</category>
                                
                            
                        
                    
                        
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/software/">Software</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/telecom/">Telecom</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/cloud/">Cloud</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/business/">Business</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/management/">Management</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/motivation/">Motivation</category>
                                
                            
                        
                    
                
            </item>
        
            <item>
                <title>Real-Time Text (RTT) in IMS</title>
                <link>https://cloudtelcohub.com/posts/real_time_text_in_ims/</link>
                <guid isPermaLink="true">https://cloudtelcohub.com/posts/real_time_text_in_ims/</guid>
                <pubDate>Thu, 07 Nov 2024 15:46:50 -0500</pubDate>
                
                    <author>hyavari26@gmail.com (Hossein Yavari)</author>
                
                <copyright>[Reposting requires attribution, **use canonical links** &gt;&gt;](https://en.wikipedia.org/wiki/Canonical_link_element)</copyright>
                
                    <description>&lt;p&gt;&lt;img src=&#34;https://cloudtelcohub.com/images/rtt_in_ims/birds-mourning-partner.jpg&#34; alt=&#34;RTT in Emergency Image&#34;&gt;&lt;/p&gt;
&lt;p&gt;In today’s digital landscape, communication is increasingly inclusive, allowing for real-time, text-based exchanges that cater to users with different needs and preferences. Real-Time Text (RTT) is an essential technology within the IP Multimedia Subsystem (IMS), designed to facilitate text conversations as they happen, character by character. Originally developed to replace legacy TTY systems, RTT offers a universal solution for the deaf, hard of hearing, and anyone who prefers real-time text over traditional voice calls.&lt;/p&gt;
&lt;iframe 
    src=&#34;https://cloudtelcohub.com/files/rtt_in_ims/RTT_in_IMS.pdf&#34; 
    width=&#34;100%&#34; 
    height=&#34;600px&#34;
    frameborder=&#34;0&#34; 
    allowfullscreen=&#34;true&#34;&gt;
&lt;/iframe&gt;
&lt;p&gt;&lt;a href=&#34;https://cloudtelcohub.com/files/rtt_in_ims/RTT_in_IMS.pdf&#34;&gt;&lt;strong&gt;Download PDF Here&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;
</description>
                
                
                
                
                
                    
                        
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/categories/ims/">IMS</category>
                                
                            
                        
                    
                        
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/rtt/">RTT</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/ims/">IMS</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/ng911/">NG911</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/rtp/">RTP</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/tty/">TTY</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/volte/">VoLTE</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/emergency/">Emergency</category>
                                
                            
                        
                    
                
            </item>
        
            <item>
                <title>IMS Training: Part Two</title>
                <link>https://cloudtelcohub.com/posts/ims_training_part_two/</link>
                <guid isPermaLink="true">https://cloudtelcohub.com/posts/ims_training_part_two/</guid>
                <pubDate>Fri, 25 Oct 2024 12:42:13 -0400</pubDate>
                
                    <author>hyavari26@gmail.com (Hossein Yavari)</author>
                
                <copyright>[Reposting requires attribution, **use canonical links** &gt;&gt;](https://en.wikipedia.org/wiki/Canonical_link_element)</copyright>
                
                    <description>&lt;p&gt;&lt;img src=&#34;https://cloudtelcohub.com/images/ims_training/ims_training_part2.png&#34; alt=&#34;IMS/VoLTE Training Image&#34;&gt;&lt;/p&gt;
&lt;p&gt;I spent a few hours last weekend finalizing my notes on IMS and VoLTE architecture. I’m sharing a section here, hoping it helps anyone interested in reviewing key aspects of IMS networks. This part covers essential topics such as registration processes, Quality of Service (QoS) mechanisms, and SIP routing. It provides a concise summary of these core areas to assist those seeking a quick review or clarification on IMS fundamentals.&lt;/p&gt;
&lt;iframe src=&#34;https://cloudtelcohub.com/files/ims_training/IMS_Training_Part2_TelcoCloudHub.pdf&#34; width=&#34;100%&#34; height=&#34;600px&#34;&gt;&lt;/iframe&gt;
&lt;p&gt;&lt;a href=&#34;https://cloudtelcohub.com/files/ims_training/IMS_Training_Part2_TelcoCloudHub.pdf&#34;&gt;&lt;strong&gt;Download Part One&lt;/strong&gt; PDF&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Let me know your feadback! Take care ;)&lt;/p&gt;
</description>
                
                
                
                
                
                    
                        
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/categories/ims/">IMS</category>
                                
                            
                        
                    
                        
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/ims/">IMS</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/volte/">VoLTE</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/epc/">EPC</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/sip/">SIP</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/rtp/">RTP</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/diameter/">DIAMETER</category>
                                
                            
                        
                    
                
            </item>
        
            <item>
                <title>IMS Training: Part One</title>
                <link>https://cloudtelcohub.com/posts/ims_training_part_one/</link>
                <guid isPermaLink="true">https://cloudtelcohub.com/posts/ims_training_part_one/</guid>
                <pubDate>Sun, 13 Oct 2024 10:09:11 -0400</pubDate>
                
                    <author>hyavari26@gmail.com (Hossein Yavari)</author>
                
                <copyright>[Reposting requires attribution, **use canonical links** &gt;&gt;](https://en.wikipedia.org/wiki/Canonical_link_element)</copyright>
                
                    <description>&lt;p&gt;&lt;img src=&#34;https://cloudtelcohub.com/images/ims_training/ims_training.jpg&#34; alt=&#34;IMS/VoLTE Training Image&#34;&gt;&lt;/p&gt;
&lt;p&gt;One of the challenges with reading 3GPP documents is that it’s easy to forget the majority of details unless you work with them on a daily basis. For support or maintenance teams, this might be feasible, but for developers, it’s much harder. As a developer, you implement, deploy, debug, and often don’t touch the system again for a long time unless an issue arises or a new feature is requested. This is particularly true for telecom core elements like the MME, HSS, etc., which you rarely need to interact with.&lt;/p&gt;
&lt;p&gt;With that in mind, I’ve started reviewing my old notes and highlighted 3GPP documents. I’m consolidating them into a single document that I can refer to whenever needed. It’s not focused on deep protocol flows, since those can easily be found when necessary.&lt;/p&gt;
&lt;p&gt;I’ve been working on this project in my spare time, and this week I completed part one. I’ll continue summarizing all of my documents from the past three years related to IMS/VoLTE, and hope to finish soon.&lt;/p&gt;
&lt;iframe src=&#34;https://cloudtelcohub.com/files/ims_training/IMS_Training_Part1_TelcoCloudHub.pdf&#34; width=&#34;100%&#34; height=&#34;600px&#34;&gt;&lt;/iframe&gt;
&lt;p&gt;&lt;a href=&#34;https://cloudtelcohub.com/files/ims_training/IMS_Training_Part1_TelcoCloudHub.pdf&#34;&gt;&lt;strong&gt;Download Part One&lt;/strong&gt; PDF&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Let me know your feadback! Take care ;)&lt;/p&gt;
</description>
                
                
                
                
                
                    
                        
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/categories/ims/">IMS</category>
                                
                            
                        
                    
                        
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/ims/">IMS</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/volte/">VoLTE</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/epc/">EPC</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/sip/">SIP</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/rtp/">RTP</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/diameter/">DIAMETER</category>
                                
                            
                        
                    
                
            </item>
        
            <item>
                <title>AWS ECS and Chime Voice Connector</title>
                <link>https://cloudtelcohub.com/posts/aws_ecs_and_chime_voice_connector/</link>
                <guid isPermaLink="true">https://cloudtelcohub.com/posts/aws_ecs_and_chime_voice_connector/</guid>
                <pubDate>Sat, 12 Oct 2024 09:20:52 -0400</pubDate>
                
                    <author>hyavari26@gmail.com (Hossein Yavari)</author>
                
                <copyright>[Reposting requires attribution, **use canonical links** &gt;&gt;](https://en.wikipedia.org/wiki/Canonical_link_element)</copyright>
                
                    <description>&lt;p&gt;&lt;img src=&#34;https://cloudtelcohub.com/images/aws_ecs_and_chime_voice_connector/aurora_2024.jpg&#34; alt=&#34;Aurora 2024 Ottawa Image&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;AWS&lt;/em&gt; offers a wide range of services and tools that simplify the work of developers and solution architects. However, there are instances where certain limitations or missing features can be frustrating or challenging. In this post, I’ll share some workarounds I’ve implemented to make &lt;strong&gt;SIP trunks&lt;/strong&gt; function smoothly on &lt;strong&gt;ECS Fargate with AWS Chime Voice Connector&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;First, if you’re not familiar with Voice Connector, it’s a SIP trunking service for call origination and termination, part of the Chime SDK. It can be used to build conferencing solutions and other voice-enabled applications. For more information, you can explore the details here: &lt;a href=&#34;https://docs.aws.amazon.com/chime-sdk/latest/ag/voice-connectors.html&#34;&gt;&lt;em&gt;AWS Voice Cconnectors&lt;/em&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;Problem&lt;/strong&gt;&lt;/em&gt;: An important point about Voice Connector is that its proxy or edge SIP servers are only accessible via the internet using public IPs. While AWS offers a solution using Direct Connect, it doesn’t work if your servers are hosted within AWS itself. This creates the first limitation: your SIP servers must connect to Voice Connector through the internet, meaning they either need a public IP or must be behind a NAT (although NAT doesn’t work in this case). To address this limitation and the security concerns around call origination, AWS provides an &lt;em&gt;Allowed Hosts List&lt;/em&gt; in the termination settings. You must add your server’s or NAT’s IPs to this list, which allows your servers to send SIP traffic to Voice Connector.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://cloudtelcohub.com/images/aws_ecs_and_chime_voice_connector/VoiceConnector-Settings.png&#34; alt=&#34;AWS Chime Voice Connector Termination Settings Image&#34;&gt;&lt;/p&gt;
&lt;p&gt;If your SIP servers are running on EC2, you’re in luck—it’s easier to assign Elastic IPs to your instances. You simply need to add those IPs to the allowed hosts list and make a few adjustments to your security groups to allow incoming traffic from Chime. You can find the AWS IP ranges here: &lt;a href=&#34;https://docs.aws.amazon.com/chime-sdk/latest/ag/network-config.html&#34;&gt;network-config&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;But what if you want to utilizing the benefits of containers and cost efficiency and use ECS Fargate (NOT ECS with EC2), you will be in trouble. You can enable your Fargate task to get dynamic public IP but how should you deal with that &lt;em&gt;Allowed Hosts List&lt;/em&gt;? Maybe hiring someone to just sit there and whenever a task goes down or new task comes up, update IPs list :))&lt;/p&gt;
&lt;p&gt;This is where AWS doesn’t currently offer a viable solution. I spoke with support, and their suggestion was to use EC2 or NAT. Recommending EC2 to a team that’s looking for a Fargate-based solution feels more like avoiding the problem than solving it. So, what’s the issue with NAT? NAT works when your server is in a subnet behind a NAT gateway and only needs to initiate requests to Chime. However, for incoming requests—like a BYE message at the end of a call—your server won’t receive it because it’s behind NAT.&lt;/p&gt;
&lt;p&gt;What about using a network load balancer (NLB)? While it’s another potential approach, it doesn’t work either. If you put an NLB in front of your ECS cluster and use its IP in the SIP Contact header, you can receive incoming SIP requests from Chime. However, you still need to register your tasks’ public IPs with Chime to allow tasks to send SIP requests—complicating things further. Sound complex? Don’t worry—stay happy! 😉&lt;/p&gt;
&lt;p&gt;The great thing about AWS is that there’s almost always a way to work around limitations, thanks to the extensive APIs available for most services. This flexibility allows you to build custom solutions to tackle challenges—just like the approach that worked for me in this scenario.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;Solution&lt;/strong&gt;&lt;/em&gt;: One solution I implemented was delegating the task of updating the IP whitelist for Voice Connectors to a simple service. When an ECS task starts, it calls this service and provides key information about itself. The service then takes care of updating the Voice Connector’s termination settings and allowed IP list automatically.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Step 1:&lt;/strong&gt; Integrating a call to an API within your container’s entry point is straightforward. You can send any relevant information that the service needs to understand details about the ECS cluster, service, region, IPs, and more regarding that task.&lt;/p&gt;
&lt;p&gt;In our scenario, our SIP servers already maintain a WebSocket connection to the API Gateway, so we leveraged that same connection. This approach eliminates the need for additional authentication steps typically required for calling a REST API, although managing authentication isn’t overly complicated.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Step 2:&lt;/strong&gt; Behind the API Gateway, we have a Lambda function that receives the notifications and processes them. This Lambda function is responsible for updating the Voice Connector’s termination settings and managing the IP list.&lt;/p&gt;
&lt;p&gt;Let’s include some snippets here to illustrate what this Lambda function does. Also I didn&amp;rsquo;t mention here how you should find the Voice Connector&amp;rsquo;s ID. Consider that Lambda function has it:&lt;/p&gt;
&lt;p&gt;We can get settings of Voice Connector like this:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt; 1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 2
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 3
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 4
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 5
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 6
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 7
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 8
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 9
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;10
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;11
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;12
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;13
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;14
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;15
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;16
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;17
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;18
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;19
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;20
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;21
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-javascript&#34; data-lang=&#34;javascript&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;kr&#34;&gt;const&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;nx&#34;&gt;ChimeSDKVoiceClient&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;nx&#34;&gt;GetVoiceConnectorTerminationCommand&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;nx&#34;&gt;PutVoiceConnectorTerminationCommand&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;require&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;@aws-sdk/client-chime-sdk-voice&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;kr&#34;&gt;const&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;voiceConnectorId&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;kr&#34;&gt;const&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;voiceClient&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;new&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;ChimeSDKVoiceClient&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;({&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;region&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;REGION&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;});&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;kr&#34;&gt;const&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;params&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;nx&#34;&gt;VoiceConnectorId&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;voiceConnectorId&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;kr&#34;&gt;const&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;result&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;kr&#34;&gt;await&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;voiceClient&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;send&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;k&#34;&gt;new&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;GetVoiceConnectorTerminationCommand&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;params&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;kr&#34;&gt;const&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;terminationSettings&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;result&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;Termination&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;kr&#34;&gt;const&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;cidrList&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;terminationSettings&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;CidrAllowedList&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;c1&#34;&gt;// we update cidrList with new IPs and remove old IPs here
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;&lt;/span&gt;    &lt;span class=&#34;kr&#34;&gt;const&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;cleanedCidrs&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[];&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;In this way, so updating is simple. Assume you updated the IP CIDR list:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;2
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;3
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;4
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;5
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;6
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;7
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;8
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;9
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-javascript&#34; data-lang=&#34;javascript&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;nx&#34;&gt;terminationSettings&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;CidrAllowedList&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;cleanedCidrs&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;kr&#34;&gt;const&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;putParams&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;nx&#34;&gt;VoiceConnectorId&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;voiceConnectorId&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;nx&#34;&gt;Termination&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;terminationSettings&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;kr&#34;&gt;const&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;updateResult&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;kr&#34;&gt;await&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;voiceClient&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;send&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;k&#34;&gt;new&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;PutVoiceConnectorTerminationCommand&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;putParams&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Let’s assume the event we receive from the Fargate task includes its public IP, which we can easily add to the allowed CIDR list. But what about removing invalid IPs that are no longer in use by our tasks? To handle this, we can retrieve the eni (Elastic Network Interface) IDs for all tasks in the service. Then, we can get the public IPs assigned to these ENIs and remove any IPs that are no longer present in the task list from the Voice Connector’s &lt;em&gt;CidrAllowedList&lt;/em&gt;.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt; 1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 2
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 3
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 4
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 5
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 6
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 7
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 8
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 9
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;10
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;11
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;12
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;13
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;14
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;15
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;16
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;17
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;18
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;19
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;20
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;21
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;22
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;23
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;24
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;25
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;26
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;27
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;28
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;29
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;30
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;31
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-javascript&#34; data-lang=&#34;javascript&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;kr&#34;&gt;const&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;tasksPublicIps&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[];&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;kr&#34;&gt;const&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;tasks&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;kr&#34;&gt;await&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;ecsClient&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;send&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;k&#34;&gt;new&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;ListTasksCommand&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;({&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;cluster&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;clusterName&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;})&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;k&#34;&gt;for&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;kr&#34;&gt;const&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;taskArn&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;of&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;tasks&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;taskArns&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;kr&#34;&gt;const&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;task&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;kr&#34;&gt;await&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;ecsClient&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;send&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;            &lt;span class=&#34;k&#34;&gt;new&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;DescribeTasksCommand&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;({&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;cluster&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;clusterName&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;tasks&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;taskArn&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;})&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;kr&#34;&gt;const&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;enis&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;task&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;tasks&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;0&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;].&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;attachments&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;0&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;].&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;details&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;filter&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;            &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;detail&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;detail&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;name&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;===&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;networkInterfaceId&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;k&#34;&gt;for&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;kr&#34;&gt;const&lt;/span&gt; &lt;span class=&#34;kr&#34;&gt;interface&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;of&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;enis&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;            &lt;span class=&#34;kr&#34;&gt;const&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;niId&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;kr&#34;&gt;interface&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;value&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;            &lt;span class=&#34;kr&#34;&gt;const&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;ec2Client&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;new&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;EC2Client&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;({&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;region&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;REGION&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;});&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;            &lt;span class=&#34;kr&#34;&gt;const&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;niDetails&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;kr&#34;&gt;await&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;ec2Client&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;send&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;                &lt;span class=&#34;k&#34;&gt;new&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;DescribeNetworkInterfacesCommand&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;({&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;                    &lt;span class=&#34;nx&#34;&gt;NetworkInterfaceIds&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;niId&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;],&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;                &lt;span class=&#34;p&#34;&gt;})&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;            &lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;            &lt;span class=&#34;kr&#34;&gt;const&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;publicIp&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;niDetails&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;NetworkInterfaces&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;0&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;].&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;Association&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;?&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;PublicIp&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;            &lt;span class=&#34;k&#34;&gt;if&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;publicIp&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;                &lt;span class=&#34;nx&#34;&gt;tasksPublicIps&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;push&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;publicIp&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;            &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Now that you have an updated list of valid public IPs for your tasks (SIP servers), the final step is simply updating the appropriate Voice Connector they’re connected to. And that’s it—you’re done!&lt;/p&gt;
&lt;p&gt;I hope this post gave you some useful insights for handling similar scenarios in the future.&lt;/p&gt;
&lt;p&gt;Take care! ;)&lt;/p&gt;
</description>
                
                
                
                
                
                    
                        
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/categories/devops/">DevOps</category>
                                
                            
                        
                    
                        
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/ecs/">ECS</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/aws/">AWS</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/chime/">Chime</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/voice/">Voice</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/voiceconnector/">VoiceConnector</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/sip/">SIP</category>
                                
                            
                        
                    
                
            </item>
        
            <item>
                <title>Trust: A Hidden Treasure Among Teammates</title>
                <link>https://cloudtelcohub.com/posts/trust_a_hidden_treasure_among_teammates/</link>
                <guid isPermaLink="true">https://cloudtelcohub.com/posts/trust_a_hidden_treasure_among_teammates/</guid>
                <pubDate>Tue, 08 Oct 2024 10:27:12 -0400</pubDate>
                
                    <author>hyavari26@gmail.com (Hossein Yavari)</author>
                
                <copyright>[Reposting requires attribution, **use canonical links** &gt;&gt;](https://en.wikipedia.org/wiki/Canonical_link_element)</copyright>
                
                    <description>&lt;p&gt;&lt;img src=&#34;https://cloudtelcohub.com/images/trust_a_hidden_treasure_among_teammates/Large-Ottawa-sign-in-street.jpg&#34; alt=&#34;toniagara.com Image&#34;&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;“The best way to find out if you can trust somebody is to trust them.” – Ernest Hemingway&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;It’s been a long time since my last blog post, but today, in Ottawa, I want to dive into a topic that has taken me over 12 years to fully grasp: trust—an essential element in any long-lasting relationship, whether personal or professional.&lt;/p&gt;
&lt;p&gt;In this post, I want to share insights into how trust operates within teams, particularly in the workplace. Trust isn’t built overnight; it requires time and effort. However, once established, it becomes a hidden treasure, unlocking the potential for creativity, collaboration, and success within a team.&lt;/p&gt;
&lt;p&gt;Note: These are just a few thoughts that might help guide you, especially if you’re feeling uncertain about your role or the environment you’re working in.&lt;/p&gt;
&lt;p&gt;Let’s start with the foundation of any job: the interview process. In my experience, outside of major companies like FANG (or similarly large corporations), the seeds of trust are planted as early as the interview stage. You trust the company enough to commit your most valuable resource—your time—because you believe in its mission and future.&lt;/p&gt;
&lt;p&gt;This trust fosters a sense of security, allowing you to take risks, be more creative, and engage deeply with your work. When you feel safe within your role and team, you’re likely to be more productive and innovative. There’s no shortage of articles that highlight the importance of building trust in teams and organizations—this is no coincidence. Trust is a key to unlocking the best in people.&lt;/p&gt;
&lt;p&gt;But how exactly do you establish trust? Someone joins your team or works alongside you, maybe as a co-founder, and they trust you. But why? Perhaps you offered them something compelling enough to earn their trust, or maybe they convinced themselves you’re trustworthy based on external factors—like income or a fancy job title—without fully knowing you.&lt;/p&gt;
&lt;p&gt;I personally don’t favor the latter. Trust that’s rooted in shallow factors, like a paycheck or an impressive title, can be short-lived. Sooner or later, people who rely on these external motivators realize they’ve made a mistake. Before they fully understand, they may leave, placing blind trust elsewhere, which eventually leads them down a path of disappointment.&lt;/p&gt;
&lt;p&gt;Now, let’s focus on the first group—those who trust you because you’ve given them genuine reasons to. If you’re authentic and the things you value align with what you’ve communicated, this opens up great opportunities for both sides. This type of relationship fosters the highest levels of creativity and productivity, leading to success for the entire team. As mentioned at begining, this is the kind of trust that leads to great outcomes.&lt;/p&gt;
&lt;p&gt;On the other hand, if you’re just playing a role or putting on a facade, even if you’re skilled at it, your business or team will inevitably suffer in the long run. You’ll lose valuable people, and nothing is more essential to a business than its people. The worst scenario occurs when someone exploits trust for personal gain. This doesn’t just harm the team or the business—it deeply impacts the individuals who placed their trust in you.&lt;/p&gt;
&lt;p&gt;What worries me most isn’t the damage to the business or the team, but the effect on those who trusted you. When they realize they made a mistake by placing their trust in you, the sense of betrayal and neglect can be overwhelming. Often, they don’t dwell on how you deceived them; instead, they reflect on all the moments they dedicated themselves to the team’s success, only to realize the reward wasn’t what they expected. The reality hits them that they trusted someone who merely wore a mask, prioritizing personal gain over the well-being of the team.&lt;/p&gt;
&lt;p&gt;To those people: this is not your fault. You did what any reasonable person would do—you gave your trust and did your best in an environment where you believed everyone shared the same goals. You were dedicated to the team’s success, and that effort is something to be proud of, regardless of the outcome.&lt;/p&gt;
&lt;p&gt;Unfortunately, this story is one I’ve experienced firsthand. After more than 10 years of hard work, dedication, and passion, I realized that I had placed my trust in the wrong entity. In long business relationships, friendships often develop as well, and that made the situation even harder to digest. At first, it was difficult for me to accept, but once I did, moving forward and making tough decisions became easier.&lt;/p&gt;
&lt;p&gt;This experience taught me to think more broadly in similar situations and to prioritize myself and my family above everything else. Even in environments that seem trustworthy, it’s important to remember that you should always be your top priority. If someone or something isn’t respecting that, it’s a clear sign that it’s not the right place for you.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Closing Thoughts&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;In the end, trust is the foundation of any successful team or business. It’s what allows people to take risks, to be creative, and to fully invest themselves in the shared goals of the team. While building trust takes time, the reward is a team that’s not only productive but also resilient and capable of weathering challenges together.&lt;/p&gt;
&lt;p&gt;If you’re leading a team or starting a business, remember that trust isn’t just something to ask for—it’s something to actively cultivate through transparency, empathy, and consistency. And if you’ve ever been in a position where your trust was misplaced, don’t let it discourage you from trusting again. Instead, use that experience as a lesson in recognizing the signs of authenticity, and remember that real trust leads to growth, both for you and those around you.&lt;/p&gt;
</description>
                
                
                
                
                
                    
                        
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/categories/thoughts/">Thoughts</category>
                                
                            
                        
                    
                        
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/trust/">Trust</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/teamwork/">teamwork</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/team-building/">team-building</category>
                                
                            
                        
                    
                
            </item>
        
            <item>
                <title>IMS Network Announcements</title>
                <link>https://cloudtelcohub.com/posts/ims-network-announcements/</link>
                <guid isPermaLink="true">https://cloudtelcohub.com/posts/ims-network-announcements/</guid>
                <pubDate>Fri, 17 May 2024 10:17:34 -0700</pubDate>
                
                    <author>hyavari26@gmail.com (Hossein Yavari)</author>
                
                <copyright>[Reposting requires attribution, **use canonical links** &gt;&gt;](https://en.wikipedia.org/wiki/Canonical_link_element)</copyright>
                
                    <description>&lt;div style=&#34;text-align: center;&#34;&gt;
  &lt;img src=&#34;https://cloudtelcohub.com/images/ims-network-announcements/monkeys-noise.jpg&#34; alt=&#34;Image Alt Text&#34; style=&#34;width:600px; height:auto;&#34;/&gt;
  &lt;p&gt;&lt;em&gt;A chorus of howler monkeys of the species Alouatta caraya. Mariana Raño.&lt;/em&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;In telephony services, providing &lt;strong&gt;voice announcements&lt;/strong&gt; to call parties is standard practice. This feature is essential for mobile operators to ensure that subscribers receive information about incomplete calls or dialing restrictions. It enables customers to understand the reason behind any issues they encounter and facilitates follow-up with customer service for further assistance.&lt;/p&gt;
&lt;p&gt;In &lt;strong&gt;IMS&lt;/strong&gt; networks, this task is typically handled by the Media Resource Function (MRF), which plays network announcements in appropriate situations.&lt;/p&gt;
&lt;p&gt;There are various options available for implementing an MRF. I&amp;rsquo;d like to focus on one specifically designed for &lt;strong&gt;cloud-native IMS core&lt;/strong&gt; solutions like ours. Our preference lies in solutions that require minimal server infrastructure and maintenance, streamlining integration without adding additional overhead.&lt;/p&gt;
&lt;p&gt;For those who may have missed my previous posts, I&amp;rsquo;m excited to share that my team successfully implemented an IMS core on &lt;strong&gt;AWS&lt;/strong&gt;, primarily utilizing Lambda functions! If you&amp;rsquo;re curious about how we achieved this feat, feel free to reach out. I&amp;rsquo;d be happy to discuss further details ;)&lt;/p&gt;
&lt;p&gt;Before, I embarked on an intriguing journey using &lt;em&gt;AWS Chime&lt;/em&gt; to implement the &lt;em&gt;IMS call conference or Ad-hoc multi-party conference&lt;/em&gt; feature for our service. After overcoming various challenges, we successfully launched this feature, entirely leveraging Chime&amp;rsquo;s capabilities. The best part? No additional servers or containers were required, saving us from ongoing maintenance headaches. You can read more about our experience and the implementation process in detail on my blog &lt;a href=&#34;https://cloudtelcohub.com/posts/ims-call-conferencing/&#34;&gt;&lt;strong&gt;here&lt;/strong&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;m contemplating replicating the same strategy for network announcements with AWS services, aiming to leverage existing solutions rather than reinventing the wheel. In the past, I implemented an IVR for incoming calls on &lt;em&gt;AWS Voice Connector&lt;/em&gt; trunk using the &lt;em&gt;SIP Media Application&lt;/em&gt;, which was both effective and efficient. I&amp;rsquo;m confident that this approach can be seamlessly adapted for network announcements as well.&lt;/p&gt;
&lt;p&gt;You&amp;rsquo;ve probably grasped the concept: setting up a trunk to the Voice Connector and defining a specific SIP rule to direct calls over that trunk to your &lt;em&gt;SIP Media Application&lt;/em&gt;, triggering a Lambda function in the process. The flow would be like this:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://cloudtelcohub.com/images/ims-network-announcements/aws-pstn-diagram.png&#34; alt=&#34;AWS SIP applications Image&#34;&gt;&lt;/p&gt;
&lt;p&gt;For more please check this link:&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://docs.aws.amazon.com/chime-sdk/latest/ag/understand-sip-data-models.html&#34;&gt;https://docs.aws.amazon.com/chime-sdk/latest/ag/understand-sip-data-models.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;For example, you could implement a Lambda function like this, utilizing &lt;em&gt;Amazon Polly&lt;/em&gt; to perform text-to-speech (TTS) and play the configured announcement for incoming calls.&lt;/p&gt;
&lt;p&gt;This solution, in addition to maintenance and cost, is very dynamic and you can support different language announcements without handling pre-recorded voice prompts. You can update the content and language of announcements on the fly.&lt;/p&gt;
&lt;p&gt;Read more:
&lt;a href=&#34;https://docs.aws.amazon.com/chime-sdk/latest/dg/writing-lambdas.html&#34;&gt;https://docs.aws.amazon.com/chime-sdk/latest/dg/writing-lambdas.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Hint:&lt;/strong&gt; You can add additional SIP headers to your INVITE starting with ‘x-{}’, and carry necessary information for using in Lambda logic. Read more here:&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://docs.aws.amazon.com/chime-sdk/latest/dg/sip-headers.html&#34;&gt;https://docs.aws.amazon.com/chime-sdk/latest/dg/sip-headers.html&lt;/a&gt;&lt;/p&gt;
</description>
                
                
                
                
                
                    
                        
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/categories/ims/">IMS</category>
                                
                            
                        
                    
                        
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/ims/">IMS</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/volte/">VoLTE</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/mrf/">MRF</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/tas/">TAS</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/aws/">AWS</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/chime/">Chime</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/voice/">Voice</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/tts/">TTS</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/how-to/">How-To</category>
                                
                            
                        
                    
                
            </item>
        
            <item>
                <title>CloudWatch Log Metric Filters</title>
                <link>https://cloudtelcohub.com/posts/cloudwatch-log-metric-filters/</link>
                <guid isPermaLink="true">https://cloudtelcohub.com/posts/cloudwatch-log-metric-filters/</guid>
                <pubDate>Fri, 16 Feb 2024 15:39:58 -0800</pubDate>
                
                    <author>hyavari26@gmail.com (Hossein Yavari)</author>
                
                <copyright>[Reposting requires attribution, **use canonical links** &gt;&gt;](https://en.wikipedia.org/wiki/Canonical_link_element)</copyright>
                
                    <description>&lt;p&gt;&lt;img src=&#34;https://cloudtelcohub.com/images/cloudwatch-log-metric-filters/CloudWatch-Dashboard.jpg&#34; alt=&#34;AWS CloudWatch Dashboard Image&#34;&gt;&lt;/p&gt;
&lt;p&gt;Yesterday, I successfully configured distinct metric filters for specific CloudWatch log groups within our AWS lab environment. After verifying their effectiveness, I realized the need to replicate these filters across both our AWS staging and production environments.&lt;/p&gt;
&lt;p&gt;** I understand that AWS CloudWatch offers cross-account capabilities, but let&amp;rsquo;s assume for a moment that utilizing them isn&amp;rsquo;t feasible or recommended, as was the case in my situation. Additionally, there are instances, like mine, where swiftly integrating your CDK and deployment process to accommodate these requirements may not be feasible. While it&amp;rsquo;s true that log group metric filters can be added through AWS &lt;a href=&#34;https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_logs.MetricFilter.html&#34;&gt;CDK&lt;/a&gt; during the deployment phase, implementing such changes entails additional steps and approvals for staging and production updates. Nevertheless, I wanted to highlight that my solution could potentially offer a time-saving alternative in certain scenarios.&lt;/p&gt;
&lt;p&gt;To expedite this process, I leveraged the AWS CLI tool. This involved exporting designated log group metric filters from one AWS account and subsequently transferring them to another account. Additionally, I utilized the tool to import metric filters from a JSON file, which had been previously exported from log metric filters.&lt;/p&gt;
&lt;p&gt;You can find this script here in &lt;strong&gt;Gist&lt;/strong&gt;:&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://gist.github.com/hyavari/9d55f1fe4e0f608eaa8f5c415cc6a73a&#34;&gt;https://gist.github.com/hyavari/9d55f1fe4e0f608eaa8f5c415cc6a73a&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Usage is not complicated. You only need SSO profiles (that in my case, I regularly use them.)&lt;/p&gt;
&lt;p&gt;for example:&lt;/p&gt;
&lt;p&gt;for importing a JSON file including filters you can do like this:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;./cloudwatch_metric_importer.sh -i --input metrics.json --profile lab001 --region us-east-1&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;or if you want to export (copy) from one account then import to another account:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;./cloudwatch_metric_importer.sh -e --profile lab001 --region us-east-1 --log-group groupName001 --dst-profile staging001 --dst-region us-east-2&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;I hope this helps you save time!&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Always there is place for improvement, so please do not hesitate to contribute them.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Take care ;)&lt;/p&gt;
&lt;h2 id=&#34;usefule-links&#34;&gt;Usefule Links:&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;[1] CloudWatch Metrics&lt;/strong&gt; - &lt;a href=&#34;https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/MonitoringLogData.html&#34;&gt;https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/MonitoringLogData.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;[2] CloudWatch Metric Filters Regex&lt;/strong&gt; - &lt;a href=&#34;https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/FilterAndPatternSyntax.html&#34;&gt;https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/FilterAndPatternSyntax.html&lt;/a&gt;&lt;/p&gt;
</description>
                
                
                
                
                
                    
                        
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/categories/devops/">DevOps</category>
                                
                            
                        
                    
                        
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/aws/">AWS</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/cloudwatch/">CloudWatch</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/log/">log</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/metrics/">metrics</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/shell/">shell</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/cloud/">Cloud</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/devops/">DevOps</category>
                                
                            
                        
                    
                
            </item>
        
            <item>
                <title>ECXCapture: AWS ECS/EC2 Easy Tcpdump Tool</title>
                <link>https://cloudtelcohub.com/posts/aws-ecs-ec2-easy-tcpdump/</link>
                <guid isPermaLink="true">https://cloudtelcohub.com/posts/aws-ecs-ec2-easy-tcpdump/</guid>
                <pubDate>Sat, 06 Jan 2024 23:09:47 -0800</pubDate>
                
                    <author>hyavari26@gmail.com (Hossein Yavari)</author>
                
                <copyright>[Reposting requires attribution, **use canonical links** &gt;&gt;](https://en.wikipedia.org/wiki/Canonical_link_element)</copyright>
                
                    <description>&lt;p&gt;&lt;img src=&#34;https://cloudtelcohub.com/images/aws-ecs-ec2-easy-tcpdump/ECXCapture.jpg&#34; alt=&#34;ECXCapture Image&#34;&gt;&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;ve recently developed a straightforward yet, in my opinion, a quite handy tool for network troubleshooting. This tool simplifies the process of obtaining tcpdump from your AWS ECS tasks or EC2 instances directly from your desktop, all in one place!&lt;/p&gt;
&lt;p&gt;While it may not boast the latest buzzwords like LLM and AI that seem to be popping up everywhere these days, it serves a practical purpose for tech enthusiasts who want a quick glance at the tcpdump of their servers with just a few simple steps.&lt;/p&gt;
&lt;p&gt;You can access this Python tool on GitHub at:&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://github.com/hyavari/ECXCapture&#34;&gt;&lt;strong&gt;ECXCapture GitHub Repository&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;All the necessary details are included in the repository&amp;rsquo;s README, but feel free to reach out if you encounter any issues.&lt;/p&gt;
&lt;p&gt;Do not forget to star it :)&lt;/p&gt;
&lt;p&gt;Give it a go and kick off the troubleshooting journey! 😊&lt;/p&gt;
</description>
                
                
                
                
                
                    
                        
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/categories/networking/">Networking</category>
                                
                            
                        
                    
                        
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/aws/">AWS</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/ec2/">EC2</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/ecs/">ECS</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/tcpdump/">tcpdump</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/wireshark/">Wireshark</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/sip/">SIP</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/rtp/">RTP</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/networking/">Networking</category>
                                
                            
                        
                    
                
            </item>
        
            <item>
                <title>iPhone Live Voicemail</title>
                <link>https://cloudtelcohub.com/posts/iphone-live-voicemail/</link>
                <guid isPermaLink="true">https://cloudtelcohub.com/posts/iphone-live-voicemail/</guid>
                <pubDate>Wed, 20 Sep 2023 19:38:45 -0700</pubDate>
                
                    <author>hyavari26@gmail.com (Hossein Yavari)</author>
                
                <copyright>[Reposting requires attribution, **use canonical links** &gt;&gt;](https://en.wikipedia.org/wiki/Canonical_link_element)</copyright>
                
                    <description>&lt;p&gt;&lt;img src=&#34;https://cloudtelcohub.com/images/iphone-live-voicemail/LiveVoicemail.jpg&#34; alt=&#34;iOS 17 Live Voicemail Image&#34;&gt;&lt;/p&gt;
&lt;p&gt;Probably you have updated your iPhone iOS recently to version 17 and the only thing that in the first place you have recognized, it was the phone screen when someone calls you. You can find a Voicemail icon that represents the new &lt;a href=&#34;https://support.apple.com/en-ca/HT213877&#34;&gt;&lt;strong&gt;Live Voicemail&lt;/strong&gt;&lt;/a&gt; feature.&lt;/p&gt;
&lt;p&gt;This feature lets you get real-time transcription of the caller&amp;rsquo;s message and if you want to answer the call or reject it. In other words, your voicemail would be on your phone not on your carrier side anymore. It somehow reminds me Google Pixel Call screening.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://cloudtelcohub.com/images/iphone-live-voicemail/LiveVoicemail-iOS117.jpg&#34; alt=&#34;iPhone Live Voicemail Image&#34;&gt;&lt;/p&gt;
&lt;p&gt;Anyway, I was testing this feature with our IMS core to see how it might affect conditional call forwarding. As you know when Live Voicemail is enabled, for call forwarding busy and unanswered, the device answers the call and records it ( and transcribes it).&lt;/p&gt;
&lt;p&gt;So Apple has considered that the default call forwarding destination is voicemail. However, if subscribers change the forwarding destination to another number, they need to disable Live Voicemail and let the carrier handle call forwarding to the desired number. Otherwise, your calls will be answered by Live Voicemail.&lt;/p&gt;
&lt;p&gt;For call forwarding unconditional (CFU) and unreachable (CFNRC), as the operator decides, it follows the subscriber&amp;rsquo;s settings and the carrier handles the subscriber&amp;rsquo;s voicemail.&lt;/p&gt;
&lt;p&gt;In conclusion, technically carrier doesn&amp;rsquo;t need to do anything with this feature, just might push some knowledge to their customer service about it if the subscriber claims that their conditional settings do not work properly.&lt;/p&gt;
&lt;h4 id=&#34;reminder-you-can-change-cf-settings-on-iphone-with-these-codes&#34;&gt;Reminder: You can change CF* settings on iPhone with these codes:&lt;/h4&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Forwarding no answer: **61*1+PhoneNumber#&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Forwarding unreachable: **62*1+PhoneNumber#&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Forwarding on busy/reject: **67*1+PhoneNumber#&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;strong&gt;For Android, it is doable via &lt;code&gt;Supplementary settings&lt;/code&gt; on Call Settings menu.&lt;/strong&gt;&lt;/p&gt;
</description>
                
                
                
                
                
                    
                        
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/categories/ims/">IMS</category>
                                
                            
                        
                    
                        
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/iphone/">iPhone</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/apple/">Apple</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/ios/">iOS</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/voicemail/">Voicemail</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/ims/">IMS</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/volte/">VoLTE</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/vonr/">VoNR</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/live-voicemail/">Live-Voicemail</category>
                                
                            
                        
                    
                
            </item>
        
            <item>
                <title>X2/X3 Lawful Interception Dissector</title>
                <link>https://cloudtelcohub.com/posts/x2_x3_lawful_interception_dissector/</link>
                <guid isPermaLink="true">https://cloudtelcohub.com/posts/x2_x3_lawful_interception_dissector/</guid>
                <pubDate>Thu, 24 Aug 2023 23:24:53 -0700</pubDate>
                
                    <author>hyavari26@gmail.com (Hossein Yavari)</author>
                
                <copyright>[Reposting requires attribution, **use canonical links** &gt;&gt;](https://en.wikipedia.org/wiki/Canonical_link_element)</copyright>
                
                    <description>&lt;p&gt;&lt;img src=&#34;https://cloudtelcohub.com/images/x2_x3_lawful_interception_dissector/Spy-Gorilla-meets-the-mountain-gorillas-of-Uganda.png&#34; alt=&#34;Spying in wild Image&#34;&gt;
&lt;em&gt;Caption:  Photo courtesy of John Downer Productions&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Lawful Interception (LI) standard play a crucial role in enabling lawful interception activities by authorized entities for security and intelligence purposes. These protocols allow the interception and monitoring of communication services while adhering to legal requirements. If you&amp;rsquo;re involved in IMS/mobile core or other telephony networks development, or communication analysis and security, you&amp;rsquo;ll find a dissector besides &lt;a href=&#34;https://www.wireshark.org/&#34;&gt;&lt;strong&gt;Wireshark&lt;/strong&gt;&lt;/a&gt; be an invaluable addition to your toolkit. In this blog post, I&amp;rsquo;ll introduce you to &lt;strong&gt;x2x3PduDissector&lt;/strong&gt;, a powerful &lt;em&gt;Lua-based&lt;/em&gt; Wireshark dissector for analyzing LI (X2/X3 PDU Format) packets.&lt;/p&gt;
&lt;h2 id=&#34;what-is-x2x3pdudissector&#34;&gt;What is x2x3PduDissector?&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;x2x3PduDissector&lt;/strong&gt; is an &lt;em&gt;open-source&lt;/em&gt; project available on &lt;a href=&#34;https://github.com/hyavari&#34;&gt;&lt;em&gt;GitHub&lt;/em&gt;&lt;/a&gt; that provides a Wireshark Lua script for dissecting LI packets. The script is designed to decode various fields within the X2/X3 PDU Format, making it easier for network analysts to understand and interpret captured traffic related to this protocol.&lt;/p&gt;
&lt;h4 id=&#34;key-features&#34;&gt;Key Features:&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;It is based on ETSI TS 103 221-2 V1.4.1 - April 2021&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;

 0                   1                   2                   3 
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|           Version             |           PDU Type  
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                           Header Length
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                           Payload Length
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|        Payload Format         |     Payload Direction
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                       
|
|                               XID
|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                           Correlation ID
|    
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|        Conditional Attribute Fields (Variable Length)            
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                     Payload (Variable Length)                
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Version, PDU Type, Header Length, Payload Length, Payload Format, Payload Direction, XID (UUID), Correlation ID, and Conditional Attributes are all decoded for thorough analysis.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Payload interpretation for RTP and SIP messages is included.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Conditional attributes are dissected as Type-Length-Value (TLV) structures.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The script enhances the analysis of LI packets by providing a clear representation of the protocol&amp;rsquo;s fields and their semantic meanings.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&#34;usage&#34;&gt;Usage:&lt;/h4&gt;
&lt;p&gt;To use x2x3PduDissector, follow these steps:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Clone or download the repository from GitHub: &lt;a href=&#34;https://github.com/hyavari/x2x3PduDissector&#34;&gt;https://github.com/hyavari/x2x3PduDissector&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Place the Lua script in Wireshark&amp;rsquo;s Plugins directory or load it manually through the &amp;ldquo;Tools &amp;gt; Lua &amp;gt; Evaluate&amp;rdquo; menu.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Once loaded, the script will automatically dissect packets using the &amp;ldquo;X2X3&amp;rdquo; protocol.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Example Output:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://cloudtelcohub.com/images/x2_x3_lawful_interception_dissector/Wireshark-x2x3PduDissector.jpg&#34; alt=&#34;Spying in wild Image&#34;&gt;&lt;/p&gt;
&lt;p&gt;Once the script is applied in Wireshark, you&amp;rsquo;ll see a detailed breakdown of each packet&amp;rsquo;s fields and values. This breakdown includes information such as the PDU type, payload format, XID (UUID), and more. Conditional attributes are dissected to provide a deeper insight into the packet&amp;rsquo;s content.&lt;/p&gt;
&lt;h4 id=&#34;contributions-and-enhancements&#34;&gt;Contributions and Enhancements:&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;x2x3PduDissector&lt;/strong&gt; is an open-source project, which means you can contribute to its development and enhancement. If you encounter any issues or want to improve its functionality, consider submitting pull requests or reporting issues on the project&amp;rsquo;s GitHub repository.&lt;/p&gt;
&lt;h4 id=&#34;notes&#34;&gt;Notes:&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;LI (X1/X2/X3) is standard, but most of the vendors do not follow the standards when they are using their proprietary software or implementation. So do Not be upset if this dissector can&amp;rsquo;t help you :)&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;I also implement a simple X2/X3 PDU decode in node.js. You can find it here: &lt;a href=&#34;https://github.com/hyavari/x2x3PduDecoder&#34;&gt;https://github.com/hyavari/x2x3PduDecoder&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;These repos are for half-day work and I will update them if I find any issues.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Always there is place for improvement, so please do not hesitate to contribute them.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Do not forget to sarring these projects :))&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
</description>
                
                
                
                
                
                    
                        
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/categories/ims/">IMS</category>
                                
                            
                        
                    
                        
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/ims/">IMS</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/li/">LI</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/x1/">X1</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/x2/">X2</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/x3/">X3</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/lawful-interception/">Lawful Interception</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/sip/">SIP</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/rtp/">RTP</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/wireshark/">Wireshark</category>
                                
                            
                        
                    
                
            </item>
        
            <item>
                <title>SIP PANI Header</title>
                <link>https://cloudtelcohub.com/posts/sip_pani_header/</link>
                <guid isPermaLink="true">https://cloudtelcohub.com/posts/sip_pani_header/</guid>
                <pubDate>Tue, 22 Aug 2023 12:36:39 -0700</pubDate>
                
                    <author>hyavari26@gmail.com (Hossein Yavari)</author>
                
                <copyright>[Reposting requires attribution, **use canonical links** &gt;&gt;](https://en.wikipedia.org/wiki/Canonical_link_element)</copyright>
                
                    <description>&lt;p&gt;&lt;img src=&#34;https://cloudtelcohub.com/images/sip_pani_header/mobile_bts_somewhere.jpg&#34; alt=&#34;Bing AI Generated Image&#34;&gt;&lt;/p&gt;
&lt;p&gt;If you are testing an NG911 IMS call, one of the most important pieces of info that the NG911 network (including LRF, NGCS, PSAP, &amp;hellip;) expects from your SoS SIP INVITE is the &lt;code&gt;P-Access-Network-Info&lt;/code&gt; or &lt;strong&gt;PANI&lt;/strong&gt; header. This header carries the information about the UE/Subscriber device location.&lt;/p&gt;
&lt;p&gt;If you are using testing platforms like SITE (Mobileum/SIGOS), you have some configs in the test case that need to manipulate based on the requirements.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://cloudtelcohub.com/images/sip_pani_header/SIGOS_SITE_PANI.jpg&#34; alt=&#34;SIGOS SITE PANI Configs Image&#34;&gt;&lt;/p&gt;
&lt;p&gt;But let&amp;rsquo;s focus on TAC (Tracking Area Code) and ECI (E-UTRAN Cell Identity) values. In the screenshot, the values are in decimal, and if you do the simple calculations you get these:&lt;/p&gt;
&lt;p&gt;TAC: 55519 =&amp;gt; D8DF HEX&lt;/p&gt;
&lt;p&gt;ECI: 139116310 =&amp;gt; 84ABF16 HEX&lt;/p&gt;
&lt;p&gt;Now if you check a sample SIP PANI header that is like below, It would be a little more meaningful:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;P-Access-Network-Info: 3GPP-E-UTRAN-FDD;utran-cell-id-3gpp=303230D8DF84ABF16&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;let&amp;rsquo;s split the header value:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;3GPP-E-UTRAN-FDD,  utran-cell-id-3gpp,  303,  230,  D8DF,  84ABF16&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;The first part is radio access technology or access-type =&amp;gt; &lt;code&gt;3GPP-E-UTRAN-FDD&lt;/code&gt;. access-type field is followed by the access-info: &lt;code&gt;utran-cell-id-3gpp&lt;/code&gt; which identifies the cell that provides network access. And after equal, you have the Cell ID / CGI which its pattern is &lt;code&gt;MCC + MNC + TAC HEX Value + ECI HEX Value&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;This info would be useful if you need to fake the header value for testing purposes.&lt;/p&gt;
&lt;p&gt;Have fun :)&lt;/p&gt;
</description>
                
                
                
                
                
                    
                        
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/categories/ims/">IMS</category>
                                
                            
                        
                    
                        
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/ims/">IMS</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/sip/">SIP</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/rtp/">RTP</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/volte/">VoLTE</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/testing/">Testing</category>
                                
                            
                        
                    
                
            </item>
        
            <item>
                <title>RTP Decoder/Encoder</title>
                <link>https://cloudtelcohub.com/posts/rtp_decoder_encoder/</link>
                <guid isPermaLink="true">https://cloudtelcohub.com/posts/rtp_decoder_encoder/</guid>
                <pubDate>Sat, 19 Aug 2023 00:31:48 -0700</pubDate>
                
                    <author>hyavari26@gmail.com (Hossein Yavari)</author>
                
                <copyright>[Reposting requires attribution, **use canonical links** &gt;&gt;](https://en.wikipedia.org/wiki/Canonical_link_element)</copyright>
                
                    <description>&lt;p&gt;Ever faced the challenge of deciphering RTP packets nested within another protocol PDU? 🤔 I found myself in this exact situation today. Amidst the lack of a specialized protocol decoder in Wireshark, I decided to roll up my sleeves and craft a nifty RTP packet decoder and encoder using Python.&lt;/p&gt;
&lt;p&gt;Guess what? It worked like a charm! 🚀 I&amp;rsquo;ve shared this handy piece of code on Gist, with the aim of becoming a time-saving beacon for fellow developers. Imagine skipping hours of head-scratching and diving straight into efficient RTP packet handling.&lt;/p&gt;
&lt;p&gt;Curious to dive into the magic? 🧙‍♂️ Check out the code on my Gist and unlock the power to decode and encode RTP packets effortlessly. Let&amp;rsquo;s save someone, somewhere, precious time – one protocol at a time!&lt;/p&gt;
&lt;p&gt;Feel free to tweak this version to match your writing style and your audience&amp;rsquo;s preferences.&lt;/p&gt;
&lt;script src=&#34;https://gist.github.com/hyavari/1c74dfa900be73729887d3f009c98dcc.js&#34;&gt;&lt;/script&gt;</description>
                
                
                
                
                
                    
                        
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/categories/rtp/">RTP</category>
                                
                            
                        
                    
                        
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/rtp/">RTP</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/python/">Python</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/opensource/">opensource</category>
                                
                            
                        
                    
                
            </item>
        
            <item>
                <title>IMS Call Conferencing</title>
                <link>https://cloudtelcohub.com/posts/ims-call-conferencing/</link>
                <guid isPermaLink="true">https://cloudtelcohub.com/posts/ims-call-conferencing/</guid>
                <pubDate>Fri, 04 Aug 2023 14:40:09 -0700</pubDate>
                
                    <author>hyavari26@gmail.com (Hossein Yavari)</author>
                
                <copyright>[Reposting requires attribution, **use canonical links** &gt;&gt;](https://en.wikipedia.org/wiki/Canonical_link_element)</copyright>
                
                    <description>&lt;p&gt;&lt;img src=&#34;https://cloudtelcohub.com/images/ims-call-conferencing/OIG_Bing.jpg&#34; alt=&#34;Bing AI Generated Image&#34;&gt;&lt;/p&gt;
&lt;p&gt;Really call conferencing is not a feature that I am going to spend time on it to introduce to you or count its pros. We live in the web and cloud era and call/video conferencing, especially over WebRTC is mature enough. But again when you want to touch any feature like this in the 3GPP territory, might it be a little confusing. The idea is simple but it is a habit for some people that make the story complicated when they relate it.&lt;/p&gt;
&lt;p&gt;So in this blog post, I wanna share some technical points that I learned from implementing this feature for our IMS core over AWS. Aha, I should mention also that IMS (VoLTE/VoNR) call conferencing is actually a 3-way call, which means you would be on a call with two other subscribers, NOT more. They call it &lt;strong&gt;Ad-Hoc Multi Party Conference&lt;/strong&gt;, means subscriber creates conference room/call on the fly.&lt;/p&gt;
&lt;p&gt;Some of useful resources around IMS call conf if you want to get more details:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;https://portal.3gpp.org/desktopmodules/Specifications/SpecificationDetails.aspx?specificationId=1045&#34;&gt;&lt;strong&gt;3GPP TS 24.147&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;https://portal.3gpp.org/desktopmodules/Specifications/SpecificationDetails.aspx?specificationId=1120&#34;&gt;&lt;strong&gt;3GPP TS 24.605&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;https://www.eventhelix.com/ims/conference/&#34;&gt;&lt;strong&gt;IMS Conference Call Flow Diagrams&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;https://www.sharetechnote.com/html/Handbook_LTE_VoLTE_Conference.html&#34;&gt;&lt;strong&gt;ShareTechnote&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;https://docs.rhino.metaswitch.com/ocdoc/books/sentinel-volte-documentation/2.7.0/sentinel-volte-administration-guide/features/mmtel-features/mmtel-adhoc-conference/index.html&#34;&gt;&lt;strong&gt;MetaSwitch Rhino&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Let me make it very simple for you. UE-A is in call with UE-B, then puts call on hold and calls UE-C; then seems they need to talk to UE-B together, so UE-A puts UE-C on hold and sends a request for creating a conference room. X-CSCF gets this new INVITE which its To header includes &lt;code&gt;conference&lt;/code&gt; URI and forwards it to correct application server (TAS) to handle it. This is how call conferencing begins in IMS; like below call flow diagram:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://cloudtelcohub.com/images/ims-call-conferencing/IMS-Conf-Simple-Flow.jpg&#34; alt=&#34;IMS-Conf-Call-Flow Image&#34;&gt;&lt;/p&gt;
&lt;p&gt;Do not confuse by naming. TAS or Conference AS, focus or conference factory all are the same and it is actually the element that manages the conferencing creation, moving parties to it, and then removing it. Whatever you want, just name it :)&lt;/p&gt;
&lt;p&gt;The INVITE RURI could be like this:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://cloudtelcohub.com/images/ims-call-conferencing/Conf-INVITE-RURI.jpg&#34; alt=&#34;IMS-Conf-INVITE-RURI Image&#34;&gt;&lt;/p&gt;
&lt;p&gt;When AS accepts this request, it provides a media path via SIP 200 OK SDP. Note that AS might not handle media itself and works with another element as MRF (Media Resource Function). Actually, MRF mixes the media for the conference. When UE-A receives this OK and gets into the conference, it starts to ask AS to move UE-B and UE-C to the conference. For this purpose, UE-A uses SIP REFER message to address AS about call parties.&lt;/p&gt;
&lt;p&gt;Ok, so you need to handle REFER correctly. the &lt;code&gt;Refer-To&lt;/code&gt; header is the place including info that AS needs to know.&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;Refer-To: &amp;lt;sip:1XXX4292400;phone-context=ims.mncXXX.mccZZZ.3gppnetwork.org@ims.mncXXX.mccZZZ.3gppnetwork.org;user=phone;method=INVITE?Replaces=wooY93GbgDHgH7zV7xXS6g..%402001:56f:f800:117d:0:2a:002d:1c01%3Bto-tag%3D20132573814420238217146%3Bfrom-tag%3D43f1826a&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;This header includes &lt;code&gt;Call-ID&lt;/code&gt;, &lt;code&gt;from-tag&lt;/code&gt;, and &lt;code&gt;to-tag&lt;/code&gt; of the original calls. So UE-A sends separate REFER for each UE-B and UE-C.&lt;/p&gt;
&lt;p&gt;But how UE-A understands that other parties have been moved to the conference? with SIP NOTIFY. UE-A subscribes itself to notifications for conference dialog and then TAS keeps it updated about the steps that it does.&lt;/p&gt;
&lt;p&gt;First TAS says I am trying to move party to conference. So SIP NOTIFY has Sipfrag SDP with &lt;code&gt;Trying&lt;/code&gt; state:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://cloudtelcohub.com/images/ims-call-conferencing/Conf-SIP-Notify.jpg&#34; alt=&#34;IMS-Conf-Notify Image&#34;&gt;&lt;/p&gt;
&lt;p&gt;When UE moved to conf, TAS sends NOTIFY with OK 200 in the Sipfrag SDP:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://cloudtelcohub.com/images/ims-call-conferencing/Conf-SIP-Notify-OK.jpg&#34; alt=&#34;IMS-Conf-Notify Image&#34;&gt;&lt;/p&gt;
&lt;p&gt;At this point, all parties are in the conference, and from a signaling point of view, flow is normal to finish the call for all legs, except if the conference initiator (UE-A) wants to drop other parties from the conference, it sends another SIP REFER message that in &lt;code&gt;Refer-To&lt;/code&gt; header it says that party&amp;rsquo;s URI with method &lt;code&gt;BYE&lt;/code&gt;. If UE-A terminates the call, the whole conference call will be terminated.&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;Refer-To: &amp;lt;sip:1XXXY292400;phone-context=ims.mncXXX.mccZZZ.3gppnetwork.org@ims.mncXXX.mccZZZ.3gppnetwork.org;user=phone;method=BYE&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;This was a simple overview of the IMS call conferencing feature. But if you want to implement it I have some hints here:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Handle REFER message correctly. This is the only message that carries information about other parties.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;NOTIFY messages that you send to the conference initiator are implementation keys. When UE-A gets the correct &lt;code&gt;Sipfrag&lt;/code&gt; info for UE-B, it sends a second REFER for UE-C, otherwise, UE-A sends a BYE and terminates the calls.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;TAS or conference AS is a simple B2BUA telephony server with media mixing capability. So a &lt;a href=&#34;https://signalwire.com/freeswitch&#34;&gt;&lt;em&gt;FreeSwitch&lt;/em&gt;&lt;/a&gt; or maybe &lt;a href=&#34;https://www.asterisk.org/&#34;&gt;&lt;em&gt;Asterisk&lt;/em&gt;&lt;/a&gt; server can do the job for you. As we developed most of our services on &lt;em&gt;AWS&lt;/em&gt;, using the FreeSwitch on ECS or EC2 instances was the first option. But later we decided to put the maintenance responsibility on AWS&amp;rsquo;s shoulder and moved our conferencing factory to &lt;a href=&#34;https://aws.amazon.com/chime/&#34;&gt;&lt;em&gt;AWS Chime&lt;/em&gt;&lt;/a&gt;. Although AWS Chime also is using the FreeSwitch, at least we don&amp;rsquo;t care about the maintenance and other server stuff.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;More idea: &lt;a href=&#34;https://docs.aws.amazon.com/chime-sdk/latest/dg/mtgs-sdk-cvc.html&#34;&gt;https://docs.aws.amazon.com/chime-sdk/latest/dg/mtgs-sdk-cvc.html&lt;/a&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://www.wireshark.org/&#34;&gt;Wirehark&lt;/a&gt; is your only friend on this path, hug it :)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I will be really happy to help whoever wants to implement this feature or who is interested in getting more info about our IMS core. Just reach out to me with my contact info !&lt;/p&gt;
</description>
                
                
                
                
                
                    
                        
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/categories/ims/">IMS</category>
                                
                            
                        
                    
                        
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/ims/">IMS</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/sip/">SIP</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/rtp/">RTP</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/volte/">VoLTE</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/conferencing/">conferencing</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/aws/">AWS</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/chime/">Chime</category>
                                
                            
                        
                    
                
            </item>
        
            <item>
                <title>SIPREC Server on AWS</title>
                <link>https://cloudtelcohub.com/posts/siprec-server-on-aws/</link>
                <guid isPermaLink="true">https://cloudtelcohub.com/posts/siprec-server-on-aws/</guid>
                <pubDate>Fri, 30 Jun 2023 09:57:42 -0700</pubDate>
                
                    <author>hyavari26@gmail.com (Hossein Yavari)</author>
                
                <copyright>[Reposting requires attribution, **use canonical links** &gt;&gt;](https://en.wikipedia.org/wiki/Canonical_link_element)</copyright>
                
                    <description>&lt;p&gt;&lt;img src=&#34;https://cloudtelcohub.com/images/siprec-server-on-aws/forking.jpg&#34; alt=&#34;Forking in nature by Bing Image&#34;&gt;&lt;/p&gt;
&lt;p&gt;Any telco company and MNO must provide tools or interfaces to third-party companies or government agencies for monitoring or lawful interception (LI) purposes. There are various 3GPP standards for LI systems and their interfaces like X1/2/3 that you can refer to. In addition, sometimes when customers complain about calls and voice qualities, and customer services report it, it is required to have a tool to monitor a specific subscriber or bunch of subscribers to verify what the issue is or what causes that.&lt;/p&gt;
&lt;p&gt;No matter the 4G(VoLTE) or 5G network, the IMS core is the place where you need those tools or interfaces. Capturing SIP signaling is not complicated, and various options like P-CSCF or PGW exist to capture it. However, PGW is not your option for non-troubleshooting captures! the P-CSCF interfaces after IPSec decryption are one of the best places to fork SIP signaling for any purpose.&lt;/p&gt;
&lt;p&gt;Recently, using the &lt;a href=&#34;https://ebpf.io/&#34;&gt;&lt;strong&gt;eBPF&lt;/strong&gt;&lt;/a&gt; for this purpose is growing and it seems there are many valuable applications for that.&lt;/p&gt;
&lt;p&gt;For media capturing, methods are different. Real-Time Transport Protocol (RTP) plays a crucial role in enabling the transmission of multimedia data, such as audio and video, across the network. RTP protocol capturing in IMS involves the monitoring and analysis of RTP packets exchanged between IMS endpoints during communication sessions. By capturing RTP packets, network administrators and engineers gain valuable insights into the quality, performance, and troubleshooting of real-time media streams. This captured data can be used to analyze and diagnose issues related to voice and video call quality, jitter, latency, packet loss, and other metrics. The captured RTP packets are typically analyzed using specialized tools and protocols to extract information about the media streams, codecs used, timing, synchronization, and other relevant parameters, which in LI maps to the X3 interface.&lt;/p&gt;
&lt;p&gt;Using the networking interfaces of media servers, sniffing RTP packets, barging into the media session and call recording are some of the methods for media capturing and each has pros and cons. Although, &lt;strong&gt;eBPF&lt;/strong&gt; as I mentioned, could be really interesting for this purpose!&lt;/p&gt;
&lt;p&gt;Recently I worked on a SIPREC server to fork media sessions and later it lets us record the call or intercept the voice. If you are not familiar with SIPREC, please check my earlier post here: &lt;a href=&#34;https://cloudtelcohub.com/posts/siprec-with-rtpengine/&#34;&gt;&lt;strong&gt;SIPREC with RTPEngine&lt;/strong&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;This is the overall architecture:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://cloudtelcohub.com/images/siprec-server-on-aws/siprec-on-aws.jpg&#34; alt=&#34;siprec-on-aws architecure Image&#34;&gt;&lt;/p&gt;
&lt;p&gt;There are some facts that I didn’t mention in the diagram:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;All communications are secured by HTTPS or WSS.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Authentication is managed but Cognito.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;VPCLink and VPCE are used for more security in transport.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Obviously, the solution is on multi-region and cross-zone!&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Ok good, but what exactly we are doing?&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Calls are established normally which is out of the scope of this post ( I copied this from 3GPP docs :| )&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Provider logic detects that they need to do recording or forking for a specific call or specific subscriber.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Request is sent to SIPREC service API with information of call or subscriber.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;As a result of those information, lambda function logic extracts the hosting media server and sends all requisite information to the SIPREC server.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;SIPREC prepares the forking or subscribe request for the media server (e.g. RTPEngine for us) and then after some negotiation for codec and ports, SIPREC starts to receive call legs media streams or RTP packets.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Server can save media locally or sends a bunch of packets over WebSocket to lambda and then lambda process it or save it into S3.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;
&lt;li&gt;Please note that we have call SIP info, so decoding the media is not complicated.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Good to know that the SIPREC server does not have a very complicated implementation. It understands SDP, codec negotiation, and UDP connection management.&lt;/p&gt;
&lt;p&gt;Challenge: WebSocket API gateway on AWS has a 32KB frame size limitation: &lt;a href=&#34;https://docs.aws.amazon.com/apigateway/latest/developerguide/limits.html#apigateway-execution-service-websocket-limits-table&#34;&gt;https://docs.aws.amazon.com/apigateway/latest/developerguide/limits.html#apigateway-execution-service-websocket-limits-table&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;So for batching the RTP packets you need to take care of it and do fragmentation and etc.!&lt;/p&gt;
&lt;p&gt;Enjoy your day :))&lt;/p&gt;
</description>
                
                
                
                
                
                    
                        
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/categories/ims/">IMS</category>
                                
                            
                        
                    
                        
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/ims/">IMS</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/sip/">SIP</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/rtp/">RTP</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/rtpengine/">RTPEngine</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/opensource/">opensource</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/siprec/">SIPREC</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/li/">LI</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/aws/">AWS</category>
                                
                            
                        
                    
                
            </item>
        
            <item>
                <title>VoLTE on IPhone</title>
                <link>https://cloudtelcohub.com/posts/volte-on-iphone/</link>
                <guid isPermaLink="true">https://cloudtelcohub.com/posts/volte-on-iphone/</guid>
                <pubDate>Sun, 04 Jun 2023 10:49:45 -0700</pubDate>
                
                    <author>hyavari26@gmail.com (Hossein Yavari)</author>
                
                <copyright>[Reposting requires attribution, **use canonical links** &gt;&gt;](https://en.wikipedia.org/wiki/Canonical_link_element)</copyright>
                
                    <description>&lt;p&gt;&lt;img src=&#34;https://cloudtelcohub.com/images/volte-on-iphone/a-sky-full-of-stars-tor-ivar-naess.jpg&#34; alt=&#34;A sky full of stars Photograph by Tor-Ivar Naess Image&#34;&gt;&lt;/p&gt;
&lt;p&gt;If you are following my blog and have read my previous post about testing VoLTE in Samsung and Pixel handsets, I appreciate that, and this post is a quick update. If not, please review the first part &lt;a href=&#34;https://cloudtelcohub.com/posts/volte-pixel-vs-samsung/&#34;&gt;&lt;strong&gt;VoLTE in Pixel vs Samsung Phones&lt;/strong&gt;&lt;/a&gt; and then return here.&lt;/p&gt;
&lt;p&gt;When we were developing the IMS core, we used a Samsung handset as our engineering phone or test phone and everything seemed good. When we were ready to start testing phones from other brands, we got a report from the marketing and sales department about how different brands are popular in Canada. I think you can guess that iPhone is at the top of the list! and then Samsung and Google Pixel and other brands like LG, Xiaomi, etc. following.&lt;/p&gt;
&lt;p&gt;But testing VoLTE on iPhone is not straightforward because it needs &lt;strong&gt;Entitlement Service&lt;/strong&gt;. I will go to the details of the entitlement service in another post but in simple definition, an entitlement server is a set of specifications to allow mobile operators to enable and disable services and features on end-user devices and iPhone queries this service to know that VoLTE is enabled in the network or not and then attach to &lt;strong&gt;IMS APN&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;So, we started implementing entitlement service as well, and a few weeks ago we could start testing iPhones. Fortunately, iPhone doesn&amp;rsquo;t do any weird behavior and everything looks normal and standard. It can be registered in our IMS and make voice calls and SMS.&lt;/p&gt;
&lt;p&gt;The only point that I noticed is that iPhone sends &lt;strong&gt;SMS over IPSec/UDP&lt;/strong&gt;, while all voice call SIP messages are over TCP.&lt;/p&gt;
&lt;p&gt;Also in &lt;strong&gt;SIP headers&lt;/strong&gt;, iPhone sends &lt;code&gt;Session-ID&lt;/code&gt; that might be useful in B2BUA cases. I should investigate more about how we can use it! but you can check this &lt;a href=&#34;https://datatracker.ietf.org/doc/rfc7329/&#34;&gt;&lt;strong&gt;RFC 7329&lt;/strong&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;If I find anything new or interesting about iPhone VoLTE, will keep you posted.&lt;/p&gt;
&lt;p&gt;Take care :)&lt;/p&gt;
</description>
                
                
                
                
                
                    
                        
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/categories/volte/">VoLTE</category>
                                
                            
                        
                    
                        
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/ims/">IMS</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/volte/">VoLTE</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/sip/">SIP</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/pixel/">Pixel</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/samsung/">Samsung</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/iphone/">iPhone</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/ipsec/">IPSec</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/test/">Test</category>
                                
                            
                        
                    
                
            </item>
        
            <item>
                <title>VoLTE in Pixel vs Samsung Phones</title>
                <link>https://cloudtelcohub.com/posts/volte-pixel-vs-samsung/</link>
                <guid isPermaLink="true">https://cloudtelcohub.com/posts/volte-pixel-vs-samsung/</guid>
                <pubDate>Wed, 03 May 2023 21:39:20 -0700</pubDate>
                
                    <author>hyavari26@gmail.com (Hossein Yavari)</author>
                
                <copyright>[Reposting requires attribution, **use canonical links** &gt;&gt;](https://en.wikipedia.org/wiki/Canonical_link_element)</copyright>
                
                    <description>&lt;p&gt;&lt;img src=&#34;https://cloudtelcohub.com/images/volte-pixel-vs-samsung/Night_Photography.jpg&#34; alt=&#34;Night Photography from Wikimedia Image&#34;&gt;&lt;/p&gt;
&lt;p&gt;When you are implementing mobile core services, and struggling with ridiculous 3GPP standards, (don&amp;rsquo;t panic, if you work with those docs, you can understand what I am saying! ), you should be grateful if you have a production reference capture. In this step, you probably can test some of your functions and at least try to achieve the same output or data structure.&lt;/p&gt;
&lt;p&gt;But in the next step, you need to test it in the field with a real network, sim card, and handset. This step is not very straight forward and because of that, some companies sell testers for these types of mobile services, like &lt;a href=&#34;https://www.mobileum.com/&#34;&gt;SIGOS&lt;/a&gt;. But after all, production is something else :) so don&amp;rsquo;t be so happy if everything seems OK in the lab environment.&lt;/p&gt;
&lt;p&gt;From my experience, testing services with real phones from different brands, lets you see various behaviors and then add correct handlers into your implementation. Do not forget that you can not find these things in the 3GPP standards, especially in IMS and VoLTE, because it&amp;rsquo;s very device dependent.&lt;/p&gt;
&lt;p&gt;I guess you know the context now, then let&amp;rsquo;s deep dive into the main subject of this post: VoLTE behaviors in Google Pixel vs Samsung. I did various tests with Pixel 3a and 6Pro, Samsung S8+, and Samsung S22. Different models of each brand don&amp;rsquo;t have much difference as they are using the same IMS client app, but the two brands are quite different. I found a few of them and have listed them below:&lt;/p&gt;
&lt;h4 id=&#34;1--ipsec&#34;&gt;1- IPSec&lt;/h4&gt;
&lt;p&gt;The first thing you need to have for VoLTE is IPSec. IPSec in Samsung phones is very straightforward. The device sends a REGISTER over TCP to P-CSCF and offered its IPSec SAs, then P-CSCF send 401 with Server IPSec SAs info and then the next REGISTER from UE would be sent over the IPSec tunnel to P-CSCF.&lt;/p&gt;
&lt;p&gt;These tunnels would be used while registration is valid. The point is that Samsung phones send all the SIP signaling requests and responses over ESP with TCP transport, something that they agreed with REGISTER, whereas Pixel phones do not follow this rule and they send some SIP messages over ESP packets but to UDP transport!&lt;/p&gt;
&lt;p&gt;In other words, if you want to support Pixel phones, you need to establish IPSec tunnels and listeners for both UDP and TCP.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://cloudtelcohub.com/images/volte-pixel-vs-samsung/Pixel-UDP-SIP-ACK.jpg&#34; alt=&#34;Pixel UDP SIP ACK Image&#34;&gt;&lt;/p&gt;
&lt;p&gt;**as you can see in the image, VIA transport is UDP, but RURI transport is TCP. It is really weird!&lt;/p&gt;
&lt;h4 id=&#34;2--sms-over-ip&#34;&gt;2- SMS over IP&lt;/h4&gt;
&lt;p&gt;As you see, Pixel needs the UDP listeners as well in P-CSCF IPSec; it seems if the size of the message is small it uses UDP otherwise it uses TCP transport messages that are encapsulated in ESP packets. Another case that is different in Pixel is SMS over IP or SMS in VoLTE. Samsung always sends SMS over TCP, while Pixel sends over UDP!&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://cloudtelcohub.com/images/volte-pixel-vs-samsung/Pixel-UDP-MESSAGEE.jpg&#34; alt=&#34;Pixel UDP SIP MESSAGE Image&#34;&gt;&lt;/p&gt;
&lt;h4 id=&#34;3--dedicated-bearer&#34;&gt;3- Dedicated Bearer&lt;/h4&gt;
&lt;p&gt;One of the VoLTE requirements is the dedicated bearer; which you create a bearer for media (/signaling) when the call is established. It helps that PGW and other elements in the network respect the media traffic and provide enough bandwidth and QoS.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://cloudtelcohub.com/images/volte-pixel-vs-samsung/Pixel-Dedicated-Bearer.jpg&#34; alt=&#34;Pixel Dedicated Bearer Issue Image&#34;&gt;&lt;/p&gt;
&lt;h4 id=&#34;4--sip-headers&#34;&gt;4- SIP Headers&lt;/h4&gt;
&lt;p&gt;Another minor difference between Pixel and Samsung is using TEL URI and SIP URI. Pixel uses TEL URI for the To header but Samsung always sends the SIP URI in headers including To. It is important because if you developed an in-house SIP stack, you need to add TEL URI parsing capability into it.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;to be continued&amp;hellip;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Still might be other differences in IMS clients in these popular brands, so whenever I face with, I will update this post. Although, I will add iPhone and other tested brands soon.&lt;/p&gt;
</description>
                
                
                
                
                
                    
                        
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/categories/volte/">VoLTE</category>
                                
                            
                        
                    
                        
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/ims/">IMS</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/volte/">VoLTE</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/sip/">SIP</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/pixel/">Pixel</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/samsung/">Samsung</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/ipsec/">IPSec</category>
                                
                            
                        
                    
                
            </item>
        
            <item>
                <title>AWS NLB Is Transparent</title>
                <link>https://cloudtelcohub.com/posts/aws-nlb-is-transparent/</link>
                <guid isPermaLink="true">https://cloudtelcohub.com/posts/aws-nlb-is-transparent/</guid>
                <pubDate>Thu, 06 Apr 2023 09:13:14 -0700</pubDate>
                
                    <author>hyavari26@gmail.com (Hossein Yavari)</author>
                
                <copyright>[Reposting requires attribution, **use canonical links** &gt;&gt;](https://en.wikipedia.org/wiki/Canonical_link_element)</copyright>
                
                    <description>&lt;p&gt;&lt;img src=&#34;https://cloudtelcohub.com/images/aws-nlb-is-transparent/Jellyfish_transparency.jpg&#34; alt=&#34;Jellyfish Quanta Magazine Image&#34;&gt;&lt;/p&gt;
&lt;p&gt;Hi readers, I just came to share a short story (actually a fact) that I learned recently with you that might not be new to you! The &lt;a href=&#34;https://aws.amazon.com/elasticloadbalancing/getting-started/?nc=sn&amp;amp;loc=4&#34;&gt;&lt;strong&gt;Elastic Load balancer&lt;/strong&gt;&lt;/a&gt; is one of the typical services of AWS that you usually have a case that needs it. It is the same here and we are using &lt;a href=&#34;https://docs.aws.amazon.com/elasticloadbalancing/latest/application/introduction.html&#34;&gt;ALB (Application Load Balancer)&lt;/a&gt; and &lt;a href=&#34;https://docs.aws.amazon.com/elasticloadbalancing/latest/network/introduction.html&#34;&gt;NLB (Network Load Balancer)&lt;/a&gt; in our services. But I noticed a fact about AWS NLB that changed my assumptions. NLB does pass through the TCP connections to the targets, so it is transparent!&lt;/p&gt;
&lt;p&gt;If a target goes down, health checks for the target will fail and the target will be marked as unhealthy. NLB will stop routing traffic to that target and reroute traffic to remaining healthy targets.&lt;/p&gt;
&lt;p&gt;The TCP sessions are terminated on the target(s) in a target group. The NLB selects a target (whichever is healthy) based on the load balancing algorithm and the selected target return responses to the client. Basically, the NLB is transparent to client requests! My assumption was that NLB terminates the session into itself and then creates a session to target! Something like offloading feature in TLS mode was expected.&lt;/p&gt;
&lt;p&gt;Other relevant facts:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;NLB is not a gateway! you can not convert attach UDP target to a TCP load balancer.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;NLB doesn&amp;rsquo;t do failover at the session level. If you lose the target, the client will lose the established connection, so need to establish a new connection with the new target.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Hope this short blog, corrects the wrong assumption of someone :))&lt;/p&gt;
</description>
                
                
                
                
                
                    
                        
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/categories/networking/">Networking</category>
                                
                            
                        
                    
                        
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/aws/">AWS</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/elb/">ELB</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/nlb/">NLB</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/tcp/">TCP</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/networking/">Networking</category>
                                
                            
                        
                    
                
            </item>
        
            <item>
                <title>SDP Bandwidth Attributes</title>
                <link>https://cloudtelcohub.com/posts/sdp-bandwidth-attributes/</link>
                <guid isPermaLink="true">https://cloudtelcohub.com/posts/sdp-bandwidth-attributes/</guid>
                <pubDate>Wed, 22 Mar 2023 00:31:53 -0700</pubDate>
                
                    <author>hyavari26@gmail.com (Hossein Yavari)</author>
                
                <copyright>[Reposting requires attribution, **use canonical links** &gt;&gt;](https://en.wikipedia.org/wiki/Canonical_link_element)</copyright>
                
                    <description>&lt;p&gt;&lt;img src=&#34;https://cloudtelcohub.com/images/sdp-bandwidth-attributes/bing.jpg&#34; alt=&#34;Narrow Nature Image&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://www.ietf.org/rfc/rfc2327.txt&#34;&gt;Session Description Protocol (SDP)&lt;/a&gt; is a communication protocol used for describing multimedia sessions between two or more endpoints. SDP provides a standardized way of describing the parameters of a multimedia session, including IPs, ports, codecs and the bandwidth requirements for each media stream. In this blog post, we&amp;rsquo;ll discuss the SDP bandwidth attributes and how they are used to specify the bandwidth requirements for media streams.&lt;/p&gt;
&lt;h1 id=&#34;sdp-bandwidth-attributes&#34;&gt;SDP Bandwidth Attributes&lt;/h1&gt;
&lt;p&gt;The SDP includes an optional bandwidth attribute with the following syntax:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;b=&amp;lt;modifier&amp;gt;:&amp;lt;bandwidth-value&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;modifier&gt; is a single alphanumeric word giving the meaning of the bandwidth figure, and where the default units for &lt;bandwidth-value&gt; are kilobits per second.&lt;/p&gt;
&lt;p&gt;SDP defines three bandwidth attributes that can be used to specify the bandwidth requirements for a media stream. These attributes are:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&amp;ldquo;b=AS&amp;rdquo;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The &amp;ldquo;b=AS&amp;rdquo; attribute for Application Specific (AS) which may be used to specify the total bandwidth for a single media stream from one site (source) in kilobits per second (kbps). This attribute indicates the maximum amount of bandwidth that the endpoint is willing to allocate for the stream. For example, if the &amp;ldquo;b=AS&amp;rdquo; attribute is set to 256 kbps, the endpoint will allocate at least 256 kbps for the stream.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&amp;ldquo;b=RS&amp;rdquo;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The &amp;ldquo;b=RS&amp;rdquo; attribute indicates the RTCP bandwidth allocated to active data senders. For example, if the &amp;ldquo;b=RS&amp;rdquo; attribute is set to 800 bps, the endpoint will reserve at least 800 bps for the RTCP stream to ensure a certain level of QoS, which is used for reporting and monitoring purposes in a multimedia session.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&amp;ldquo;b=RR&amp;rdquo;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The &amp;ldquo;b=RR&amp;rdquo; attribute or Receiver Report (RR) indicates the RTCP bandwidth allocated to other participants in the RTP session (i.e.receivers). For example, if the &amp;ldquo;b=RR&amp;rdquo; attribute is set to 2000 bps, the endpoint will allocate up to 2000 bps for the RTCP stream for receivers.&lt;/p&gt;
&lt;p&gt;RS and RR attributes are used to ensure that RTCP traffic does not consume more bandwidth than necessary.&lt;/p&gt;
&lt;p&gt;For example:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;2
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;3
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;4
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;5
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nv&#34;&gt;m&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;audio &lt;span class=&#34;m&#34;&gt;50000&lt;/span&gt; RTP/AVP &lt;span class=&#34;m&#34;&gt;0&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nv&#34;&gt;a&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;rtpmap:0 PCMU/8000
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nv&#34;&gt;b&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;AS:80
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nv&#34;&gt;b&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;RS:1000
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nv&#34;&gt;b&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;RR:2400&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;In this example, &amp;ldquo;b=AS:80&amp;rdquo; would indicate a maximum bitrate of 80 kbps for the media stream. The &amp;ldquo;b=RS:1000&amp;rdquo; attribute is specified at the media level for an audio stream. It indicates that the application expects to receive no more than an average of 1000 bytes per second of RTCP traffic for the duration of the session. &amp;ldquo;b=RR:2400&amp;rdquo; would indicate that the endpoint is willing to receive a maximum of 2400 bytes per second for the RTCP traffic.&lt;/p&gt;
&lt;h1 id=&#34;using-sdp-bandwidth-attributes&#34;&gt;Using SDP Bandwidth Attributes&lt;/h1&gt;
&lt;p&gt;SDP bandwidth attributes are typically used in session negotiation between two endpoints to specify the bandwidth requirements for media streams. For example, when two endpoints negotiate a session for a video conference, they can use SDP bandwidth attributes to negotiate the bandwidth requirements for the video stream.&lt;/p&gt;
&lt;p&gt;The endpoint that initiates the session typically includes SDP bandwidth attributes in the session description to specify its bandwidth requirements for the media streams. The other endpoint can then use these attributes to determine whether it can meet the bandwidth requirements and negotiate the session accordingly. In IMS networks, as QoS is important, usually mobile handsets or UEs put the &amp;ldquo;b&amp;rdquo; params in the SIP messages like INVIITE, 183, and 200 whhich includes SDP.&lt;/p&gt;
&lt;p&gt;If the &amp;ldquo;b=RS:&amp;rdquo; field or &amp;ldquo;b=RR:&amp;rdquo; field or both these fields are not included in a received SDP (offer or answer), then the UE must use the recommended default value for the missing field(s) as defined in RFC 3556[1].&lt;/p&gt;
&lt;p&gt;But if the UE receives an SDP offer that contains &amp;ldquo;b=RS&amp;rdquo; attribute set to zero, then the UE must set the &amp;ldquo;b=RS&amp;rdquo; attribute to zero in an SDP answer to that SDP offer. If the UE receives an SDP offer that contains &amp;ldquo;b=RR&amp;rdquo; attribute set to zero, then the UE must set the &amp;ldquo;b=RR&amp;rdquo; attribute to zero in an SDP answer to that SDP offer. If the UE receives an SDP offer that contains both &amp;ldquo;b=RR&amp;rdquo; and &amp;ldquo;b=RS&amp;rdquo; attributes set to zero, then the UE must not send RTCP packets and must consider RTCP to be disabled for the session.&lt;/p&gt;
&lt;p&gt;It is important to know that we need this bandwidth info for &lt;strong&gt;Dedicated Bearer&lt;/strong&gt; setup that I will cover in another post soon.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://cloudtelcohub.com/images/sdp-bandwidth-attributes/SDP-UE-Sample.jpg&#34; alt=&#34;UE SDP Offer Image&#34;&gt;&lt;/p&gt;
&lt;h1 id=&#34;sdp-bandwidth-attributes-and-rtpengine&#34;&gt;SDP Bandwidth Attributes and RTPEngine&lt;/h1&gt;
&lt;p&gt;If you are using the RTPEngine as RTP proxy server, I should tell you that it doesn&amp;rsquo;t care about &amp;ldquo;b=&amp;rdquo; atributes and you have to add or remove them manually. You should know that if you transcode, for example, from AMR to PCMU, and do not handle the bandwidth parameters manually, as RTPEngine does not handle &amp;ldquo;b=&amp;rdquo; in SDP answers, the receiver receives these parameters, and if applied, voice quality would suffer.&lt;/p&gt;
&lt;p&gt;For example, UE sends SDP &amp;ldquo;b=AS:50&amp;rdquo; and with AMR codec, but the receiver supports only PCMU, so RTPEngine does transcoding for us, then receiver gets PCMU codec with &amp;ldquo;b=AS:50&amp;rdquo;, and if it applies the bandwidth, it assigns 50 Kbps to PCMU stream that is not enough!&lt;/p&gt;
&lt;h1 id=&#34;conclusion&#34;&gt;Conclusion&lt;/h1&gt;
&lt;p&gt;SDP bandwidth attributes provide a standardized way of specifying the bandwidth requirements for multimedia sessions. These attributes can be used to ensure a certain level of QoS for media streams and to negotiate sessions between two endpoints. By understanding how SDP bandwidth attributes work, you can ensure that your multimedia sessions meet your bandwidth requirements and provide a high level of quality of service.&lt;/p&gt;
&lt;h1 id=&#34;usefule-links&#34;&gt;Usefule Links:&lt;/h1&gt;
&lt;p&gt;&lt;strong&gt;[1] RFC 4556&lt;/strong&gt; - &lt;a href=&#34;https://datatracker.ietf.org/doc/html/rfc3556&#34;&gt;https://datatracker.ietf.org/doc/html/rfc3556&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;[2] GSMA IR92&lt;/strong&gt; - &lt;a href=&#34;https://www.gsma.com/newsroom/resources/ir-92-ims-profile-for-voice-and-sms-17-0/&#34;&gt;https://www.gsma.com/newsroom/resources/ir-92-ims-profile-for-voice-and-sms-17-0/&lt;/a&gt;&lt;/p&gt;
</description>
                
                
                
                
                
                    
                        
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/categories/rtp/">RTP</category>
                                
                            
                        
                    
                        
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/ims/">IMS</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/sip/">SIP</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/rtp/">RTP</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/sdp/">SDP</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/rtpengine/">RTPEngine</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/opensource/">opensource</category>
                                
                            
                        
                    
                
            </item>
        
            <item>
                <title>SIP and UDP Fragmentation</title>
                <link>https://cloudtelcohub.com/posts/sip-and-udp-fragmentation/</link>
                <guid isPermaLink="true">https://cloudtelcohub.com/posts/sip-and-udp-fragmentation/</guid>
                <pubDate>Fri, 17 Mar 2023 12:10:35 -0700</pubDate>
                
                    <author>hyavari26@gmail.com (Hossein Yavari)</author>
                
                <copyright>[Reposting requires attribution, **use canonical links** &gt;&gt;](https://en.wikipedia.org/wiki/Canonical_link_element)</copyright>
                
                    <description>&lt;p&gt;&lt;img src=&#34;https://cloudtelcohub.com/images/sip-and-udp-fragmentation/R.jpg&#34; alt=&#34;Fragmented Nature Photograph by Anna Azmitia Image&#34;&gt;&lt;/p&gt;
&lt;p&gt;MTU (Maximum Transmission Unit) is a critical networking parameter that defines the maximum size of a network packet that can be transmitted over a network interface. In general, larger MTUs can result in higher network performance by reducing the number of packets required to transmit a given amount of data. However, when network packets exceed the MTU of the underlying network infrastructure, they must be fragmented into smaller packets before transmission.&lt;/p&gt;
&lt;p&gt;This is especially important for UDP (User Datagram Protocol) packets, which do not have built-in fragmentation capabilities. In contrast to TCP (Transmission Control Protocol), which can automatically segment large packets into smaller ones, UDP relies on the network infrastructure to fragment packets if necessary. As a result, it is crucial to carefully manage MTUs when using UDP to avoid packet fragmentation and ensure reliable network performance.&lt;/p&gt;
&lt;p&gt;In any VoIP/IMS network, there are some cases for interconnecion to other servers or providers that just accept SIP over UDP! Yeah, I know, It is ridiculous for me as well, but they are more powerful and you should accept when they declare &amp;ldquo;we can&amp;rsquo;t enable TCP&amp;rdquo; ! OK, so I am talking about UDP fragmentation in SIP signaling and some interesting hints that I found.&lt;/p&gt;
&lt;p&gt;In VoIP networks, usually SIP signaling messages don&amp;rsquo;t have much headers and supported codecs by UAC or UAS are limited, that means the packet size usually is not big enough to exceed MTU! but in IMS network situation is different, there are different X-CSCF or other elements in the path, and each of them like to say we are doing very amazing task, so they inject a few headers. Furthermore, AMR, EVS, and other codecs have various attributes that make the SIP INVITE message larger.&lt;/p&gt;
&lt;p&gt;I said larger, but larger than what? In the &lt;a href=&#34;https://www.rfc-editor.org/rfc/rfc3261#section-18.1.1&#34;&gt;&lt;strong&gt;RFC 3261 section 18.1.1&lt;/strong&gt;&lt;/a&gt; it says SIP over UDP message size should be lower than 1300 bytes and if you are carrying larger than this, you have to use TCP.&lt;/p&gt;
&lt;p&gt;In short, in IMS, this usually occurs when SIP messages have to be sent over UDP; these messages are bigger than 1300 bytes and would need to be fragmented if the MTU is 1500 or smaller than message size.&lt;/p&gt;
&lt;h1 id=&#34;in-wireshark-how-can-you-see-fragmentation&#34;&gt;In Wireshark, how can you see fragmentation?&lt;/h1&gt;
&lt;p&gt;For example, when you are sending a SIP INVITE to other server over UDP, when it exceeds the MTU, you will receive an ICMP message &lt;code&gt;Destination unreachable (Fragmentation needed)&lt;/code&gt; that inside it you can find the expected MTU size. Following that, the server fragments the messages and forwards them.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://cloudtelcohub.com/images/sip-and-udp-fragmentation/wireshark-sip-udp-fragmentation-request.jpg&#34; alt=&#34;SIP INVITE UDP Fragmentation Request Image&#34;&gt;&lt;/p&gt;
&lt;p&gt;In SIP signaling, re-transmission mechanism helps to sending fragmented message to destination. This was the mechanism that we didn&amp;rsquo;t have in our Lambda functions but fragmentation forced us to implement it quickly.&lt;/p&gt;
&lt;p&gt;So in next try you can see fragmentation in Wireshark like this:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://cloudtelcohub.com/images/sip-and-udp-fragmentation/wireshark-sip-udp-fragmented.jpg&#34; alt=&#34;SIP INVITE UDP Fragmented Image&#34;&gt;&lt;/p&gt;
&lt;p&gt;Okay, so we do fragmentation, but other ways can be used to prevent fragmentation and consequent retransmission. First we can adjust correct MTU for the network interface that is linked to the destination UDP servers! If your MTU is higher than your adjacent link MTU, and you are doing fragmentation for all requests, so why you need that?? decrease it or set it to value that fit for your next hop.&lt;/p&gt;
&lt;p&gt;You can check the MTU and the set it easily:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;ifconfig &amp;lt;Interface_name&amp;gt; mtu &amp;lt;mtu_size&amp;gt; up&lt;/code&gt;&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt; 1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 2
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 3
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 4
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 5
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 6
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 7
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 8
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 9
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;10
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;11
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;12
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;13
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;ec2-user@i-0698wer63bd635 ~&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;$ ifconfig &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; grep mtu
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;docker0: &lt;span class=&#34;nv&#34;&gt;flags&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;4099&amp;lt;UP,BROADCAST,MULTICAST&amp;gt;  mtu &lt;span class=&#34;m&#34;&gt;1500&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;eth0: &lt;span class=&#34;nv&#34;&gt;flags&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;4163&amp;lt;UP,BROADCAST,RUNNING,MULTICAST&amp;gt;  mtu &lt;span class=&#34;m&#34;&gt;1436&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;eth1: &lt;span class=&#34;nv&#34;&gt;flags&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;4163&amp;lt;UP,BROADCAST,RUNNING,MULTICAST&amp;gt;  mtu &lt;span class=&#34;m&#34;&gt;9001&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;lo: &lt;span class=&#34;nv&#34;&gt;flags&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;73&amp;lt;UP,LOOPBACK,RUNNING&amp;gt;  mtu &lt;span class=&#34;m&#34;&gt;65536&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;ec2-user@i-0698wer63bd635 ~&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;$ ifconfig eth1 mtu &lt;span class=&#34;m&#34;&gt;1500&lt;/span&gt; up
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;ec2-user@i-0698wer63bd635 ~&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;$ ifconfig &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; grep mtu
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;docker0: &lt;span class=&#34;nv&#34;&gt;flags&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;4099&amp;lt;UP,BROADCAST,MULTICAST&amp;gt;  mtu &lt;span class=&#34;m&#34;&gt;1500&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;eth0: &lt;span class=&#34;nv&#34;&gt;flags&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;4163&amp;lt;UP,BROADCAST,RUNNING,MULTICAST&amp;gt;  mtu &lt;span class=&#34;m&#34;&gt;1436&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;eth1: &lt;span class=&#34;nv&#34;&gt;flags&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;4163&amp;lt;UP,BROADCAST,RUNNING,MULTICAST&amp;gt;  mtu &lt;span class=&#34;m&#34;&gt;1500&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;lo: &lt;span class=&#34;nv&#34;&gt;flags&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;73&amp;lt;UP,LOOPBACK,RUNNING&amp;gt;  mtu &lt;span class=&#34;m&#34;&gt;65536&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;To persist your network MTU setting for Amazon Linux 2, add the following line to the &lt;code&gt;/etc/sysconfig/network-scripts/ifcfg-eth0&lt;/code&gt; file:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;MTU=1500&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;change the value to whatever you want. For other OS, better to google.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Bad news:&lt;/strong&gt; if you are using the ECS Fargate, you can NOT change the MTU size. Default value is 9001 (Jumbo frames)!&lt;/p&gt;
&lt;p&gt;In our case, as we are using Fargate, so I tried to explore other solutions and found that Linux does keep a history of the learned MTU sizes for each network path, which is referred to as the &lt;a href=&#34;https://en.wikipedia.org/wiki/Path_MTU_Discovery&#34;&gt;&amp;ldquo;Path MTU Discovery (PMTUD)&amp;rdquo;&lt;/a&gt; mechanism. This is done to avoid repeated fragmentation of packets and improve network performance.&lt;/p&gt;
&lt;p&gt;When fragmentation is needed, the sender reduces the packet size and retransmits it until it reaches the destination without fragmentation. During this process, the sender also updates its PMTUD cache to remember the MTU of the path. However, this PMTUD cache is not permanent and can expire after a certain period of time, usually around 10 minutes. If you send another packet with a size larger than the current path MTU after the cache has expired, the process will start over and the router will send an ICMP message again, causing the packet to be dropped.&lt;/p&gt;
&lt;p&gt;To check the current PMTUD cache status on Linux, you can use the &lt;code&gt;ip route show&lt;/code&gt; command and look for entries with the &amp;ldquo;mtu&amp;rdquo; field.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;2
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;3
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;bash-5.2# ip route get to 75.100.127.113
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;75.100.127.113 via 100.120.111.97 dev eth1 src 100.120.211.105 uid &lt;span class=&#34;m&#34;&gt;0&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    cache expires 582sec mtu &lt;span class=&#34;m&#34;&gt;1500&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Ok, good. I tried to create a route to destination with specific MTU. Oh no you need privileged mode in container to do that and this is not possible in Fargate.&lt;/p&gt;
&lt;p&gt;The cache expiration time can be configured using the &lt;code&gt;net.ipv4.mtu_expires&lt;/code&gt;. Default value is 600 seconds.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;2
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;3
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;4
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;bash# sudo sysctl -w net.ipv4.mtu_expires&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;m&#34;&gt;1200&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;bash# cat /proc/sys/net/ipv4/mtu_expires
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;m&#34;&gt;1200&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;When you run a container, it shares the host kernel, which manages the networking stack and related parameters such as MTU caching. So, if you need to change the &lt;code&gt;net.ipv4.mtu_expires&lt;/code&gt; parameter for a specific application running in a container, you may be able to modify the application&amp;rsquo;s configuration or code to adjust its behavior. However, if you need to change the parameter globally for all applications running in a container, you will need to modify the host operating system&amp;rsquo;s configuration instead. In short, forget this option for ECS too!&lt;/p&gt;
&lt;p&gt;In conclusion, try to use TCP in SIP network and if you can&amp;rsquo;t afford it, try to adjust your MTU, otherwise you should pay the fragmentation cost!&lt;/p&gt;
&lt;h1 id=&#34;usefule-links&#34;&gt;Usefule Links:&lt;/h1&gt;
&lt;p&gt;&lt;strong&gt;[1] How to change MTU size in Linux&lt;/strong&gt; - &lt;a href=&#34;https://linuxhint.com/how-to-change-mtu-size-in-linux/&#34;&gt;https://linuxhint.com/how-to-change-mtu-size-in-linux/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;[2] Fargate task networking&lt;/strong&gt; - &lt;a href=&#34;https://docs.aws.amazon.com/AmazonECS/latest/userguide/fargate-task-networking.html#fargate-task-networking-considerations&#34;&gt;https://docs.aws.amazon.com/AmazonECS/latest/userguide/fargate-task-networking.html#fargate-task-networking-considerations&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;[3] Network maximum transmission unit (MTU) for your EC2 instance&lt;/strong&gt; - &lt;a href=&#34;https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/network_mtu.html&#34;&gt;https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/network_mtu.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;[4] Docker run &amp;ndash;sysctl&lt;/strong&gt; - &lt;a href=&#34;https://docs.docker.com/engine/reference/commandline/run/#sysctl&#34;&gt;https://docs.docker.com/engine/reference/commandline/run/#sysctl&lt;/a&gt;&lt;/p&gt;
</description>
                
                
                
                
                
                    
                        
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/categories/sip/">SIP</category>
                                
                            
                        
                    
                        
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/ims/">IMS</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/sip/">SIP</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/udp/">UDP</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/linux/">Linux</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/fragmentation/">Fragmentation</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/wireshark/">Wireshark</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/how-to/">How-To</category>
                                
                            
                        
                    
                
            </item>
        
            <item>
                <title>IMS SMS and Wireshark</title>
                <link>https://cloudtelcohub.com/posts/ims-sms-and-wireshark/</link>
                <guid isPermaLink="true">https://cloudtelcohub.com/posts/ims-sms-and-wireshark/</guid>
                <pubDate>Sat, 04 Mar 2023 01:10:14 -0800</pubDate>
                
                    <author>hyavari26@gmail.com (Hossein Yavari)</author>
                
                <copyright>[Reposting requires attribution, **use canonical links** &gt;&gt;](https://en.wikipedia.org/wiki/Canonical_link_element)</copyright>
                
                    <description>&lt;p&gt;&lt;img src=&#34;https://cloudtelcohub.com/images/ims-sms-and-wireshark/car-mirror.jpeg&#34; alt=&#34;Wireshark-sip-sms-packets Image&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Objects in (the) Wireshark are not same as they appear&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;It is usual in the software teams, without regular code review sessions, that someone leaves the group and, over time that other services are ready to test, something doesn&amp;rsquo;t work after deployment.&lt;/p&gt;
&lt;p&gt;This scenario happened to me last week, when I deployed IMS SMS services in a lab environment and everything was ready for the test with a real mobile handset, I noticed something is not correct.&lt;/p&gt;
&lt;p&gt;But what was the issue? When UE A after registration to VoLTE, sent an SMS to UE B, just the first message has delivered without issue, and later messages were not sent. Sometimes two messages were sent, and others were not.&lt;/p&gt;
&lt;p&gt;I check the service Lambdas&amp;rsquo; logs and found some SIP 400 response messages from sender UE. In these cases, the best option for troubleshooting is network capturing and checking in Wireshark to see what exactly going on. If you have reference captures (from other production networks), you would be lucky because you can check with reference capture.&lt;/p&gt;
&lt;p&gt;In the capture everything was good, I checked all the MESSAGE requests and 202 Accepted responses and all headers were correct.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://cloudtelcohub.com/images/ims-sms-and-wireshark/VoLTE-SMS-Wireshark.png&#34; alt=&#34;Wireshark-sip-sms-packets Image&#34;&gt;&lt;/p&gt;
&lt;p&gt;And the second SMS, made this error, when we sent delivery report (RP-ACK) to the sender:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://cloudtelcohub.com/images/ims-sms-and-wireshark/VoLTE-SMS-Wireshark-error.png&#34; alt=&#34;Wireshark-sip-sms-packets Image&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Method mismatch btw Request Line and CSeq&lt;/em&gt; didn&amp;rsquo;t have any meaning to me. Method and CSeq were the same. I checked again other headers in the delivery report SIP Message and they looked good.&lt;/p&gt;
&lt;p&gt;Ok, so I started to review the function codes, especially the function that made the delivery report. Ah! I found it. Someone was concatenating the RP-ACK payload buffer as a body to the SIP Message string!! Something like this:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;2
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;3
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;4
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;5
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;6
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-js&#34; data-lang=&#34;js&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kr&#34;&gt;const&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;deliveryReportBuff&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;Buffer&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;from&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;deliveryReport&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;hex&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;...&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;nx&#34;&gt;response&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;+=&lt;/span&gt; &lt;span class=&#34;sb&#34;&gt;`Content-Length: &lt;/span&gt;&lt;span class=&#34;si&#34;&gt;${&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;deliveryReportBuff&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;length&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;sb&#34;&gt;\r\n`&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;nx&#34;&gt;response&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;+=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;\r\n&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;nx&#34;&gt;response&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;+=&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;deliveryReportBuff&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Obviously, it won&amp;rsquo;t work! or it won&amp;rsquo;t properly for all messages. But what caused which I to spend more time finding the issue? Wireshark!
Wireshark could show the RP-ACK payload and without checking the hex string of the SIP body and checking the body length, it wasn&amp;rsquo;t easy to see the problem. So I create a buffer from message string and concatinating with payload. So now the length and content of message is correct and SMS over IP  works well!&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;: If you see that Wireshark can parse the packets, it doesn&amp;rsquo;t mean that your packets have been created correctly. You need to check the Hex string and be sure about the exact content.&lt;/p&gt;
</description>
                
                
                
                
                
                    
                        
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/categories/ims/">IMS</category>
                                
                            
                        
                    
                        
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/ims/">IMS</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/sip/">SIP</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/sms/">SMS</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/node.js/">Node.js</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/wireshark/">Wireshark</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/volte/">VoLTE</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/how-to/">How-To</category>
                                
                            
                        
                    
                
            </item>
        
            <item>
                <title>What Is IaSQL</title>
                <link>https://cloudtelcohub.com/posts/what-is-iasql/</link>
                <guid isPermaLink="true">https://cloudtelcohub.com/posts/what-is-iasql/</guid>
                <pubDate>Thu, 23 Feb 2023 00:19:01 -0800</pubDate>
                
                    <author>hyavari26@gmail.com (Hossein Yavari)</author>
                
                <copyright>[Reposting requires attribution, **use canonical links** &gt;&gt;](https://en.wikipedia.org/wiki/Canonical_link_element)</copyright>
                
                    <description>&lt;p&gt;&lt;img src=&#34;https://cloudtelcohub.com/images/what-is-iasql/iasql-connector.gif&#34; alt=&#34;IaSQL Image&#34;&gt;&lt;/p&gt;
&lt;p&gt;I discovered an interesting open-source project today that has an entirely different approach from mine. Honestly, I couldn&amp;rsquo;t get along with it yet, but it might be in the near future I use it.&lt;/p&gt;
&lt;p&gt;Do you have any ideas about creating your own AWS infrastructure, such as EC2s, ECS or etc. via PostgreSQL queries? This is the main idea of this open-source project: &lt;strong&gt;IaSQL&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://iasql.com/&#34;&gt;&lt;strong&gt;IaSQL&lt;/strong&gt;&lt;/a&gt; is a powerful tool that allows users to deploy infrastructure in AWS using PostgreSQL SQL queries. With IaSQL, users can define their infrastructure as code and automate the deployment process, making it easier to manage and scale their AWS infrastructure. In contrast to AWS consoles and infrastructure as code (IaC) tools, IaSQL lets developers manage cloud infrastructure as data in PostgreSQL.&lt;/p&gt;
&lt;p&gt;To deploy infrastructure using IaSQL, users define their infrastructure as code using SQL queries. These queries are executed by IaSQL, which then deploys the defined infrastructure in AWS.&lt;/p&gt;
&lt;p&gt;Here is an example of how to use IaSQL to deploy an EC2 instance in AWS:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt; 1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 2
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 3
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 4
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 5
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 6
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 7
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 8
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 9
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;10
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;11
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;12
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;13
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;14
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;15
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;16
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sql&#34; data-lang=&#34;sql&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;-- Define EC2 instance parameters
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;SET&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;ec2_instance_type&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;t2.micro&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;SET&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;ec2_key_name&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;my-key&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;SET&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;ec2_security_group_id&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;sg-0123456789abcdde&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;-- Create EC2 instance
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;CREATE&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;RESOURCE&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;ec2_instance&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;  &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;ec2_instance_type&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;text&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;NOT&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;NULL&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;DEFAULT&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;ec2_instance_type&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;  &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;ec2_key_name&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;text&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;NOT&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;NULL&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;DEFAULT&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;ec2_key_name&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;  &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;ec2_security_group_ids&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;text&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;[]&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;NOT&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;NULL&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;DEFAULT&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;ARRAY&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;ec2_security_group_id&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;]&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;AS&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;  &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;SELECT&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;aws_ec2&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;create_instance&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;    &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;ec2_instance_type&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;    &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;ec2_key_name&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;    &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;ec2_security_group_ids&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;  &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;AS&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;instance_id&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;This SQL query defines the parameters for an EC2 instance and then creates the instance using the aws_ec2.create_instance() function. The resulting EC2 instance ID is then stored in the ec2_instance resource.&lt;/p&gt;
&lt;p&gt;Using IaSQL, users can define and deploy a wide range of AWS resources using SQL queries. IaSQL supports many AWS services, including EC2, RDS, S3, and many others. One of the key benefits of using IaSQL is that it allows users to define their infrastructure as code, which can be version controlled and easily shared with other team members. This approach also allows for easier collaboration, as changes to the infrastructure can be reviewed and tested before being deployed.&lt;/p&gt;
&lt;p&gt;I will try to do more exploration of the project and write about it again. You can take a look at project &lt;a href=&#34;https://iasql.com/blog/&#34;&gt;&lt;strong&gt;blog&lt;/strong&gt;&lt;/a&gt; posts for more hints.&lt;/p&gt;
</description>
                
                
                
                
                
                    
                        
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/categories/devops/">DevOps</category>
                                
                            
                        
                    
                        
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/aws/">AWS</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/cloud/">Cloud</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/iasql/">IaSQL</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/postgresql/">PostgreSQL</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/iaac/">IaaC</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/opensource/">opensource</category>
                                
                            
                        
                    
                
            </item>
        
            <item>
                <title>IP Public on AWS ECS Fargate</title>
                <link>https://cloudtelcohub.com/posts/ip-public-aws-ecs-fargate/</link>
                <guid isPermaLink="true">https://cloudtelcohub.com/posts/ip-public-aws-ecs-fargate/</guid>
                <pubDate>Fri, 17 Feb 2023 09:50:00 -0800</pubDate>
                
                    <author>hyavari26@gmail.com (Hossein Yavari)</author>
                
                <copyright>[Reposting requires attribution, **use canonical links** &gt;&gt;](https://en.wikipedia.org/wiki/Canonical_link_element)</copyright>
                
                    <description>&lt;p&gt;There are many cases that might you need to have direct IP public address on your ECS task. When your tasks are on EC2, situation is a little easier, but if you are on Fargate, you need to do some tricks to get a reachable IP public.&lt;/p&gt;
&lt;p&gt;Before checking the script, don&amp;rsquo;t forget to consider these facts:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;For getting a reachable public IP on task, you need to run the cluster on public subnet.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;If you are in a subnet that is connected to NAT gateway, your task would not be reachable.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;If you need to just get your NAT IP, you can take it easy and just run commands like this in your entry point scripts: &lt;code&gt;NAT_PUBLIC_IP=$(curl checkip.amazonaws.com)&lt;/code&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;If your app inside container, doesn&amp;rsquo;t need to know its public IP, so you are good, you don&amp;rsquo;t need to any special thing. Only enable &lt;code&gt;Auto-assign public IP&lt;/code&gt; in your cluster service settings or in CDK.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;In my case, that container is running a SIP application server, it needs to know its public interface to use in outbound SIP messages. So, I added below scripts as my container entry point, and then use the public IP value in app settings and the starting up the process.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt; 1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 2
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 3
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 4
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 5
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 6
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 7
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 8
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 9
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;10
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;11
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;12
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;13
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;14
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;15
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;16
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;17
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;18
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;19
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;20
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;21
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;22
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;23
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;24
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;25
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;26
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;cp&#34;&gt;#!/bin/bash
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;cp&#34;&gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;# Install the ca-certificates package&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;apt-get update
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;apt-get install -y ca-certificates
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;# Update the root certificates&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;update-ca-certificates --fresh
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;# Install the AWS CLI version 2 using apt-get&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;apt-get install -y unzip curl less jq
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;curl &lt;span class=&#34;s2&#34;&gt;&amp;#34;https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip&amp;#34;&lt;/span&gt; -o &lt;span class=&#34;s2&#34;&gt;&amp;#34;awscliv2.zip&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;unzip awscliv2.zip
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;./aws/install
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nv&#34;&gt;task_metadata&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;$(&lt;/span&gt;curl -s &lt;span class=&#34;nv&#34;&gt;$ECS_CONTAINER_METADATA_URI_V4&lt;/span&gt;/task&lt;span class=&#34;k&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nv&#34;&gt;cluster_name&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;$(&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;echo&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;$task_metadata&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; jq -r &lt;span class=&#34;s1&#34;&gt;&amp;#39;.TaskARN&amp;#39;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; cut -d/ -f2&lt;span class=&#34;k&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nb&#34;&gt;echo&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;$cluster_name&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nv&#34;&gt;task_id&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;$(&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;echo&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;$task_metadata&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; jq -r &lt;span class=&#34;s1&#34;&gt;&amp;#39;.TaskARN&amp;#39;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; cut -d/ -f3&lt;span class=&#34;k&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nb&#34;&gt;echo&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;$task_id&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nv&#34;&gt;eni_id&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;$(&lt;/span&gt;aws ecs describe-tasks --cluster &lt;span class=&#34;nv&#34;&gt;$cluster_name&lt;/span&gt; --tasks &lt;span class=&#34;nv&#34;&gt;$task_id&lt;/span&gt; --query &lt;span class=&#34;s1&#34;&gt;&amp;#39;tasks[0].attachments[0].details[?name==`networkInterfaceId`].value&amp;#39;&lt;/span&gt; --output text&lt;span class=&#34;k&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nv&#34;&gt;public_ip&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;$(&lt;/span&gt;aws ec2 describe-network-interfaces --network-interface-ids &lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$eni_id&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt; --query &lt;span class=&#34;s1&#34;&gt;&amp;#39;NetworkInterfaces[0].Association.PublicIp&amp;#39;&lt;/span&gt; --output text&lt;span class=&#34;k&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nb&#34;&gt;echo&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;PUBLIC_IP: &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$public_ip&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;if you installed some of the packages in building image, so you don&amp;rsquo;t need install again. Just install &lt;code&gt;aws-cli&lt;/code&gt;. Then we get task &lt;code&gt;eni-id&lt;/code&gt; and with &lt;code&gt;ec2 describe-network-interfaces&lt;/code&gt; we get IP public address that is assigned by AWS to task ENI.&lt;/p&gt;
&lt;p&gt;Don&amp;rsquo;t forget that you need the specific role for running &lt;code&gt;ec2 describe-network-interfaces&lt;/code&gt;. Then add below in your task IAM role:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt; 1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 2
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 3
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 4
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 5
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 6
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 7
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 8
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 9
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;10
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;11
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;12
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-js&#34; data-lang=&#34;js&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;s2&#34;&gt;&amp;#34;Version&amp;#34;&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;2012-10-17&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;s2&#34;&gt;&amp;#34;Statement&amp;#34;&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;            &lt;span class=&#34;s2&#34;&gt;&amp;#34;Effect&amp;#34;&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;Allow&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;            &lt;span class=&#34;s2&#34;&gt;&amp;#34;Action&amp;#34;&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;                &lt;span class=&#34;s2&#34;&gt;&amp;#34;ec2:DescribeNetworkInterfaces&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;            &lt;span class=&#34;p&#34;&gt;],&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;            &lt;span class=&#34;s2&#34;&gt;&amp;#34;Resource&amp;#34;&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;*&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;p&#34;&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
</description>
                
                
                
                
                
                    
                        
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/categories/devops/">DevOps</category>
                                
                            
                        
                    
                        
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/aws/">AWS</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/ecs/">ECS</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/fargate/">Fargate</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/container/">Container</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/docker/">Docker</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/how-to/">How-To</category>
                                
                            
                        
                    
                
            </item>
        
            <item>
                <title>AWS EC2 gai.conf</title>
                <link>https://cloudtelcohub.com/posts/aws-ec2-gai-config/</link>
                <guid isPermaLink="true">https://cloudtelcohub.com/posts/aws-ec2-gai-config/</guid>
                <pubDate>Sat, 04 Feb 2023 00:57:05 -0800</pubDate>
                
                    <author>hyavari26@gmail.com (Hossein Yavari)</author>
                
                <copyright>[Reposting requires attribution, **use canonical links** &gt;&gt;](https://en.wikipedia.org/wiki/Canonical_link_element)</copyright>
                
                    <description>&lt;p&gt;&lt;code&gt;gai.conf&lt;/code&gt; is a configuration file in Linux systems that controls the behavior of the getaddrinfo library function. This function is used to translate hostnames or IP addresses into socket addresses that are usable by various network protocols. By configuring &lt;code&gt;gai.conf&lt;/code&gt;, you can specify the priority and order in which different address families (such as IPv4 and IPv6) are returned by the getaddrinfo function.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;gai.conf&lt;/code&gt; file is located in the &lt;code&gt;/etc&lt;/code&gt; directory and has a simple syntax. Each line in the file specifies a preference value for a specific address family or an address prefix. The higher the preference value, the more preferred the address family is.&lt;/p&gt;
&lt;p&gt;For example, to prefer IPv4 over IPv6, you can add the following line to &lt;code&gt;gai.conf&lt;/code&gt;:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;precedence ::ffff:0:0/96  &lt;span class=&#34;m&#34;&gt;100&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Yesterday I had an issue in deploying my codes on AWS EC2 instances, so when I investigate the CodeDeploy agent logs, I saw that it can not connect !! After checking different things, I noticed that my ECS subnet is private and just its IPv4 has route to NAT gateway. But my EC2 was trying to connect to CodeDeploy via IPv6 that was not routable.&lt;/p&gt;
&lt;p&gt;So I added &lt;code&gt;gai.conf&lt;/code&gt; as below in /etc and rebooted the EC2 instances and deployed the code without issue.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;2
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;3
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;4
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;5
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;6
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;7
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;8
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;9
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;abel  ::/0          &lt;span class=&#34;m&#34;&gt;1&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;label  2002::/16     &lt;span class=&#34;m&#34;&gt;2&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;label ::/96          &lt;span class=&#34;m&#34;&gt;3&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;label ::ffff:0:0/96  &lt;span class=&#34;m&#34;&gt;4&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;precedence  ::1/128       &lt;span class=&#34;m&#34;&gt;50&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;precedence  ::/0          &lt;span class=&#34;m&#34;&gt;40&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;precedence  2002::/16     &lt;span class=&#34;m&#34;&gt;30&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;precedence ::/96          &lt;span class=&#34;m&#34;&gt;20&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;precedence ::ffff:0:0/96  &lt;span class=&#34;m&#34;&gt;100&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;The &lt;code&gt;label&lt;/code&gt; lines are defining labels for various address prefixes. For example, label ::1/128 1 is defining a label for the loopback address (::1) with a label value of 1.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;precedence&lt;/code&gt; lines are setting the precedence values for the various address prefixes. The higher the precedence value, the more preferred the address family is. For example, precedence ::ffff:0:0/96 100 is giving IPv4 addresses a higher priority than any other address family, as the precedence value of 100 is the highest.&lt;/p&gt;
&lt;p&gt;So, the priority and order of different address families for the getaddrinfo library function would be as follows:&lt;/p&gt;
&lt;p&gt;IPv4 (::ffff:0:0/96) with a precedence value of 100&lt;/p&gt;
&lt;p&gt;IPv6 with a prefix of 2002::/16 with a precedence value of 30&lt;/p&gt;
&lt;p&gt;IPv6 with a prefix of ::/96 with a precedence value of 20&lt;/p&gt;
&lt;p&gt;IPv6 with a prefix of ::/0 with a precedence value of 40&lt;/p&gt;
&lt;p&gt;IPv6 loopback address (::1/128) with a precedence value of 50&lt;/p&gt;
&lt;p&gt;This configuration is giving IPv4 addresses the highest priority, followed by the other address families in the order specified.&lt;/p&gt;
</description>
                
                
                
                
                
                    
                        
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/categories/networking/">Networking</category>
                                
                            
                        
                    
                        
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/aws/">AWS</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/ec2/">EC2</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/ip/">IP</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/networking/">Networking</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/how-to/">How-To</category>
                                
                            
                        
                    
                
            </item>
        
            <item>
                <title>How Run SIPp on AWS EC2</title>
                <link>https://cloudtelcohub.com/posts/how-run-sipp-on-aws-ec2/</link>
                <guid isPermaLink="true">https://cloudtelcohub.com/posts/how-run-sipp-on-aws-ec2/</guid>
                <pubDate>Tue, 31 Jan 2023 18:20:58 -0800</pubDate>
                
                    <author>hyavari26@gmail.com (Hossein Yavari)</author>
                
                <copyright>[Reposting requires attribution, **use canonical links** &gt;&gt;](https://en.wikipedia.org/wiki/Canonical_link_element)</copyright>
                
                    <description>&lt;p&gt;&lt;a href=&#34;https://github.com/SIPp/sipp&#34;&gt;&lt;strong&gt;SIPp&lt;/strong&gt;&lt;/a&gt; is a free, open-source tool for testing Session Initiation Protocol (SIP) communication systems. It was created to simulate thousands of simultaneous incoming and outgoing SIP calls, allowing users to stress test and measure the performance of their SIP infrastructure.&lt;/p&gt;
&lt;p&gt;SIPp is a highly flexible tool, and its scripting language supports various SIP message types and parameters, allowing you to test the behavior of your SIP infrastructure in detail. It also supports SIP over Transport Layer Security (TLS) and Secure Real-time Transport Protocol (SRTP) for secure communication.&lt;/p&gt;
&lt;p&gt;I have been using SIPp for a while and last week when I was testing a SIP trunk to operator NG911 SBC, I needed to install it on an AWS EC2 instance. Installation is easy, just need to compile and install cmake manually because cmake version on the online repo is old and SIPp doesn’t like that.&lt;/p&gt;
&lt;p&gt;So you need to follow these steps:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt; 1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 2
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 3
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 4
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 5
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 6
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 7
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 8
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 9
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;10
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;11
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;12
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;13
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;yum groupinstall &lt;span class=&#34;s2&#34;&gt;&amp;#34;Development Tools&amp;#34;&lt;/span&gt; -y
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;yum install ncurses-compat-libs ncurses-devel wget openssl-devel pcap libpcap-devel libnet gsl -y
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;wget https://github.com/Kitware/CMake/releases/download/v3.25.2/cmake-3.25.2.tar.gz
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;tar -xvzf cmake-3.25.2.tar.gz
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nb&#34;&gt;cd&lt;/span&gt; cmake-3.25.2
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;./bootstrap
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;make
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;make install
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;wget https://github.com/SIPp/sipp/releases/download/v3.6.1/sipp-3.6.1.tar.gz
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;tar -xvzf sipp-3.6.1.tar.gz
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nb&#34;&gt;cd&lt;/span&gt; sipp-3.6.1
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;/usr/local/bin/cmake . -DUSE_PCAP&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;m&#34;&gt;1&lt;/span&gt; -DUSE_GSL&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;m&#34;&gt;1&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;make&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Then you can run the ./sipp or link it to /usr/sbin&lt;/p&gt;
&lt;p&gt;** You can compile sipp with ssl and sctp too:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; /usr/local/bin/cmake . -DUSE_SSL&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;m&#34;&gt;1&lt;/span&gt; -DUSE_SCTP&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;m&#34;&gt;1&lt;/span&gt; -DUSE_PCAP&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;m&#34;&gt;1&lt;/span&gt; -DUSE_GSL&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;m&#34;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;The link that you need to check based on time:&lt;/p&gt;
&lt;p&gt;Cmake download page: &lt;a href=&#34;https://cmake.org/download/&#34;&gt;https://cmake.org/download/&lt;/a&gt;
Latest stable SIPp version: &lt;a href=&#34;https://github.com/SIPp/sipp/releases/tag/v3.6.1&#34;&gt;https://github.com/SIPp/sipp/releases/tag/v3.6.1&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Now, you need to create your scenario. So, I created a ng911option.xml file with this xml:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt; 1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 2
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 3
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 4
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 5
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 6
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 7
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 8
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 9
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;10
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;11
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;12
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;13
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;14
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;15
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;16
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;17
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&amp;lt;?xml &lt;span class=&#34;nv&#34;&gt;version&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;1.0&amp;#34;&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;encoding&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;UTF-8&amp;#34;&lt;/span&gt; ?&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&amp;lt;scenario &lt;span class=&#34;nv&#34;&gt;name&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;Option scenario&amp;#34;&lt;/span&gt;&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &amp;lt;send&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &amp;lt;!&lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;CDATA&lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;	OPTIONS sip:op.ng911.xxx.ca:5060 SIP/2.0
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;	Via: SIP/2.0/&lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;transport&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;local_ip&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;:&lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;local_port&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;branch&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;z9hG4bKd3eee3f9487fc430b&lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;call_number&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;	From: &amp;lt;sip:ims-ng911@10.16.10.40&amp;gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;tag&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;cb89092c-c504-45bd-b256-eb49e2bdfd1g&lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;call_number&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;	To: &amp;lt;sip:op.ng911.xxx.ca&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;	Contact: &amp;lt;sip:ims-lrf@&lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;local_ip&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;:&lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;local_port&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;	Call-ID: &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;call_id&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;	CSeq: 11667&lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;call_number&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; OPTIONS
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;	Max-Forwards: &lt;span class=&#34;m&#34;&gt;70&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;	User-Agent: IMS Core Test
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;	Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, UPDATE, INFO, REFER, NOTIFY, MESSAGE, PRACK
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;	Content-Length: &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;len&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;o&#34;&gt;]]&lt;/span&gt;&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &amp;lt;/send&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;And run this scenario with this command:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; ./sipp -sf ng911option.xml -i 10.16.10.40 -p &lt;span class=&#34;m&#34;&gt;5060&lt;/span&gt; 100.125.250.232:5060 -l &lt;span class=&#34;m&#34;&gt;1&lt;/span&gt; -m &lt;span class=&#34;m&#34;&gt;1000&lt;/span&gt; -r &lt;span class=&#34;m&#34;&gt;1&lt;/span&gt; -rp &lt;span class=&#34;m&#34;&gt;30000&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Then SIPp starts to send SIP OPTIONS every 30 seconds to the target IP (100.125.250.232) from the EC2 interface (10.16.10.40).&lt;/p&gt;
&lt;p&gt;Fortunately, I got the 200(OK) which means the connection and IP/port/protocol are set correctly and we have time enough to start the actual server later :)&lt;/p&gt;
</description>
                
                
                
                
                
                    
                        
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/categories/sip/">SIP</category>
                                
                            
                        
                    
                        
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/sip/">SIP</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/sipp/">SIPp</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/aws/">AWS</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/ec2/">EC2</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/voip/">VoIP</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/how-to/">How-To</category>
                                
                            
                        
                    
                
            </item>
        
            <item>
                <title>Book Review: Distributed Systems With Node.js</title>
                <link>https://cloudtelcohub.com/posts/book-review-distributed-systems-with-node.js/</link>
                <guid isPermaLink="true">https://cloudtelcohub.com/posts/book-review-distributed-systems-with-node.js/</guid>
                <pubDate>Tue, 24 Jan 2023 13:33:50 -0800</pubDate>
                
                    <author>hyavari26@gmail.com (Hossein Yavari)</author>
                
                <copyright>[Reposting requires attribution, **use canonical links** &gt;&gt;](https://en.wikipedia.org/wiki/Canonical_link_element)</copyright>
                
                    <description>&lt;p&gt;&lt;strong&gt;Titel&lt;/strong&gt;: &amp;ldquo;Distributed Systems With Node.js&amp;rdquo;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Edition&lt;/strong&gt;: 2020&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Author&lt;/strong&gt;: Thomas Hunter II&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Link&lt;/strong&gt;: &lt;a href=&#34;https://www.oreilly.com/library/view/distributed-systems-with/9781492077282/&#34;&gt;OREILLY Website&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://cloudtelcohub.com/images/book-review-distributed-systems-with-node.js/cover.jpg&#34; alt=&#34;Cover Image&#34;&gt;&lt;/p&gt;
&lt;p&gt;The book in my list that I was interested in reviewing was this one, which I thought might have some useful tips for my work.&lt;/p&gt;
&lt;p&gt;This book, &amp;ldquo;Distributed Systems with Node.js&amp;rdquo; by Thomas Hunter, focuses on teaching readers how to use Node.js for building backend services for distributed systems, rather than frontend web development. The book covers topics such as deploying and scaling Node.js applications, making them redundant and resilient to failure, and observing the health of the application. By the end of the book, readers will have a solid understanding of the technologies needed to run Node.js services in a production environment. However, it&amp;rsquo;s important to note that the book is not intended to make readers experts on these systems and it doesn&amp;rsquo;t cover all the technology used in different employer&amp;rsquo;s solutions. But it will help readers to understand how to run a local instances.&lt;/p&gt;
&lt;p&gt;Chapters one and two were interesting to me since they referred to some of my old knowledge. I can recommand this book to developers that might not have enough skills in distributed systems deployment and DevOps areas.&lt;/p&gt;
</description>
                
                
                
                
                
                    
                        
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/categories/book-review/">Book-Review</category>
                                
                            
                        
                    
                        
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/book/">book</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/node.js/">Node.js</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/software/">Software</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/development/">development</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/distributed/">distributed</category>
                                
                            
                        
                    
                
            </item>
        
            <item>
                <title>Remote SIM Provisioning (RSP)</title>
                <link>https://cloudtelcohub.com/posts/remote-sim-provisioning/</link>
                <guid isPermaLink="true">https://cloudtelcohub.com/posts/remote-sim-provisioning/</guid>
                <pubDate>Sat, 21 Jan 2023 10:27:24 -0800</pubDate>
                
                    <author>hyavari26@gmail.com (Hossein Yavari)</author>
                
                <copyright>[Reposting requires attribution, **use canonical links** &gt;&gt;](https://en.wikipedia.org/wiki/Canonical_link_element)</copyright>
                
                    <description>&lt;p&gt;Remote SIM Provisioning (RSP) is a method of managing and provisioning SIM cards remotely without the need for physical interaction. This enables mobile operators to remotely activate and configure SIM cards, and manage subscriber data such as phone numbers, services, and preferences.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://cloudtelcohub.com/posts/why-do-you-need-an-ota-for-esim-or-iot/&#34;&gt;OTA&lt;/a&gt; updates, also known as over-the-air updates, are software updates that are delivered to devices wirelessly, rather than through a wired connection. OTA updates can be used to update the firmware or software of a device, add new features, and fix bugs.&lt;/p&gt;
&lt;p&gt;When it comes to RSP, it allows for the remote management of the SIM card&amp;rsquo;s credentials, the SIM card can be provisioned and activated remotely and it also allows for the management of subscriber data such as phone numbers, services, and preferences. This is accomplished by sending an SMS message or a USSD message over the network to the SIM card, which then triggers a response from the SIM card to update or provision the subscriber data.&lt;/p&gt;
&lt;p&gt;When it comes to OTA updates, they play an important role in the management of RSP-enabled devices, as they enable mobile operators to remotely update and maintain the software on the devices. This is accomplished by sending an update package over the air to the device, which then installs the update. OTA updates can be used to add new features, fix bugs, and improve the overall performance of the device.&lt;/p&gt;
&lt;p&gt;Remote SIM Provisioning (RSP) offers several benefits for mobile operators, including:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Cost savings:&lt;/strong&gt; RSP eliminates the need for physical SIM cards to be distributed and activated, reducing the costs associated with SIM card production, logistics, and distribution.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Increased efficiency:&lt;/strong&gt; RSP enables mobile operators to quickly and easily activate and configure SIM cards, and manage subscriber data, reducing the time and resources required for manual SIM card provisioning.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Improved customer experience:&lt;/strong&gt; RSP allows for faster activation and provisioning of SIM cards, resulting in a better customer experience and reduced customer churn.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Flexibility:&lt;/strong&gt; RSP enables mobile operators to remotely manage and provision SIM cards, regardless of the location of the subscriber or the device.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Scalability:&lt;/strong&gt; RSP enables mobile operators to easily manage and provision large numbers of SIM cards, making it easier to scale their operations as their subscriber base grows.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Security:&lt;/strong&gt; RSP enables mobile operators to secure the SIM card credentials and subscriber data and also to update the SIM card&amp;rsquo;s security features remotely.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Remote management:&lt;/strong&gt; RSP enables mobile operators to remotely manage and provision SIM cards and subscriber data, regardless of the location of the subscriber or the device. This is particularly useful for IoT and M2M devices, which can be located in remote areas or hard-to-reach locations.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Remote troubleshooting:&lt;/strong&gt; RSP enables mobile operators to remotely troubleshoot and diagnose issues with SIM cards and devices, reducing the need for on-site visits and improving the overall efficiency of customer support.&lt;/p&gt;
&lt;p&gt;In summary, Remote SIM Provisioning (RSP) enables mobile operators to remotely activate and configure SIM cards, and manage subscriber data such as phone numbers, services, and preferences. OTA updates, also known as over-the-air updates, are software updates that are delivered to devices wirelessly, rather than through a wired connection and are important for the management of RSP-enabled devices as they enable mobile operators to remotely update and maintain the software on the devices.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;More resources:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://www.gsma.com/iot/embedded-sim/&#34;&gt;[1] GSMA eSIM&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://www.slideshare.net/HoseinYavari/esim-deep-dive&#34;&gt;[2] eSIM Deep Dive&lt;/a&gt;&lt;/p&gt;
</description>
                
                
                
                
                
                    
                        
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/categories/esim/">eSIM</category>
                                
                            
                        
                    
                        
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/rsp/">RSP</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/ota/">OTA</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/esim/">eSIM</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/iot/">IoT</category>
                                
                            
                        
                    
                
            </item>
        
            <item>
                <title>OpenRAN on AWS</title>
                <link>https://cloudtelcohub.com/posts/openran-on-aws/</link>
                <guid isPermaLink="true">https://cloudtelcohub.com/posts/openran-on-aws/</guid>
                <pubDate>Sat, 21 Jan 2023 00:23:43 -0800</pubDate>
                
                    <author>hyavari26@gmail.com (Hossein Yavari)</author>
                
                <copyright>[Reposting requires attribution, **use canonical links** &gt;&gt;](https://en.wikipedia.org/wiki/Canonical_link_element)</copyright>
                
                    <description>&lt;p&gt;Earlier this week, I read an interesting whitepaper from AWS about how public cloud providers are moving to 5G and optimizing their services to gain more market share. AWS in this whitepaper covers OpenRAN as one of these technologies, providing useful hints about new services around 5G SA networks. This whitepaper is a technical guide that describes the architecture and best practices for deploying OpenRAN solutions on the AWS cloud. The paper begins by providing an overview of OpenRAN and its key components, including the vRAN (virtual RAN) and CU (central unit), as well as the O-RAN (OpenRAN) Alliance and its goals.&lt;/p&gt;
&lt;p&gt;This diagram shows &lt;a href=&#34;https://docs.o-ran-sc.org/en/latest/architecture/architecture.html&#34;&gt;O-RAN architecture&lt;/a&gt;:
&lt;img src=&#34;https://cloudtelcohub.com/images/OpenRAN-on-aws/o-ran-architecture.png&#34; alt=&#34;O-RAN architecture Image&#34;&gt;&lt;/p&gt;
&lt;p&gt;The whitepaper then goes on to discuss the benefits of running OpenRAN on AWS, including the ability to take advantage of the elastic and flexible nature of the cloud to provide cellular services with low latency and high reliability, as well as the ability to reduce the total cost of ownership and accelerate time-to-market.&lt;/p&gt;
&lt;p&gt;The paper also provides a detailed architectural overview of a sample OpenRAN deployment on AWS, including the various AWS services that can be used to deploy and operate OpenRAN solutions, such as Amazon Elastic Compute Cloud (EC2), Amazon Simple Storage Service (S3), and Amazon Virtual Private Cloud (VPC). It also covers the different network topologies and deployment options available on AWS.&lt;/p&gt;
&lt;p&gt;Finally, it includes best practices for designing and operating OpenRAN solutions on AWS, covering topics such as security, scaling, and monitoring.&lt;/p&gt;
&lt;p&gt;Overall, this document provides a comprehensive overview of how to deploy OpenRAN solutions on the AWS cloud and provides valuable information for network operators who are looking to take advantage of the benefits of OpenRAN and the AWS cloud.&lt;/p&gt;
&lt;p&gt;You can find this whitepaper here: &lt;a href=&#34;https://docs.aws.amazon.com/whitepapers/latest/open-radio-access-network-architecture-on-aws/open-radio-access-network-architecture-on-aws.html&#34;&gt;Open Radio Access Network Architecture on AWS&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Also you can get more info on &lt;a href=&#34;https://www.o-ran.org/&#34;&gt;O-RAN alliance&lt;/a&gt;&lt;/p&gt;
</description>
                
                
                
                
                
                    
                        
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/categories/5g/">5G</category>
                                
                            
                        
                    
                        
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/5g/">5G</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/openran/">OpenRAN</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/aws/">AWS</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/cloud/">Cloud</category>
                                
                            
                        
                    
                
            </item>
        
            <item>
                <title>Docker Compose With Podman</title>
                <link>https://cloudtelcohub.com/posts/docker-compose-with-podman/</link>
                <guid isPermaLink="true">https://cloudtelcohub.com/posts/docker-compose-with-podman/</guid>
                <pubDate>Sat, 14 Jan 2023 20:49:05 -0800</pubDate>
                
                    <author>hyavari26@gmail.com (Hossein Yavari)</author>
                
                <copyright>[Reposting requires attribution, **use canonical links** &gt;&gt;](https://en.wikipedia.org/wiki/Canonical_link_element)</copyright>
                
                    <description>&lt;p&gt;&lt;a href=&#34;https://podman.io/&#34;&gt;Podman&lt;/a&gt; is a container engine that enables users to manage OCI-compliant containers on Linux systems without the need for a daemon. It is popular among users as an alternative to Docker due to its ease of adoption. However, the lack of support for Docker Compose, a command-line tool that coordinates multiple Docker containers for local development, has been a major concern for many users and the container community. Podman starts to support docker-compose from version 3.0 but changes in docker-compose from version 2.0 made some incompatibilities, so a community project called Podman Compose has been born. Podman Compose processes the Compose spec and translates it into Podman CLI commands [1].&lt;/p&gt;
&lt;p&gt;There are many articles that you can read about Podman vs Docker, but here I am going to share an experience to run Docker-compose with Podman. In the telecom field, many operators are using Red Had Linux (rhel 8 or 9) and Red Hat uses Podman because it is designed to be a more secure and efficient alternative to Docker.&lt;/p&gt;
&lt;p&gt;Podman runs without the need for root privileges, which reduces the risk of security vulnerabilities caused by running containers with elevated permissions. Also, Podman is natively integrated with Red Hat&amp;rsquo;s container orchestration platform OpenShift, which makes it easier to deploy and manage containerized applications at scale.&lt;/p&gt;
&lt;p&gt;Overall, Podman&amp;rsquo;s security, performance, and integration features make it a good fit for Red Hat&amp;rsquo;s container orchestration platform and their enterprise customers who are looking for a more secure and efficient solution to run containers. So, what if you need to use Docker-compose and re-use your YAML??&lt;/p&gt;
&lt;p&gt;To use Podman with Docker-compose, I did some tricks. So far, I have not encountered any issues, but I will update if something goes wrong.&lt;/p&gt;
&lt;p&gt;You need to follow below steps:&lt;/p&gt;
&lt;p&gt;These are the version of OS and Podman which I used:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;2
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;3
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;4
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;5
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;root@rhel:~# uname -a
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Linux rhel 5.14.0-162.6.1.el9_1.x86_64
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;root@rhel:~# podman -v
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;podman version 4.2.0&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Then I run:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt; 1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 2
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 3
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 4
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 5
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 6
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 7
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 8
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 9
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;10
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;11
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;12
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;13
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;root@rhel:~# yum update -y
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;root@rhel:~# yum install podman-docker -y
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;root@rhel:~# curl -L https://github.com/docker/compose/releases/download/v2.3.3/docker-compose-&lt;span class=&#34;k&#34;&gt;$(&lt;/span&gt;uname -s&lt;span class=&#34;k&#34;&gt;)&lt;/span&gt;-&lt;span class=&#34;k&#34;&gt;$(&lt;/span&gt;uname -m&lt;span class=&#34;k&#34;&gt;)&lt;/span&gt; -o /usr/local/bin/docker-compose
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;root@rhel:~# chmod &lt;span class=&#34;m&#34;&gt;755&lt;/span&gt; /usr/local/bin/docker-compose
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;root@rhel:~# docker-compose -v
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Docker Compose version v2.3.3
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;root@rhel:~# touch /var/run/docker.sock
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;root@rhel:~# mount --bind /var/run/podman/podman.sock /var/run/docker.sock&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;I tried with different version of Docker-compose, but among versions &amp;gt; 2, v2.3.3 seems ok with Podman.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://www.redhat.com/sysadmin/podman-compose-docker-compose&#34;&gt;[1] https://www.redhat.com/sysadmin/podman-compose-docker-compose&lt;/a&gt;&lt;/p&gt;
</description>
                
                
                
                
                
                    
                        
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/categories/devops/">DevOps</category>
                                
                            
                        
                    
                        
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/podman/">Podman</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/docker/">Docker</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/docker-compose/">Docker-compose</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/redhat/">RedHat</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/container/">Container</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/cloud/">Cloud</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/devops/">DevOps</category>
                                
                            
                        
                    
                
            </item>
        
            <item>
                <title>Book Review: The Kubernetes Book</title>
                <link>https://cloudtelcohub.com/posts/book-review-the-kubernetes-book/</link>
                <guid isPermaLink="true">https://cloudtelcohub.com/posts/book-review-the-kubernetes-book/</guid>
                <pubDate>Fri, 30 Dec 2022 01:43:29 -0800</pubDate>
                
                    <author>hyavari26@gmail.com (Hossein Yavari)</author>
                
                <copyright>[Reposting requires attribution, **use canonical links** &gt;&gt;](https://en.wikipedia.org/wiki/Canonical_link_element)</copyright>
                
                    <description>&lt;p&gt;&lt;strong&gt;Titel&lt;/strong&gt;: &amp;ldquo;The Kubernetes Book&amp;rdquo;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Edition&lt;/strong&gt;: 2022&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Author&lt;/strong&gt;: Nigel Polton&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Link&lt;/strong&gt;: &lt;a href=&#34;https://nigelpoulton.com/books/&#34;&gt;Nigel Polton Website&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://cloudtelcohub.com/images/book-review-the-kubernetes-book/kubernetes-book-2022-edition.png&#34; alt=&#34;Cover Image&#34;&gt;&lt;/p&gt;
&lt;p&gt;Many people who tried to learn more about &lt;a href=&#34;https://kubernetes.io/&#34;&gt;&lt;strong&gt;Kubernetes&lt;/strong&gt;&lt;/a&gt; or &lt;a href=&#34;https://www.docker.com/&#34;&gt;&lt;strong&gt;Docker&lt;/strong&gt;&lt;/a&gt; have heard the name Nigel Polton. He is one of the old guys or captains in this domain and prepared many Kubernetes and docker training videos, and tutorials besides the books.&lt;/p&gt;
&lt;p&gt;During the Christmas holidays, I was interested in refreshing my knowledge of Kubernetes, so I thought reviewing Nigel&amp;rsquo;s book, could be helpful. I have his docker book and I try to find time and review that too in these days.&lt;/p&gt;
&lt;p&gt;The book has 16 chapters and starts with good basic information about concepts like microservices and cloud-native apps. Then it talks about Kubernetes&amp;rsquo;s history. Something that was interesting or at least I didn&amp;rsquo;t remember whether I read about it before or not, was Borg and Omega at Google and how Kubernetes came out. In addition, it describes K8s as a cloud operating system (OS) and abstraction which is provided.&lt;/p&gt;
&lt;p&gt;In the second chapter, we learn more about major Kubernetes cluster components such as control nodes, worker nodes, pods, deployment, and services. As it takes you through the control components, it describes them so that you can easily understand them.&lt;/p&gt;
&lt;p&gt;Chapter three covers ways to get Kubernetes cluster up and running on your lab machine and review hosted services like &lt;a href=&#34;https://cloud.google.com/kubernetes-engine&#34;&gt;&lt;strong&gt;GKE&lt;/strong&gt;&lt;/a&gt;. Then, you will have the pilot K8s cluster for rest of the chapters.&lt;/p&gt;
&lt;p&gt;Chapter 4 goes into Pod details. We learn why K8s works with Pods and not containers directly. Then you will learn about Pod manifest and its specs. Nigel suggest you watching &lt;a href=&#34;https://www.imdb.com/title/tt1375666/&#34;&gt;&lt;strong&gt;&amp;ldquo;Inception&amp;rdquo;&lt;/strong&gt;&lt;/a&gt; movie to understand relation of Pods and containers better. I liked the multi-container descriptions in this chapter.&lt;/p&gt;
&lt;p&gt;In next chapter, we learn how we can partition single cluster to multi virtual cluster using Namespaces. Among the things I like about this book is that it doesn&amp;rsquo;t waste your time and delivers what you need to know.&lt;/p&gt;
&lt;p&gt;Deployments and Services are main topics for chapter six and seven. How ReplicaSet is different to Deployment is important that you should know.&lt;/p&gt;
&lt;p&gt;Ingress and web application access through single LoadBalancer is topic of chapter 8. We learn what issue Insgress is resolving. In the next chapter, the book dives deeper into Service Discovery and how it&amp;rsquo;s implemented in K8s. You will not be left in the dark about service discovery and DNS stuff in Kubernetes after reading this chapter.&lt;/p&gt;
&lt;p&gt;In this state you have learned about the basic things around Kubernetes, so in the following chapters, book focuses on more advance topics. K8s storage is covered in chapter 10 and  you will learn about Kubernetes persistent volume subsystem and CSI.&lt;/p&gt;
&lt;p&gt;ConfigMaps and Kubernetes Secrets have been covered in chapter 11 and I am sure that we can find lots of use cases in real projects. Next four chapters are dedicated to StatefulSets, RBAC, API and K8s Security and you will get good info but I think this topics need more resources fo reading and practicing.&lt;/p&gt;
&lt;p&gt;To wrap up, this book was a great option for refreshing my knowledge and reviewing key Kubernetes concepts and I recommend it.&lt;/p&gt;
</description>
                
                
                
                
                
                    
                        
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/categories/book-review/">Book-Review</category>
                                
                            
                        
                    
                        
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/book/">book</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/kubernetes/">Kubernetes</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/k8s/">K8s</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/docker/">Docker</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/container/">Container</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/cloud/">Cloud</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/devops/">DevOps</category>
                                
                            
                        
                    
                
            </item>
        
            <item>
                <title>Hep Protocol and Homer</title>
                <link>https://cloudtelcohub.com/posts/hep-protocol-and-homer/</link>
                <guid isPermaLink="true">https://cloudtelcohub.com/posts/hep-protocol-and-homer/</guid>
                <pubDate>Wed, 21 Dec 2022 07:57:11 -0800</pubDate>
                
                    <author>hyavari26@gmail.com (Hossein Yavari)</author>
                
                <copyright>[Reposting requires attribution, **use canonical links** &gt;&gt;](https://en.wikipedia.org/wiki/Canonical_link_element)</copyright>
                
                    <description>&lt;p&gt;Capturing telecom protocols or traffic for various purposes is a topic that has been discussed for a long time and always has been done with different tools or through some vendors.&lt;/p&gt;
&lt;p&gt;One of the tools that help to capture protocols, especially SIP, is &lt;a href=&#34;https://github.com/sipcapture/homer&#34;&gt;&lt;strong&gt;Homer&lt;/strong&gt;&lt;/a&gt;. This project provides valuable tools to capture and monitor your VoIP network and use it for troubleshooting or analytics purposes.&lt;/p&gt;
&lt;p&gt;Homer&amp;rsquo;s idea is simple, you have some agents to capture the required data, then encapsulate it in the standard format and send it to the server. You can find the below image in project git:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://cloudtelcohub.com/images/hep-protocol-and-homer/how-homer-wroks.png&#34; alt=&#34;How-Homer-Works Image&#34;&gt;&lt;/p&gt;
&lt;p&gt;If you are looking for a ready solution, Homer has it and there are different agents for open-source platforms like Kamailio, FreeSWITCH and etc. But if you are looking to use this platform for your application, first of all, you need to understand &lt;strong&gt;HEP&lt;/strong&gt; protocol (actually it is not RFC protocol but there is an RFC draft for that). You can read HEP protocol specification here: &lt;a href=&#34;https://github.com/sipcapture/HEP/blob/master/docs/HEP3_Network_Protocol_Specification_REV_36.pdf&#34;&gt;&lt;strong&gt;HEP V3&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Recently for one of my project, needed to send SIP protocol message through HEP to another consumer that uses them for analytics. So, I tried to use &lt;a href=&#34;https://github.com/sipcapture/hep-js&#34;&gt;&lt;strong&gt;HEP-js&lt;/strong&gt;&lt;/a&gt; lib. It is a simple module that encapsulates your protocol message and other info in HEP PDU and then decapsulates HEP PDU to JSON.
Somethin like this:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt; 1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 2
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 3
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 4
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 5
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 6
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 7
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 8
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 9
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;10
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;11
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;12
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;13
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;14
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;15
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;16
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;17
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;18
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-js&#34; data-lang=&#34;js&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;s2&#34;&gt;&amp;#34;rcinfo&amp;#34;&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;s2&#34;&gt;&amp;#34;protocolFamily&amp;#34;&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;mi&#34;&gt;2&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;s2&#34;&gt;&amp;#34;protocol&amp;#34;&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;mi&#34;&gt;6&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;s2&#34;&gt;&amp;#34;srcIp&amp;#34;&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;172.26.26.72&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;s2&#34;&gt;&amp;#34;dstIp&amp;#34;&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;172.26.21.185&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;s2&#34;&gt;&amp;#34;srcPort&amp;#34;&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;mi&#34;&gt;64831&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;s2&#34;&gt;&amp;#34;dstPort&amp;#34;&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;mi&#34;&gt;8060&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;s2&#34;&gt;&amp;#34;timeSeconds&amp;#34;&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;mi&#34;&gt;1592975786&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;s2&#34;&gt;&amp;#34;timeUseconds&amp;#34;&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;mi&#34;&gt;669278&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;s2&#34;&gt;&amp;#34;payloadType&amp;#34;&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;mi&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;s2&#34;&gt;&amp;#34;captureId&amp;#34;&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;mi&#34;&gt;2001&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;s2&#34;&gt;&amp;#34;hepNodeName&amp;#34;&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;2001&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;s2&#34;&gt;&amp;#34;conversationId&amp;#34;&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;456852465&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;s2&#34;&gt;&amp;#34;organizationId&amp;#34;&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;3bac7742-243f-4af7-ba39-f4098b941eda&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;p&#34;&gt;},&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;s2&#34;&gt;&amp;#34;payload&amp;#34;&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;INVITE sip:BellUser2@172.26.21.185:8060;transport=tls SIP/2.0\r\nTo:  &amp;lt;sip:BellUser2@172.26.21.185:8060&amp;gt;\r\nFrom:  &amp;lt;sip:BellStation1@172.26.21.185:8060&amp;gt;;tag=974329\r\ncall-id: 3935064a-294e-44d8-930d-1a87b90515bb\r\nCSeq: 1 INVITE\r\nallow-events: conference, talk, hold\r\nContact:  &amp;lt;sip:BellStation1@172.26.26.72:5061;transport=tls&amp;gt;\r\nx-phonesim-proxy-type: primary\r\ncontent-type: application/sdp\r\nx-edge-id: 268c720e-b939-4484-966d-80a1123e3810\r\nx-edge-name: qf-bell\r\nx-test-id: Station2Station\r\nx-test-name: Station to Station Keyword Test\r\nUser-Agent: PolycomSoundPointIP-SPIP_450-UA/4.0.10.0689_000025CC0001\r\nx-phonesim: 1.0.0-534\r\ncontent-length: 567\r\nVia: SIP/2.0/TLS qf-lempel:5060;branch=z9hG4bK416647af6e43448b8fc9c8b804713a0e\r\n\r\nv=0\r\no=- 4056025290 3801964586 IN IP4 172.26.26.72\r\ns= \r\nt=0 0\r\na=group:ANAT 1 2\r\nm=audio 20522 RTP/SAVP 0 8 9 101\r\nc=IN IP4 172.26.26.72\r\na=mid:1\r\na=rtpmap:101 telephone-event/8000\r\na=fmtp:101 0-15\r\na=crypto:1 AES_CM_256_HMAC_SHA1_80 inline:ba6DaKfQLSQQbYNMtL1ng2xCVbJuihEgzeajdEWIHT4qGpfrPwuTMDIasyhSOA\r\na=sendrecv\r\nm=audio 23824 RTP/SAVP 0 8 9 101\r\nc=IN IP6 2620:102:c000:f10:d::6050\r\na=mid:2\r\na=rtpmap:101 telephone-event/8000\r\na=fmtp:101 0-15\r\na=crypto:1 AES_CM_256_HMAC_SHA1_80 inline:ba6DaKfQLSQQbYNMtL1ng2xCVbJuihEgzeajdEWIHT4qGpfrPwuTMDIasyhSOA\r\na=sendrecv\r\n&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;I have added support for &lt;strong&gt;IPv6&lt;/strong&gt; to this lib that you can find it &lt;a href=&#34;https://github.com/hyavari/hep-js&#34;&gt;here.&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;In this case, you don’t need any Homer server, as you are encapsulating through HEP and other side when receives the PDU, only extract payload and meta data information and digest it for other purposes. HEP gives you a standard structure that will be helpful for future requirements too.
Attention please, you can send HEP PDU over any transport you like, in my case I am sending through HTTPS to AWS API gateway and behind that a Lambda decapsulate it and do other processes.&lt;/p&gt;
</description>
                
                
                
                
                
                    
                        
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/categories/sip/">SIP</category>
                                
                            
                        
                    
                        
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/ims/">IMS</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/sip/">SIP</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/rtp/">RTP</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/hep/">HEP</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/homer/">Homer</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/tcpdump/">tcpdump</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/wireshark/">Wireshark</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/how-to/">How-To</category>
                                
                            
                        
                    
                
            </item>
        
            <item>
                <title>SIPREC with RTPEngine</title>
                <link>https://cloudtelcohub.com/posts/siprec-with-rtpengine/</link>
                <guid isPermaLink="true">https://cloudtelcohub.com/posts/siprec-with-rtpengine/</guid>
                <pubDate>Fri, 25 Nov 2022 23:02:39 -0800</pubDate>
                
                    <author>hyavari26@gmail.com (Hossein Yavari)</author>
                
                <copyright>[Reposting requires attribution, **use canonical links** &gt;&gt;](https://en.wikipedia.org/wiki/Canonical_link_element)</copyright>
                
                    <description>&lt;p&gt;&lt;a href=&#34;https://github.com/sipwise/rtpengine&#34;&gt;RTPEngine&lt;/a&gt; is one of the best options among open-source solutions for RTP or media handling and it besides other platforms like &lt;a href=&#34;https://github.com/kamailio/kamailio&#34;&gt;Kamailio&lt;/a&gt; will give you many features or ready-to-go solutions.&lt;/p&gt;
&lt;p&gt;When you are handling media sessions in IMS or any VoIP network, you should have a solution for recording, media barging or let’s say Lowful Interception &lt;a href=&#34;https://en.wikipedia.org/wiki/Lawful_interception&#34;&gt;(LI)&lt;/a&gt;. LI in IMS has a long story and it is out of scope; for this post, we focus on call recording.&lt;/p&gt;
&lt;p&gt;First of all, we need to what is &lt;a href=&#34;https://www.rfc-editor.org/rfc/rfc7866&#34;&gt;SIPREC&lt;/a&gt;? I shared a ppt here that gives you overal info you need:&lt;/p&gt;
&lt;iframe src=&#34;https://cloudtelcohub.com//www.slideshare.net/slideshow/embed_code/key/2znXEL1SS7Q3UU&#34; width=&#34;595&#34; height=&#34;485&#34; frameborder=&#34;0&#34; marginwidth=&#34;0&#34; marginheight=&#34;0&#34; scrolling=&#34;no&#34; style=&#34;border:1px solid #CCC; border-width:1px; margin-bottom:5px; max-width: 100%;&#34; allowfullscreen&gt; &lt;/iframe&gt; &lt;div style=&#34;margin-bottom:5px&#34;&gt; &lt;strong&gt; &lt;a href=&#34;https://cloudtelcohub.com//www.slideshare.net/HoseinYavari/siprec-rtpengine-media-forking&#34; title=&#34;SIPREC RTPEngine Media Forking&#34; target=&#34;_blank&#34;&gt;SIPREC RTPEngine Media Forking&lt;/a&gt; &lt;/strong&gt; from &lt;strong&gt;&lt;a href=&#34;https://cloudtelcohub.com//www.slideshare.net/HoseinYavari&#34; target=&#34;_blank&#34;&gt;Hossein Yavari&lt;/a&gt;&lt;/strong&gt; &lt;/div&gt;
&lt;p&gt;The ppt gives a good overview of what SIPREC is and how Kamailio and RTPEngine fit into this picture. But, what if you don’t use the Kamailio? How you can use RTPEngine features to implement media recording?&lt;/p&gt;
&lt;p&gt;RTPEngine media forking feature let you fork active sessions to another destination that in our case we call SRS. The call recording server or SRS can send a command to RTPEngine through NG protocol. So, might it not be a SIP-aware server, but it should be able to handle RTP protocol and offer an SDP.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://cloudtelcohub.com/images/siprec-with-rtpengine/SIPREC-RTPENGINE.drawio.png&#34; alt=&#34;srs-rtpengine Image&#34;&gt;&lt;/p&gt;
&lt;p&gt;Media forking happens through the &lt;code&gt;subscribe&lt;/code&gt; command, e.g. SRS sends a &lt;code&gt;subscribe request&lt;/code&gt; command to RTPEngine and subscribes itself to the target call. You can see a sample payload below:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;2
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;3
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;4
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;5
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;6
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;7
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;8
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-js&#34; data-lang=&#34;js&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;   &lt;span class=&#34;s2&#34;&gt;&amp;#34;command&amp;#34;&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;subscribe request&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;   &lt;span class=&#34;s2&#34;&gt;&amp;#34;call-id&amp;#34;&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;call xyz&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;   &lt;span class=&#34;s2&#34;&gt;&amp;#34;from-tags&amp;#34;&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;s2&#34;&gt;&amp;#34;test&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;   &lt;span class=&#34;p&#34;&gt;],&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;   &lt;span class=&#34;s2&#34;&gt;&amp;#34;transport protocol&amp;#34;&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;RTP/AVP&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;When RTPEngine receives the command, it responds with SDP that includes &lt;code&gt;a=sendonly&lt;/code&gt; attribute:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt; 1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 2
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 3
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 4
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 5
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 6
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 7
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 8
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 9
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;10
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;11
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;12
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;13
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;14
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;15
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;16
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;17
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;18
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;19
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;20
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;21
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-js&#34; data-lang=&#34;js&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;   &lt;span class=&#34;s2&#34;&gt;&amp;#34;result&amp;#34;&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;ok&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;   &lt;span class=&#34;s2&#34;&gt;&amp;#34;sdp&amp;#34;&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;v=0
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;s2&#34;&gt;         o=- ...
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;s2&#34;&gt;         s=rtpengine-11-2-0-0-0
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;s2&#34;&gt;         t=0 0
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;s2&#34;&gt;         m=audio 30160 RTP/AVP 96
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;s2&#34;&gt;         c=IN IP4 192.168.1.120
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;s2&#34;&gt;         a=rtpmap:96 opus/48000
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;s2&#34;&gt;         a=sendonly
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;s2&#34;&gt;         a=rtcp:30160
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;s2&#34;&gt;         m=audio 30172 RTP/AVP 96
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;s2&#34;&gt;         c=IN IP4 192.168.1.120
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;s2&#34;&gt;         a=rtpmap:96 opus/48000
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;s2&#34;&gt;         a=sendonly
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;s2&#34;&gt;         a=rtcp:30170&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;   &lt;span class=&#34;s2&#34;&gt;&amp;#34;from-tags&amp;#34;&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;   &lt;span class=&#34;s2&#34;&gt;&amp;#34;test&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;   &lt;span class=&#34;p&#34;&gt;],&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;   &lt;span class=&#34;s2&#34;&gt;&amp;#34;to-tag&amp;#34;&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;9e2a2a7fc4d6...&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;In the next step, SRS should send its SDP to RTPEngine through &lt;code&gt;subscribe answer&lt;/code&gt; with &lt;code&gt;a=recvonly&lt;/code&gt;:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt; 1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 2
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 3
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 4
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 5
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 6
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 7
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 8
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 9
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;10
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;11
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;12
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;13
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;14
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;15
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;16
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;17
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-js&#34; data-lang=&#34;js&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;   &lt;span class=&#34;s2&#34;&gt;&amp;#34;command&amp;#34;&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;subscribe answer&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;   &lt;span class=&#34;s2&#34;&gt;&amp;#34;call-id&amp;#34;&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;call xyz&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;   &lt;span class=&#34;s2&#34;&gt;&amp;#34;to-tag&amp;#34;&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;9e2a2a7fc4d6...&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;   &lt;span class=&#34;s2&#34;&gt;&amp;#34;sdp&amp;#34;&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;v=0
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;s2&#34;&gt;            o=- 2345 2345 IN IP4 192.168.1.95
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;s2&#34;&gt;            s=-
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;s2&#34;&gt;            t=0 0
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;s2&#34;&gt;            m=audio 33345 RTP/AVP 96
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;s2&#34;&gt;            c=IN IP4 192.168.1.95
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;s2&#34;&gt;            a=rtpmap:96 opus/48000
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;s2&#34;&gt;            a=recvonly
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;s2&#34;&gt;            m=audio 33366 RTP/AVP 96
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;s2&#34;&gt;            c=IN IP4 192.168.1.95
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;s2&#34;&gt;            a=rtpmap:96 opus/48000
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;s2&#34;&gt;            a=recvonly&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;After this SRS will receive the forked media RTP packets and then it can save it to file or prepare it for LI interfaces. Don’t forget that transcoding also is possible for forked media, when you ask it in &lt;code&gt;subscribe answer&lt;/code&gt; SDP, very useful!&lt;/p&gt;
</description>
                
                
                
                
                
                    
                        
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/categories/ims/">IMS</category>
                                
                            
                        
                    
                        
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/ims/">IMS</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/sip/">SIP</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/rtp/">RTP</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/rtpengine/">RTPEngine</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/opensource/">opensource</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/siprec/">SIPREC</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/li/">LI</category>
                                
                            
                        
                    
                
            </item>
        
            <item>
                <title>How Decrypt ESP Packets in Wireshark</title>
                <link>https://cloudtelcohub.com/posts/how-to-ipsec-esp-decryption/</link>
                <guid isPermaLink="true">https://cloudtelcohub.com/posts/how-to-ipsec-esp-decryption/</guid>
                <pubDate>Fri, 25 Nov 2022 11:53:22 -0800</pubDate>
                
                    <author>hyavari26@gmail.com (Hossein Yavari)</author>
                
                <copyright>[Reposting requires attribution, **use canonical links** &gt;&gt;](https://en.wikipedia.org/wiki/Canonical_link_element)</copyright>
                
                    <description>&lt;p&gt;If you are working in the telecom field, I think it is rare that you don’t work with &lt;a href=&#34;https://www.wireshark.org/&#34;&gt;Wireshark&lt;/a&gt; to capture the network or open the tcpdump outputs. Although, as a developer, you need to use the reference packet captures, to see the correct packet flow and structure for a specific protocol while you are implementing (if you couldn’t find a reference pcap, you will be walking in the darkness!)&lt;/p&gt;
&lt;p&gt;In the &lt;a href=&#34;https://en.wikipedia.org/wiki/Voice_over_LTE&#34;&gt;VoLTE&lt;/a&gt; network or &lt;a href=&#34;https://en.wikipedia.org/wiki/IP_Multimedia_Subsystem&#34;&gt;IMS&lt;/a&gt;, subscribers use Internet Protocol Security &lt;a href=&#34;https://en.wikipedia.org/wiki/IPsec&#34;&gt;(IPSec)&lt;/a&gt; tunnels to connect to the IMS core. In another word, the Gm interface between subscribers (UEs) and the P-CSCF server is secured with IPSec. I will go through IPSec details in another post, but for now, if you have an IPSec capture, you can see a bunch of Encapsulating Security Payload (ESP) packets that their content is not visible.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://cloudtelcohub.com/images/ipsec-esp-decrypt/Wireshark-esp-packets.png&#34; alt=&#34;Wireshark-esp-packets Image&#34;&gt;&lt;/p&gt;
&lt;p&gt;IPSec can be used for integrity or integrity and ciphering; in the first mode, there isn’t any encryption on ESP and you can decode it easily. For this purpose just open preferences settings in Wireshark and for ESP protocol, check the first setting:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Edit -&amp;gt; Preferences -&amp;gt; Protocol -&amp;gt; ESP&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img src=&#34;https://cloudtelcohub.com/images/ipsec-esp-decrypt/Wireshark-esp-packets-preferences.png&#34; alt=&#34;Wireshark-esp-packets-preferences Image&#34;&gt;&lt;/p&gt;
&lt;p&gt;If subscribers or operator forces for ciphering, ESP packets are encrypted and you need more info to decrypt them. In this case, you need to follow below steps:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Go to same settings: Edit -&amp;gt; Preferences -&amp;gt; Protocol -&amp;gt; ESP&lt;/li&gt;
&lt;li&gt;Select 3 checkboxes (not the first one!) and select &amp;lsquo;Edit&amp;rsquo; next to ESP SAs:&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;img src=&#34;https://cloudtelcohub.com/images/ipsec-esp-decrypt/Wireshark-esp-packets-decryption.png&#34; alt=&#34;Wireshark-esp-packets-decryption Image&#34;&gt;&lt;/p&gt;
&lt;ol start=&#34;3&#34;&gt;
&lt;li&gt;Create an entry for the each IPSec SAs and add the information obtained from the P-CSCF for IPSec tunnel:&lt;/li&gt;
&lt;/ol&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Protocol: IPv6 or IPv4&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Src IP and Dst IP: UE IP and P-CSCF address&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;SPI: eg. 0x7bfa58a1&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Encryption: AES-CBC [RFC3602] (or whatever is selected for IPSec tunnel)&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Encryption Key: 0xCK&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Authentication: HMAC-SHA-1-96 [RFC2404] (or whatever is selected for IPSec tunnel)&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Authentication Key: 0xIK&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;CK and IK are ciphering and integration keys, that you can find from tunnel information on P-CSCF or before removing them from SIP 401 response to subscriber REGISTER.&lt;/p&gt;
&lt;p&gt;Now, you can see the ESP content:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://cloudtelcohub.com/images/ipsec-esp-decrypt/Wireshark-decrypted-esp-packets.png&#34; alt=&#34;Wireshark-decrypted-esp-packets Image&#34;&gt;&lt;/p&gt;
</description>
                
                
                
                
                
                    
                        
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/categories/ims/">IMS</category>
                                
                            
                        
                    
                        
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/ims/">IMS</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/ipsec/">IPSec</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/esp/">ESP</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/tcpdump/">tcpdump</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/wireshark/">Wireshark</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/volte/">VoLTE</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/how-to/">How-To</category>
                                
                            
                        
                    
                
            </item>
        
            <item>
                <title>RTPEngine Internal Insight</title>
                <link>https://cloudtelcohub.com/posts/rtpengine-internal-insight/</link>
                <guid isPermaLink="true">https://cloudtelcohub.com/posts/rtpengine-internal-insight/</guid>
                <pubDate>Tue, 22 Nov 2022 10:45:22 -0800</pubDate>
                
                    <author>hyavari26@gmail.com (Hossein Yavari)</author>
                
                <copyright>[Reposting requires attribution, **use canonical links** &gt;&gt;](https://en.wikipedia.org/wiki/Canonical_link_element)</copyright>
                
                    <description>&lt;p&gt;&lt;a href=&#34;https://github.com/sipwise/rtpengine&#34;&gt;RTPEngine&lt;/a&gt; as you can find in the project GitHub too, is a proxy server for &lt;a href=&#34;https://en.wikipedia.org/wiki/Real-time_Transport_Protocol&#34;&gt;RTP&lt;/a&gt; and other UDP-based media traffic, and it is used with projects like &lt;a href=&#34;https://github.com/kamailio/kamailio&#34;&gt;Kamailio&lt;/a&gt; or &lt;a href=&#34;https://github.com/OpenSIPS/opensips&#34;&gt;OpenSIPS&lt;/a&gt; as a &lt;a href=&#34;https://en.wikipedia.org/wiki/Session_Initiation_Protocol&#34;&gt;SIP&lt;/a&gt; proxy server. So, the SIP proxy handles SIP signaling, and RTPEngine takes care of the RTP/Media plane.&lt;/p&gt;
&lt;p&gt;In this post, I am not going to show you how we can install or configure RTPEngine. I would like to share some ideas that I found from its source code about RTPEngine’s internal design and packet handling flow in it.&lt;/p&gt;
&lt;p&gt;But why I tried to understand the flow? First of all, it helps me to contribute new features to it, because all of us as open-source users, should be committed to the projects that we use and its community! Also, sometimes I spend time getting some ideas about project code to debug issues better. About RTPEngine, there was a third reason; I needed to change the RTP packets’ flow based on some requirements.&lt;/p&gt;
&lt;p&gt;Note: my findings are just experimental and might make project owners a little shocked :)&lt;/p&gt;
&lt;h3 id=&#34;how-is-rtpengine-internal&#34;&gt;How is RTPEngine internal?&lt;/h3&gt;
&lt;p&gt;RTPEngine project includes various folders but the main sources are under &lt;code&gt;daemon&lt;/code&gt; folder. In this folder, you can find the implementation of different project elements or features. In this folder, there are two important files that I found core functions of RTPEngine in them: &lt;code&gt;call.c&lt;/code&gt; and &lt;code&gt;media_socket.c&lt;/code&gt;. Obviously, other files are important, but if you are following the main RTP flow in RTPEngine, we need to focus on these files. Let’s see how we reach these files.&lt;/p&gt;
&lt;p&gt;RTPEngine gets action commands like &lt;code&gt;offer&lt;/code&gt;, and &lt;code&gt;answer&lt;/code&gt; through &lt;code&gt;ng&lt;/code&gt; protocol; it is a control method that let you control the RTPEngine daemon from a SIP proxy or any other entity that controls RTPEngine functionality. You can configure &lt;code&gt;ng&lt;/code&gt; port and protocol in RTPEngine configs. So, there is &lt;code&gt;control_ng.c&lt;/code&gt; that in this file you can find a function named &lt;code&gt;control_ng_process(...)&lt;/code&gt;. This function will be called whenever RTPEngine receives a command through &lt;code&gt;ng&lt;/code&gt; port. In this function, RTPEngines detects the command and does proper action. For example, if the command is ‘offer’, this function calls &lt;code&gt;call_offer_ng(...)&lt;/code&gt; that is located in &lt;code&gt;call_interfaces.c&lt;/code&gt;. Later &lt;code&gt;call_offer_ng&lt;/code&gt; calls &lt;code&gt;call_offer_answer_ng(...)&lt;/code&gt; which I think is an important function that lets RTEngine create required handlers.&lt;/p&gt;
&lt;p&gt;So here, we have this flow:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://cloudtelcohub.com/images/rtpengine-internal-insight/rtpengine-internal-start.png&#34; alt=&#34;RTPEngine-internal-start-point Image&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;call_offer_answer_ng(...)&lt;/code&gt; is the place where we can actually see the RTPEngine packets handling logic creation. This function, create a &lt;code&gt;call&lt;/code&gt; entity that is the main parent structure of all call-related objects. Also, it creates &lt;code&gt;call_monologue&lt;/code&gt; that exposes a call participant. &lt;code&gt;call_monologue&lt;/code&gt; contains a list of subscribers
and subscriptions, which are other &lt;code&gt;call_monologue&lt;/code&gt;s. These lists are
reciprocal and a regular A/B call would have two &lt;code&gt;call_monologues&lt;/code&gt; with
each subscribed to the other. &lt;code&gt;call_monologues&lt;/code&gt; includes an object list of &lt;code&gt;call_media&lt;/code&gt; that keeps the media attributes and related things. I hope you are not lost!!
&lt;code&gt;call_media&lt;/code&gt; also keeps an object list of &lt;code&gt;packet_stream&lt;/code&gt; and finally &lt;code&gt;packet_steam&lt;/code&gt; is linked to &lt;code&gt;stream_fd&lt;/code&gt;. It means object hierarchy under the &lt;code&gt;call&lt;/code&gt; structure is:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://cloudtelcohub.com/images/rtpengine-internal-insight/rtpengine-internal-stream.png&#34; alt=&#34;RTPEngine-internal-streaming Image&#34;&gt;&lt;/p&gt;
&lt;p&gt;If we look at this flows from bottom to top, when RTPEngine receives incoming RTP packets, they initially received by a &lt;code&gt;stream_fd&lt;/code&gt; which directly links to a &lt;code&gt;packet_stream&lt;/code&gt;. Each &lt;code&gt;packet_stream&lt;/code&gt; then links to an &lt;code&gt;call_media&lt;/code&gt;. There are two &lt;code&gt;packet_stream&lt;/code&gt; objects per &lt;code&gt;call_media&lt;/code&gt;, one for RTP and one for RTCP. The &lt;code&gt;call_media&lt;/code&gt; then links to a &lt;code&gt;call_monologue&lt;/code&gt; which corresponds to a participant to a call.&lt;/p&gt;
&lt;p&gt;During signalling events, the list of subscriptions for each &lt;code&gt;call_monologue&lt;/code&gt; is used to create the list of &lt;code&gt;rtp_sink&lt;/code&gt; and &lt;code&gt;rtcp_sink&lt;/code&gt; given in each &lt;code&gt;packet_stream&lt;/code&gt;. Each entry in these lists is a &lt;code&gt;sink_handler&lt;/code&gt; object, which again contains flags and attributes. Flags from a &lt;code&gt;call_subscription&lt;/code&gt; are copied into the &lt;code&gt;sink_handler&lt;/code&gt;. So, during actual packet handling and forwarding, only the &lt;code&gt;sink_handler&lt;/code&gt; objects and the &lt;code&gt;packet_stream&lt;/code&gt; objects they related to are used.&lt;/p&gt;
&lt;p&gt;We have this flow:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://cloudtelcohub.com/images/rtpengine-internal-insight/rtpengine-internal-rtp-flow.png&#34; alt=&#34;RTPEngine-internal-handling-flow Image&#34;&gt;&lt;/p&gt;
&lt;p&gt;In another way, packet handling is done in &lt;code&gt;media_socket.c&lt;/code&gt; and starts with &lt;code&gt;stream_packet()&lt;/code&gt;. This operates on the originating &lt;code&gt;stream_fd&lt;/code&gt; and its linked &lt;code&gt;packet_stream&lt;/code&gt; and eventually proceeds to go through the list of &lt;code&gt;sinks&lt;/code&gt;, either &lt;code&gt;rtp_sinks&lt;/code&gt; or &lt;code&gt;rtcp_sinks&lt;/code&gt;, and uses the contained &lt;code&gt;sink_handler&lt;/code&gt; objects which point to the destination &lt;code&gt;packet_stream&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;So, if we need to change RTP packets or trigger other procedures in parallel before sending out the traffic, we can use &lt;code&gt;sink_handler&lt;/code&gt; and its attributes &lt;code&gt;sink_attrs&lt;/code&gt; that would affect &lt;code&gt;rtp_sinks&lt;/code&gt; list.&lt;/p&gt;
&lt;p&gt;I need to spend more time to understand how RTPEngine handles SRTP and what is appropriate changes in &lt;code&gt;xt_RTPENGINE&lt;/code&gt; for kernel module.&lt;/p&gt;
</description>
                
                
                
                
                
                    
                        
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/categories/ims/">IMS</category>
                                
                            
                        
                    
                        
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/ims/">IMS</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/sip/">SIP</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/rtp/">RTP</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/rtpengine/">RTPEngine</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/opensource/">opensource</category>
                                
                            
                        
                    
                
            </item>
        
            <item>
                <title>Why do you need an OTA for eSIM or IoT?</title>
                <link>https://cloudtelcohub.com/posts/why-do-you-need-an-ota-for-esim-or-iot/</link>
                <guid isPermaLink="true">https://cloudtelcohub.com/posts/why-do-you-need-an-ota-for-esim-or-iot/</guid>
                <pubDate>Fri, 18 Nov 2022 09:23:17 -0800</pubDate>
                
                    <author>hyavari26@gmail.com (Hossein Yavari)</author>
                
                <copyright>[Reposting requires attribution, **use canonical links** &gt;&gt;](https://en.wikipedia.org/wiki/Canonical_link_element)</copyright>
                
                    <description>&lt;p&gt;&lt;a href=&#34;https://en.wikipedia.org/wiki/Over-the-air_programming&#34;&gt;Over-The-Air (OTA)&lt;/a&gt; is a common concept that enables you to distribute various things, like a piece of code, to a device without physical access. In the context of mobile networks and SIM cards, OTA technology enables mobile network operators &lt;a href=&#34;https://en.wikipedia.org/wiki/Mobile_network_operator&#34;&gt;(MNOs)&lt;/a&gt; or &lt;a href=&#34;https://en.wikipedia.org/wiki/Mobile_virtual_network_operator&#34;&gt;MVNOs&lt;/a&gt; to change or update data in SIM cards deployed and get service without reissuing them! So, it means through remote provisioning, OTA reduces the cost of manual configuration not only for carriers but also for subscribers.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://cloudtelcohub.com/images/why-do-you-need-an-ota-for-esim-or-iot/ota-howto.png&#34; alt=&#34;ota Image&#34;&gt;&lt;/p&gt;
&lt;p&gt;In the fast-growing eSIM and IoT field, which the content of the SIM or &lt;a href=&#34;https://en.wikipedia.org/wiki/EUICC&#34;&gt;eUICC&lt;/a&gt; on a consumer or M2M device needs to be changed according to the subscriber or network demands, the OTA, also known as OTA provisioning, is a mandatory requirement. Operators must communicate with SIM, introduce new services, upload or update their profiles or update firmware rapidly and cost-effectively. So all of these actions are possible through OTA.
OTA also is very important from a security perspective; it helps to keep devices updated and apply security patches, bug fixes, or the latest optimized configurations quickly. Although over-the-air provisioning will be established through a secure channel.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s take a look at how we can implement the OTA now that we know what it is and why it&amp;rsquo;s needed.&lt;/p&gt;
&lt;h3 id=&#34;what-is-the-ota-gateway&#34;&gt;What is the OTA Gateway?&lt;/h3&gt;
&lt;p&gt;The OTA gateway or sometimes referred to OTA platform is an element in the operator network or service providers which enables the firm to use OTA technology and manage SIMs or eUICCs.
OTA gateways usually receive SIM management requests through an API like RESTful API and then create an appropriate data format that SIM cards can understand. In the next step, the OTA gateway sends the formatted service request as a message (SMS) to the SMSC. SMSC delivers the SMS through the cellular network to the recipient&amp;rsquo;s SIM card. OTA usually uses SMS to communicate with SIM, but there are other methods like HTTP(s) which let the SIM card retrieve data from the operator or central servers that are specified.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://cloudtelcohub.com/images/why-do-you-need-an-ota-for-esim-or-iot/ota-service.png&#34; alt=&#34;ota-service Image&#34;&gt;&lt;/p&gt;
&lt;p&gt;In the IoT field, it is usual that the service provider does not have the whole operators’ core infrastructure, and provisioning remote devices is impossible. So in this case, some other companies or operators provide OTA gateway as a service.&lt;/p&gt;
&lt;p&gt;The OTA gateway services provide RESTful APIs to receive requests from IoT providers or MVNOs, then transform to send them to SMSCs via &lt;a href=&#34;https://en.wikipedia.org/wiki/Short_Message_Peer-to-Peer&#34;&gt;SMPP&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;SMSC owner can be the carrier, or it might be another service from the OTA service provider. This solution will be cost-effective with zero CAPEX and allows SPs to deploy value-added SIM applications and new services for eSIM M2M and IoT.&lt;/p&gt;
</description>
                
                
                
                
                
                    
                        
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/categories/esim/">eSIM</category>
                                
                            
                        
                    
                        
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/ota/">OTA</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/esim/">eSIM</category>
                                
                            
                                
                                
                                
                                    <category domain="https://cloudtelcohub.com/tags/iot/">IoT</category>
                                
                            
                        
                    
                
            </item>
        
    </channel>
</rss>
