{"id":875,"date":"2015-11-24T15:11:38","date_gmt":"2015-11-24T10:11:38","guid":{"rendered":"http:\/\/alexeyka.zantsev.com\/?p=875"},"modified":"2022-02-08T15:29:16","modified_gmt":"2022-02-08T10:29:16","slug":"linphone-command-line-interface","status":"publish","type":"post","link":"https:\/\/alexeyka.zantsev.com\/?p=875","title":{"rendered":"Linphone: command line interface"},"content":{"rendered":"<p><a href=\"https:\/\/alexeyka.zantsev.com\/wp-content\/uploads\/2015\/11\/voip_nerd.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-877\" src=\"http:\/\/alexeyka.zantsev.com\/wp-content\/uploads\/2015\/11\/voip_nerd.jpg\" alt=\"voip_nerd\" width=\"236\" height=\"316\" \/><\/a><br \/>\nWanna be a real VoIP nerd? :-) Let&#8217;s use <a href=\"http:\/\/www.linphone.org\/\" target=\"_blank\" rel=\"noopener noreferrer\">Linphone<\/a> from a command line!<\/p>\n<p>1. &#8216;linphonec&#8217; &#8211; enter the CLI.<br \/>\n2. &#8216;help&#8217; &#8211; list available commands. Now it&#8217;s time to create a profile and connect to PBX<br \/>\n3. &#8216;help proxy&#8217; &#8211; show help.<br \/>\n3.1. &#8216;proxy add&#8217; &#8211; and press Enter. Answer to the appeared questions (just look at listing below):<\/p>\n<pre>linphonec&gt; proxy add\nAdding new proxy setup. Hit ^D to abort.\nEnter proxy sip address: 10.1.51.13\nYour identity for this proxy: sip:1301@10.1.51.13\nDo you want to register on this proxy (yes\/no): yes\nSpecify register expiration time in seconds (default is 600): \nExpiration: 0 seconds\nSpecify route if needed: \nNo route specified.\n--------------------------------------------\nsip address: \nroute: \nidentity: sip:1301@10.1.51.13\nregister: yes\nexpires: 0\nregistered: no\n--------------------------------------------\nAccept the above proxy configuration (yes\/no) ?: yes\nProxy added.\nlinphonec&gt; \nPassword for 1301 on \"pbx.secretcompany.com\": MeGaSeCuRePaSs\n\nlinphonec&gt; Unregistration on sip:10.1.51.13 done.\nlinphonec&gt;<\/pre>\n<p>Yes, the message &#8216;Unregistration on sip:10.1.51.13 done.&#8217; seems strange, but tcpdump shows that everything is OK.<\/p>\n<p>3.2. Now we may list our proxies:<\/p>\n<pre>linphonec&gt; proxy list\n****** Proxy 0 - this is the default one - *******\nsip address: \nroute: \nidentity: sip:1301@10.1.51.13\nregister: yes\nexpires: 0\nregistered: no\nlinphonec&gt;<\/pre>\n<p>4. Let&#8217;s call via default proxy:<\/p>\n<pre>linphonec&gt; call 79991234567\nEstablishing call id to &lt;sip:79991234567@10.1.51.13&gt;, assigned id 1\nContacting &lt;sip:79991234567@10.1.51.13&gt;\nlinphonec&gt; Call 1 to &lt;sip:79991234567@10.1.51.13&gt; in progress.\nlinphonec&gt; Remote ringing.\nlinphonec&gt; Early media.\nlinphonec&gt; Call 1 with &lt;sip:79991234567@10.1.51.13&gt; early media.\nCall 1 with &lt;sip:79991234567@10.1.51.13&gt; connected.\nCall answered by &lt;sip:79991234567@10.1.51.13&gt;.\nlinphonec&gt; Media streams established with &lt;sip:79991234567@10.1.51.13&gt; for call 1 (audio).<\/pre>\n<pre><\/pre>\n<p>We may look active calls with &#8216;calls&#8217; command.<br \/>\nThis is how it looks like while ringing:<\/p>\n<pre>linphonec&gt; calls\nCall states\nId |            Destination              |      State      |    Flags   |\n------------------------------------------------------------------------\n2  | sip:79991234567@10.1.51.13          | OutgoingEarlyMedia | \n<\/pre>\n<p>And this is how it looks like during an established call:<\/p>\n<pre>linphonec&gt; calls\nCall states\nId |            Destination              |      State      |    Flags   |\n------------------------------------------------------------------------\n2  | sip:79991234567@10.1.51.13          | StreamsRunning  | \n<\/pre>\n<p>If you want to terminate a call, just type &#8216;terminate&#8217; and press Enter.<\/p>\n<p>If you have some troubles with sound and your PC is behind NAT, play with following parameters: &#8216;firewall&#8217; and &#8216;nat&#8217;. Maybe you need &#8216;firewall none&#8217; (it helped me at previous linphonec setup with one-way sound).<\/p>\n<p>5. You may quit linphonec with &#8216;quit&#8217; command. And these are history log, call log and configuration file in your home directory:<\/p>\n<pre>lexus@lexus:~$ ls -lh .linph*\n-rw------- 1 lexus lexus  162 \u043d\u043e\u044f\u0431. 24 15:10 .linphonec_history\n-rw------- 1 lexus lexus 2,5K \u043d\u043e\u044f\u0431. 24 15:10 .linphonerc\n<\/pre>\n<p>6. Read the <a href=\"http:\/\/www.linphone.org\/technical-corner\/linphone\/documentation\" target=\"_blank\" rel=\"noopener noreferrer\">documentation<\/a> for more information.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Wanna be a real VoIP nerd? :-) Let&#8217;s use Linphone from a command line! 1. &#8216;linphonec&#8217; &#8211; enter the CLI. 2. &#8216;help&#8217; &#8211; list available commands. Now it&#8217;s time to create a profile and connect to PBX 3. &#8216;help proxy&#8217; &#8211; show help. 3.1. &#8216;proxy add&#8217; &#8211; and press Enter. Answer to the appeared questions [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[210,211,88,89],"class_list":["post-875","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-linphone","tag-linphonec","tag-sip","tag-voip"],"_links":{"self":[{"href":"https:\/\/alexeyka.zantsev.com\/index.php?rest_route=\/wp\/v2\/posts\/875","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/alexeyka.zantsev.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/alexeyka.zantsev.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/alexeyka.zantsev.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/alexeyka.zantsev.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=875"}],"version-history":[{"count":19,"href":"https:\/\/alexeyka.zantsev.com\/index.php?rest_route=\/wp\/v2\/posts\/875\/revisions"}],"predecessor-version":[{"id":12184,"href":"https:\/\/alexeyka.zantsev.com\/index.php?rest_route=\/wp\/v2\/posts\/875\/revisions\/12184"}],"wp:attachment":[{"href":"https:\/\/alexeyka.zantsev.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=875"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/alexeyka.zantsev.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=875"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/alexeyka.zantsev.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=875"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}