<!-- 
RSS generated by JIRA (8.13.3#813003-sha1:22ebedbb75c99b147c66f14e031dd8a2d214753a) at Sat Feb 10 07:13:37 CET 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>Jira</title>
    <link>https://jira.astppbilling.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>8.13.3</version>
        <build-number>813003</build-number>
        <build-date>14-01-2021</build-date>
    </build-info>


<item>
            <title>[ASTPPCOM-36] Contribute new code for DID call type management</title>
                <link>https://jira.astppbilling.org/browse/ASTPPCOM-36</link>
                <project id="10608" key="ASTPPCOM">ASTPP Community</project>
                    <description>&lt;p&gt;Hi Team.&lt;/p&gt;

&lt;p&gt;I have modified and added my own code for DID management. I felt the need for ability to add call types of direct IP calling and a simpler version of the &quot;OTHER&quot; call type. I labeled them as Direct-IP and DID@IP/URL. See screenshot. Let me know how and if you would like me to share the code.&lt;/p&gt;

&lt;p&gt;The functions are as follows: &lt;br/&gt;
Direct-IP uses the number of the DID @ the extension / destination field.&lt;br/&gt;
DID@IP/URL is exactly like the &quot;Other&quot; option but it will just prepend sofia/default/&amp;lt;destination&amp;gt; field so you could use it to direct calls to any destination that is SIP URI capable.&lt;/p&gt;

&lt;p&gt;Examples:&lt;br/&gt;
Direct-IP: DID field = 1235551234 and Destination field = 1.2.3.4&lt;br/&gt;
The code behind will dial sofia/default/1235551234@1.2.3.4&lt;/p&gt;

&lt;p&gt;DID@IP/URL: DID field = 1235551234 and Destination field = 1234@1.2.3.4&lt;br/&gt;
The code behind will dial sofia/default/1234@1.2.3.4&lt;/p&gt;

&lt;p&gt;&lt;span class=&quot;image-wrap&quot; style=&quot;&quot;&gt;&lt;img src=&quot;https://cloud.githubusercontent.com/assets/20914943/17518402/1079c400-5e48-11e6-8852-4a0eb302433f.png&quot; style=&quot;border: 0px solid black&quot; /&gt;&lt;/span&gt;&lt;/p&gt;</description>
                <environment></environment>
        <key id="11856">ASTPPCOM-36</key>
            <summary>Contribute new code for DID call type management</summary>
                <type id="10201" iconUrl="https://jira.astppbilling.org/secure/viewavatar?size=xsmall&amp;avatarId=10700&amp;avatarType=issuetype">New Feature</type>
                                                <status id="10001" iconUrl="https://jira.astppbilling.org/images/icons/status_generic.gif" description="">Done</status>
                    <statusCategory id="3" key="done" colorName="green"/>
                                    <resolution id="10000">Done</resolution>
                                        <assignee username="samir.doshi">Samir Doshi</assignee>
                                    <reporter username="fozzygo4">fozzygo4</reporter>
                        <labels>
                            <label>contribution</label>
                    </labels>
                <created>Tue, 9 Aug 2016 19:25:04 +0530</created>
                <updated>Sun, 27 Oct 2019 15:50:22 +0530</updated>
                            <resolved>Tue, 5 Sep 2017 19:25:31 +0530</resolved>
                                                    <fixVersion>v3.5</fixVersion>
                                        <due></due>
                            <votes>0</votes>
                                    <watches>0</watches>
                                                                <comments>
                            <comment id="12574" author="smrdoshi" created="Wed, 10 Aug 2016 00:14:03 +0530"  >&lt;p&gt;@FozzyGo4, Yeah it will be good if you contribute code. This will be helpful for people who usually doing call routing to IP only.  &lt;/p&gt;</comment>
                            <comment id="12575" author="fozzygo4" created="Wed, 10 Aug 2016 01:01:41 +0530"  >&lt;p&gt;Awesome so should I just post it here?&lt;/p&gt;</comment>
                            <comment id="12576" author="smrdoshi" created="Thu, 11 Aug 2016 19:42:10 +0530"  >&lt;p&gt;Either you can send us the contribution in github as pull request &lt;a href=&quot;https://guides.github.com/activities/contributing-to-open-source/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://guides.github.com/activities/contributing-to-open-source/&lt;/a&gt; &lt;br/&gt;
OR post the code with instruction. &lt;/p&gt;</comment>
                            <comment id="12577" author="fozzygo4" created="Thu, 11 Aug 2016 22:58:10 +0530"  >&lt;p&gt;Ok im not sure how to do a pull request as I have never done so before so I will submit code here.&lt;/p&gt;

&lt;p&gt;Firstly in webUI /astpp/application/libraries/astpp/common.php&lt;/p&gt;

&lt;p&gt;Edit the code as follows:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;    function set_call_type($call_type = &quot;&quot;) {
        $call_type_array = array(&lt;span class=&quot;code-quote&quot;&gt;&quot;-1&quot;&lt;/span&gt; =&amp;gt; &lt;span class=&quot;code-quote&quot;&gt;&quot;--Select--&quot;&lt;/span&gt;,&lt;span class=&quot;code-quote&quot;&gt;&apos;1&apos;&lt;/span&gt; =&amp;gt; &lt;span class=&quot;code-quote&quot;&gt;&apos;DID-Local&apos;&lt;/span&gt;,&lt;span class=&quot;code-quote&quot;&gt;&apos;3&apos;&lt;/span&gt;=&amp;gt;&lt;span class=&quot;code-quote&quot;&gt;&apos;SIP-DID&apos;&lt;/span&gt;,&lt;span class=&quot;code-quote&quot;&gt;&apos;4&apos;&lt;/span&gt;=&amp;gt;&lt;span class=&quot;code-quote&quot;&gt;&apos;Direct-IP&apos;&lt;/span&gt;,&lt;span class=&quot;code-quote&quot;&gt;&apos;5&apos;&lt;/span&gt;=&amp;gt;&lt;span class=&quot;code-quote&quot;&gt;&apos;DID@IP/URL&apos;&lt;/span&gt;, &lt;span class=&quot;code-quote&quot;&gt;&apos;0&apos;&lt;/span&gt; =&amp;gt; &lt;span class=&quot;code-quote&quot;&gt;&apos;PSTN&apos;&lt;/span&gt;,  &lt;span class=&quot;code-quote&quot;&gt;&apos;2&apos;&lt;/span&gt; =&amp;gt; &lt;span class=&quot;code-quote&quot;&gt;&apos;Other&apos;&lt;/span&gt;,);
        &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; $call_type_array;
    }
    function set_call_type_search(){
        $call_type_array = array(&lt;span class=&quot;code-quote&quot;&gt;&quot;&quot; =&amp;gt; &quot;&lt;/span&gt;--Select--&quot;,&lt;span class=&quot;code-quote&quot;&gt;&apos;1&apos;&lt;/span&gt; =&amp;gt; &lt;span class=&quot;code-quote&quot;&gt;&apos;DID-Local&apos;&lt;/span&gt;,&lt;span class=&quot;code-quote&quot;&gt;&apos;3&apos;&lt;/span&gt;=&amp;gt;&lt;span class=&quot;code-quote&quot;&gt;&apos;SIP-DID&apos;&lt;/span&gt;,&lt;span class=&quot;code-quote&quot;&gt;&apos;4&apos;&lt;/span&gt;=&amp;gt;&lt;span class=&quot;code-quote&quot;&gt;&apos;Direct-IP&apos;&lt;/span&gt;,&lt;span class=&quot;code-quote&quot;&gt;&apos;5&apos;&lt;/span&gt;=&amp;gt;&lt;span class=&quot;code-quote&quot;&gt;&apos;DID@IP/URL&apos;&lt;/span&gt;, &lt;span class=&quot;code-quote&quot;&gt;&apos;0&apos;&lt;/span&gt; =&amp;gt; &lt;span class=&quot;code-quote&quot;&gt;&apos;PSTN&apos;&lt;/span&gt;,  &lt;span class=&quot;code-quote&quot;&gt;&apos;2&apos;&lt;/span&gt; =&amp;gt; &lt;span class=&quot;code-quote&quot;&gt;&apos;Other&apos;&lt;/span&gt;,);
        &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; $call_type_array;
    }
    function get_call_type($select = &lt;span class=&quot;code-quote&quot;&gt;&quot;&quot;, $table = &quot;&lt;/span&gt;&quot;, $call_type) {
        $call_type_array = array(&lt;span class=&quot;code-quote&quot;&gt;&apos;1&apos;&lt;/span&gt; =&amp;gt; &lt;span class=&quot;code-quote&quot;&gt;&apos;DID-Local&apos;&lt;/span&gt;,&lt;span class=&quot;code-quote&quot;&gt;&apos;3&apos;&lt;/span&gt;=&amp;gt;&lt;span class=&quot;code-quote&quot;&gt;&apos;SIP-DID&apos;&lt;/span&gt;,&lt;span class=&quot;code-quote&quot;&gt;&apos;4&apos;&lt;/span&gt;=&amp;gt;&lt;span class=&quot;code-quote&quot;&gt;&apos;Direct-IP&apos;&lt;/span&gt;,&lt;span class=&quot;code-quote&quot;&gt;&apos;5&apos;&lt;/span&gt;=&amp;gt;&lt;span class=&quot;code-quote&quot;&gt;&apos;DID@IP/URL&apos;&lt;/span&gt;,&lt;span class=&quot;code-quote&quot;&gt;&apos;0&apos;&lt;/span&gt; =&amp;gt; &lt;span class=&quot;code-quote&quot;&gt;&apos;PSTN&apos;&lt;/span&gt;,  &lt;span class=&quot;code-quote&quot;&gt;&apos;2&apos;&lt;/span&gt; =&amp;gt; &lt;span class=&quot;code-quote&quot;&gt;&apos;Other&apos;&lt;/span&gt;,&lt;span class=&quot;code-quote&quot;&gt;&apos;-1&apos;&lt;/span&gt;=&amp;gt;&quot;&quot;);
        &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; $call_type_array[$call_type];
    }

    function get_custom_call_type($call_type) {
        $call_type_array = array(&lt;span class=&quot;code-quote&quot;&gt;&apos;DID-Local&apos;&lt;/span&gt; =&amp;gt; &lt;span class=&quot;code-quote&quot;&gt;&apos;1&apos;&lt;/span&gt;,&lt;span class=&quot;code-quote&quot;&gt;&apos;SIP-DID&apos;&lt;/span&gt;=&amp;gt;&lt;span class=&quot;code-quote&quot;&gt;&apos;3&apos;&lt;/span&gt;,&lt;span class=&quot;code-quote&quot;&gt;&apos;Direct-IP&apos;&lt;/span&gt;=&amp;gt;&lt;span class=&quot;code-quote&quot;&gt;&apos;4&apos;&lt;/span&gt;,&lt;span class=&quot;code-quote&quot;&gt;&apos;DID@IP/URL&apos;&lt;/span&gt;=&amp;gt;&lt;span class=&quot;code-quote&quot;&gt;&apos;5&apos;&lt;/span&gt;,&lt;span class=&quot;code-quote&quot;&gt;&apos;PSTN&apos;&lt;/span&gt; =&amp;gt; &lt;span class=&quot;code-quote&quot;&gt;&apos;0&apos;&lt;/span&gt;,&lt;span class=&quot;code-quote&quot;&gt;&apos;Other&apos;&lt;/span&gt; =&amp;gt; &lt;span class=&quot;code-quote&quot;&gt;&apos;2&apos;&lt;/span&gt;,&lt;span class=&quot;code-quote&quot;&gt;&quot;&quot;=&amp;gt;&quot;&lt;/span&gt;-1&quot;);
        &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; $call_type_array[$call_type];
    }

&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;This gives extra options for the dropdown menu.&lt;/p&gt;

&lt;p&gt;Then in /usr/local/freeswitch/scripts/astpp/scripts/astpp.xml.lua add the following under:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;        elseif(tonumber(didinfo[&lt;span class=&quot;code-quote&quot;&gt;&apos;call_type&apos;&lt;/span&gt;]) == 2 and didinfo[&lt;span class=&quot;code-quote&quot;&gt;&apos;extensions&apos;&lt;/span&gt;] ~= &apos;&apos;) then
                table.insert(xml, [[&amp;lt;action application=&lt;span class=&quot;code-quote&quot;&gt;&quot;set&quot;&lt;/span&gt; data=&lt;span class=&quot;code-quote&quot;&gt;&quot;calltype=OTHER&quot;&lt;/span&gt;/&amp;gt;]]);
                table.insert(xml, [[&amp;lt;action application=&lt;span class=&quot;code-quote&quot;&gt;&quot;bridge&quot;&lt;/span&gt; data=&lt;span class=&quot;code-quote&quot;&gt;&quot;]]..didinfo[&lt;span class=&quot;code-quote&quot;&gt;&apos;extensions&apos;&lt;/span&gt;]..[[&quot;&lt;/span&gt;/&amp;gt;]]);


&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;        elseif(tonumber(didinfo[&lt;span class=&quot;code-quote&quot;&gt;&apos;call_type&apos;&lt;/span&gt;]) == 4 and didinfo[&lt;span class=&quot;code-quote&quot;&gt;&apos;extensions&apos;&lt;/span&gt;] ~= &apos;&apos;) then
                table.insert(xml, [[&amp;lt;action application=&lt;span class=&quot;code-quote&quot;&gt;&quot;set&quot;&lt;/span&gt; data=&lt;span class=&quot;code-quote&quot;&gt;&quot;calltype=DIRECT-IP&quot;&lt;/span&gt;/&amp;gt;]]);
                table.insert(xml, [[&amp;lt;action application=&lt;span class=&quot;code-quote&quot;&gt;&quot;bridge&quot;&lt;/span&gt; data=&lt;span class=&quot;code-quote&quot;&gt;&quot;sofia/&lt;span class=&quot;code-keyword&quot;&gt;default&lt;/span&gt;/]]..destination_number..[[@]]..didinfo[&lt;span class=&quot;code-quote&quot;&gt;&apos;extensions&apos;&lt;/span&gt;]..[[&quot;&lt;/span&gt;/&amp;gt;]]);

        elseif(tonumber(didinfo[&lt;span class=&quot;code-quote&quot;&gt;&apos;call_type&apos;&lt;/span&gt;]) == 5 and didinfo[&lt;span class=&quot;code-quote&quot;&gt;&apos;extensions&apos;&lt;/span&gt;] ~= &apos;&apos;) then
                table.insert(xml, [[&amp;lt;action application=&lt;span class=&quot;code-quote&quot;&gt;&quot;set&quot;&lt;/span&gt; data=&lt;span class=&quot;code-quote&quot;&gt;&quot;calltype=DID@IP&quot;&lt;/span&gt;/&amp;gt;]]);
                table.insert(xml, [[&amp;lt;action application=&lt;span class=&quot;code-quote&quot;&gt;&quot;bridge&quot;&lt;/span&gt; data=&lt;span class=&quot;code-quote&quot;&gt;&quot;sofia/&lt;span class=&quot;code-keyword&quot;&gt;default&lt;/span&gt;/]]..didinfo[&lt;span class=&quot;code-quote&quot;&gt;&apos;extensions&apos;&lt;/span&gt;]..[[&quot;&lt;/span&gt;/&amp;gt;]]);

&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                            <comment id="12578" author="smrdoshi" created="Tue, 5 Sep 2017 18:10:17 +0530"  >&lt;p&gt;Released in ASTPP v3.5. &lt;/p&gt;</comment>
                            <comment id="12579" author="fozzygo4" created="Tue, 5 Sep 2017 19:25:31 +0530"  >&lt;p&gt;Ah thats good news. Will upgrade soon. &lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10000" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10703" key="com.atlassian.jira.plugin.system.customfieldtypes:textfield">
                        <customfieldname>External issue ID</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>36</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10006" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0|i008uv:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        </customfields>
    </item>
</channel>
</rss>