<!-- 
RSS generated by JIRA (8.13.3#813003-sha1:22ebedbb75c99b147c66f14e031dd8a2d214753a) at Sat Feb 10 07:16:19 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-347] IP MAP with sip_profile binding</title>
                <link>https://jira.astppbilling.org/browse/ASTPPCOM-347</link>
                <project id="10608" key="ASTPPCOM">ASTPP Community</project>
                    <description>&lt;p&gt;You can binding sip_profile to IP MAP&lt;/p&gt;



&lt;p&gt;update DB:&lt;br/&gt;
&lt;tt&gt;ALTER TABLE }}ip_map{{ ADD }}sip_profile_id{{ INT(4) NOT NULL DEFAULT &apos;0&apos; AFTER }}id{{;&lt;/tt&gt;&lt;/p&gt;

&lt;p&gt;change astpp.dialplan.lua in line 117 to&lt;br/&gt;
`&lt;br/&gt;
    variable_sofia_profile_name = &quot;&quot;&lt;br/&gt;
    variable_sofia_profile_name = params:getHeader(&apos;variable_sofia_profile_name&apos;)&lt;/p&gt;

&lt;p&gt;    authinfo = doauthentication(destination_number,from_ip,variable_sofia_profile_name)&lt;br/&gt;
`&lt;/p&gt;


&lt;p&gt;update astpp.functions.lua in functions&lt;br/&gt;
doauthentication:&lt;br/&gt;
&amp;#8211; Do Authentication&lt;br/&gt;
function doauthentication (destination_number,from_ip, sofia_profile_name)&lt;br/&gt;
    return ipauthentication (destination_number,from_ip, sofia_profile_name)&lt;br/&gt;
end&lt;/p&gt;

&lt;p&gt;ipauthentication:&lt;br/&gt;
function ipauthentication(destination_number,from_ip, sofia_profile_name)&lt;br/&gt;
     local query = &quot;SELECT &quot;..TBL_IP_MAP..&quot;.*, (SELECT number FROM &quot;..TBL_USERS..&quot; where id=&quot;..TBL_IP_MAP..&quot;.accountid AND status=0 AND deleted=0) AS account_code FROM &quot;..TBL_IP_MAP..&quot;, &quot;..TBL_SIP_PROFIL&lt;br/&gt;
ES..&quot; WHERE &quot;..TBL_IP_MAP..&quot;.sip_profile_id=&quot;..TBL_SIP_PROFILES..&quot;.id AND &quot;..TBL_SIP_PROFILES..&quot;.name=&apos;&quot;..sofia_profile_name..&quot;&apos; AND INET_ATON(\&quot;&quot; ..from_ip.. &quot;\&quot;) BETWEEN(INET_ATON(SUBSTRING_INDEX(&lt;tt&gt;ip&lt;/tt&gt;&lt;br/&gt;
, &apos;/&apos;, 1)) &amp;amp; 0xffffffff ^((0x1 &amp;lt;&amp;lt;(32 -  SUBSTRING_INDEX(&lt;tt&gt;ip&lt;/tt&gt;, &apos;/&apos;, -1))) -1 )) AND(INET_ATON(SUBSTRING_INDEX(&lt;tt&gt;ip&lt;/tt&gt;, &apos;/&apos;, 1)) |((0x100000000 &amp;gt;&amp;gt; SUBSTRING_INDEX(&lt;tt&gt;ip&lt;/tt&gt;,&apos;/&apos;, -1)) -1))  AND \&quot;&quot; .. destination_&lt;br/&gt;
number .. &quot;\&quot;  LIKE CONCAT(prefix,&apos;%&apos;) ORDER BY LENGTH(prefix) DESC LIMIT 1&quot;&lt;/p&gt;


&lt;p&gt;add to constant.lua:&lt;br/&gt;
&lt;tt&gt;TBL_SIP_PROFILES = &quot;sip_profiles&quot;&lt;/tt&gt;&lt;/p&gt;

&lt;p&gt;And do web interface changes&lt;/p&gt;</description>
                <environment></environment>
        <key id="12167">ASTPPCOM-347</key>
            <summary>IP MAP with sip_profile binding</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="legionnet">legionnet</reporter>
                        <labels>
                    </labels>
                <created>Tue, 20 Mar 2018 12:31:04 +0530</created>
                <updated>Thu, 1 Apr 2021 18:57:24 +0530</updated>
                            <resolved>Thu, 1 Apr 2021 18:57:24 +0530</resolved>
                                                    <fixVersion>v4.0.2</fixVersion>
                                        <due></due>
                            <votes>0</votes>
                                    <watches>0</watches>
                                                                <comments>
                            <comment id="13216" author="legionnet" created="Tue, 20 Mar 2018 12:51:19 +0530"  >&lt;p&gt;I think sip registration is needed to binding sip_profiles too&lt;/p&gt;</comment>
                            <comment id="13217" author="smrdoshi" created="Tue, 20 Mar 2018 13:41:55 +0530"  >&lt;p&gt;Hi &lt;span class=&quot;error&quot;&gt;&amp;#91;~legionnet&amp;#93;&lt;/span&gt; &lt;/p&gt;

&lt;p&gt;What will be the use case to bind sip profile with ip map? &lt;/p&gt;</comment>
                            <comment id="13218" author="legionnet" created="Tue, 20 Mar 2018 13:46:45 +0530"  >&lt;p&gt;It`s more secure. Bind ip auth to sip profile (ip+port). &lt;br/&gt;
May use 1 client IP for different rate groups.&lt;br/&gt;
First rate group for first sip profile and second rate group for second sip profile.&lt;/p&gt;</comment>
                            <comment id="13219" author="legionnet" created="Wed, 21 Mar 2018 18:04:26 +0530"  >&lt;p&gt;And update please  freeswitch/fs/lib/astpp.xml.php on line 183&lt;br/&gt;
change $query to&lt;br/&gt;
$query = &quot;SELECT username,dir_params,dir_vars,number as accountcode,sip_devices.accountid FROM sip_devices,accounts,sip_profiles WHERE sip_profiles.id=sip_devices.sip_profile_id AND sip_devices.&lt;br/&gt;
status=0 AND accounts.status=0 AND accounts.deleted=0 AND accounts.id=sip_devices.accountid AND username=&apos;&quot; . $_REQUEST &lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;#39;user&amp;#39;&amp;#93;&lt;/span&gt; . &quot;&apos; AND sip_profiles.name=&apos;&quot; . $_REQUEST &lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;#39;sip_profile&amp;#39;&amp;#93;&lt;/span&gt; . &quot;&apos; limit 1&quot;;&lt;/p&gt;</comment>
                            <comment id="13220" author="smrdoshi" created="Wed, 28 Mar 2018 18:52:56 +0530"  >&lt;p&gt;Alright. I will review that in LAB and confirm. &lt;/p&gt;</comment>
                            <comment id="13221" author="smrdoshi" created="Mon, 9 Apr 2018 13:21:09 +0530"  >&lt;p&gt;We are still unsure about this improvements. Changing milestone to 4.0. &lt;/p&gt;</comment>
                            <comment id="13222" author="smrdoshi" created="Sat, 8 Sep 2018 13:31:43 +0530"  >&lt;p&gt;This will not useful as rate group is linked to main account. &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>347</customfieldvalue>

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

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