Skip to content

Commit

Permalink
modified: config.ini
Browse files Browse the repository at this point in the history
	modified:   kSipP/forms.py
    Bug fix: CPS and No. of Calls field if set to None, then application crashed.
            made these fields mandatory

	renamed:    kSipP/scripts/modifyHeader.py -> kSipP/scripts/modify.py
	deleted:    kSipP/scripts/myScript.py
	modified:   kSipP/templates/index.html
  • Loading branch information
kiran-daware committed Mar 26, 2024
1 parent 7f1c7b4 commit 4b53029
Show file tree
Hide file tree
Showing 10 changed files with 23 additions and 18 deletions.
4 changes: 2 additions & 2 deletions config.ini
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ src_port_uac = 6061
src_port_uas = 6062
protocol_uac = u1
protocol_uas = u1
called_party_number = 1234
calling_party_number = 9975
called_party_number =
calling_party_number =
total_no_of_calls = 1
cps = 1
select_uac = uac_basic.xml
Expand Down
Binary file modified kSipP/__pycache__/forms.cpython-38.pyc
Binary file not shown.
Binary file modified kSipP/__pycache__/views.cpython-38.pyc
Binary file not shown.
4 changes: 2 additions & 2 deletions kSipP/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ class moreSippOptionsForm(forms.Form):
validators=[RegexValidator(r'^[a-zA-Z0-9]+$','Only alphanumeric characters are allowed.')])
calling_party_number = forms.CharField(label='Calling Party Number', max_length=30, required=False, initial='9876',
validators=[RegexValidator(r'^[a-zA-Z0-9]+$','Only alphanumeric characters are allowed.')] )
total_no_of_calls = forms.IntegerField(label='No. of calls to send', min_value=1, max_value=9999, required=False, initial=1)
cps = forms.IntegerField(label='Calls Per Second', min_value=1, max_value=100, required=False, initial=1)
total_no_of_calls = forms.IntegerField(label='No. of calls to send', min_value=1, max_value=9999, required=True, initial=1)
cps = forms.IntegerField(label='Calls Per Second', min_value=1, max_value=100, required=True, initial=1)
stun_server = forms.GenericIPAddressField(label='Stun Server', protocol='IPv4', required=False, initial='')


Expand Down
Binary file modified kSipP/scripts/__pycache__/kstun.cpython-38.pyc
Binary file not shown.
Binary file added kSipP/scripts/__pycache__/modify.cpython-38.pyc
Binary file not shown.
File renamed without changes.
11 changes: 0 additions & 11 deletions kSipP/scripts/myScript.py

This file was deleted.

20 changes: 18 additions & 2 deletions kSipP/templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,11 @@
</div>

<div style="float: left; padding: 20px; width: 38%;">
<form method="post">
<form method="post" id="mainForm">

{% csrf_token %}
{{ selectXml.as_p }}

<button type="submit" name="submitType" value="checkFlow" style="float: left; margin: 0 10px 10px 0;">Check XML Call Flow</button>
<div id="MoreOptions" {% if not showMoreOptionsForm %}style="display: none;"{% endif %}>
<div style="clear: both;">
Expand Down Expand Up @@ -97,6 +99,21 @@ <h3>Running SipP Processes:</h3>


<script>

//Submit the xml name as soon as selected
document.addEventListener('DOMContentLoaded', function() {
document.getElementById('id_select_uac').addEventListener('change', function() {
var submitButton = document.getElementById("save_config");
submitButton.click();
});
document.getElementById('id_select_uas').addEventListener('change', function() {
var submitButton = document.getElementById("save_config");
submitButton.click();
});
});


//show-hide MoreOptions Form
const showButton = document.getElementById("showMoreOptions");
// const hideButton = document.getElementById("hideMoreOptions");
const MoreOptions = document.getElementById("MoreOptions");
Expand Down Expand Up @@ -132,6 +149,5 @@ <h3>Running SipP Processes:</h3>




</body>
</html>
2 changes: 1 addition & 1 deletion kSipP/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
from .scripts.kstun import get_ip_info

from .scripts.showXmlFlow import showXmlFlowScript
from .scripts.modifyHeader import modifyHeaderScript, getHeadersFromSipMsgs, tmpXmlBehindNAT, modifynumberxmlpath
from .scripts.modify import modifyHeaderScript, getHeadersFromSipMsgs, tmpXmlBehindNAT, modifynumberxmlpath

# Read initial data from config file
config_file = os.path.join(str(settings.BASE_DIR), 'config.ini')
Expand Down

0 comments on commit 4b53029

Please sign in to comment.