
Perl script to use Net::SIP module to make voip calls routinely for testing purposes
- or -
Post a project like this4328
£1.2k(approx. $1.6k)
- Posted:
- Proposals: 1
- Remote
- #359313
- Completed
Description
Experience Level: Expert
Estimated project duration: 3 - 4 weeks
Hi
The general idea here is to utilise the Net::SIP module, as a primary part, in perls cpan to routinely make several types of calls and log the results to a database.
We intend to find out the following information -
- What was the PDD (post dial delay?)
- Was there FAS (false answer supervision).. i.e. did we recieve RTP data before we recieved a '200 OK' to tell us the call had started
- Packet Loss stats
- Audio delay measurements
Below is an idea as to how we'd expect this to be done.
Assumptions:
- We have many possible 'routes' to make calls over.
- We expect these tests to be routinely carried out on each of these routes.
- The numbers being dialled will exit onto public telephone networks, but will always terminate back to phone systems that we can control (to allow us to measure metrics on the calling and recieving parties UAs.)
- Results will be stored in a MySQL.. Postgresql.. your choice, database. The general idea of the schema is described later.
PDD Test -
1. Script selects a route to test. This basically means 'we want to test the route that lets us call the UK, so make calls using this prefix to this ip'.
2. Script makes a call to a pre-defined number, noting the time it sends the SIP INVITE.
3. Once the script recieves a '180 IN PROGRESS', the time is noted.
4. The PDD is calculated as (the time we recieved the 180) - (time of the invite). So the value might be '5 seconds'.
FAS Test -
1. Perhaps following on from the above, we can control the number being dialled to pick up after the 180, after a period of say 5 seconds.
2. So with that in mind, we can suggest that on receieving the 180, we should wait between 4-6 seconds to recieve a 200 ok.
3. If it is less than 5 seconds, then the test will be marked as 'potential fas'.
4. So the result would be, for example '-1' to suggest the call was picked up from the callers perspective 1 second before the pre-allocated '5 seconds'. And +1 would suggest the oposite.
Packet Loss -
1. On recieving the 200 OK in callers UA, we need to count the RTP packets we SEND as part of the call.
2. We will also need to count the RTP packets RECIEVED on the calee.
3. We need to record the packets lost. for example '-100' would indicate we lost 100 packets.
Audio Delay -
1. During the call, we will send DTMF codes, noting the time they were sent.
2. We will record the time the DTMF codes were recieved, and note the delay. a value might be '3' which would suggest we recieved the dtmf 3 seconds after sending it.
The database -
Assuming the database was relational (i.e. mysql.. postgresql) each test would have it's own table. For example, dbo.audio_delay.
Below is an idea as to the table layouts, with column titles and ideas as to the data contained.
dbo.routes
ratcat_ref - 'x' ... generated by an unrelated web interface. used to map.
route_name - 'UK Mobile Orange'
account_number - '12345' ... generated by an unrelated web interface. used to map.
supplier_company_name - 'Telecom Company Ltd.'
supplier_contact_name - 'Mr Joe Bloggs'
supplier_contact_email - 'a@a.com'
supplier_contact_number - '12345678'
route_ip - '127.0.0.1:5060' .. the place to make the call
route_prefix - '9000' .. the prefix to pre-pend to the invite
route_number - '12345678' .. the number we will call
dbo.post_dial_delay
test_id - unique auto generated
updated - 'epoch time value of when the data was imported'
route_id - 'this will map the test to the route concerned in dbo.routes
value - '5' .. the actual pdd result value
dbo.false_answer_supervision
test_id - unique auto generated
updated - 'epoch time value of when the data was imported'
route_id - 'this will map the test to the route concerned in dbo.routes
value - '-1' .. the actual result.
dbo.packet_loss
test_id - unique auto generated
updated - 'epoch time value of when the data was imported'
route_id - 'this will map the test to the route concerned in dbo.routes
value - '-100' .. the actual result.
dbo.audio_delay
test_id - unique auto generated
updated - 'epoch time value of when the data was imported'
route_id - 'this will map the test to the route concerned in dbo.routes
value - '3' .. the actual result.
Happy to hear questions and proposals!
The general idea here is to utilise the Net::SIP module, as a primary part, in perls cpan to routinely make several types of calls and log the results to a database.
We intend to find out the following information -
- What was the PDD (post dial delay?)
- Was there FAS (false answer supervision).. i.e. did we recieve RTP data before we recieved a '200 OK' to tell us the call had started
- Packet Loss stats
- Audio delay measurements
Below is an idea as to how we'd expect this to be done.
Assumptions:
- We have many possible 'routes' to make calls over.
- We expect these tests to be routinely carried out on each of these routes.
- The numbers being dialled will exit onto public telephone networks, but will always terminate back to phone systems that we can control (to allow us to measure metrics on the calling and recieving parties UAs.)
- Results will be stored in a MySQL.. Postgresql.. your choice, database. The general idea of the schema is described later.
PDD Test -
1. Script selects a route to test. This basically means 'we want to test the route that lets us call the UK, so make calls using this prefix to this ip'.
2. Script makes a call to a pre-defined number, noting the time it sends the SIP INVITE.
3. Once the script recieves a '180 IN PROGRESS', the time is noted.
4. The PDD is calculated as (the time we recieved the 180) - (time of the invite). So the value might be '5 seconds'.
FAS Test -
1. Perhaps following on from the above, we can control the number being dialled to pick up after the 180, after a period of say 5 seconds.
2. So with that in mind, we can suggest that on receieving the 180, we should wait between 4-6 seconds to recieve a 200 ok.
3. If it is less than 5 seconds, then the test will be marked as 'potential fas'.
4. So the result would be, for example '-1' to suggest the call was picked up from the callers perspective 1 second before the pre-allocated '5 seconds'. And +1 would suggest the oposite.
Packet Loss -
1. On recieving the 200 OK in callers UA, we need to count the RTP packets we SEND as part of the call.
2. We will also need to count the RTP packets RECIEVED on the calee.
3. We need to record the packets lost. for example '-100' would indicate we lost 100 packets.
Audio Delay -
1. During the call, we will send DTMF codes, noting the time they were sent.
2. We will record the time the DTMF codes were recieved, and note the delay. a value might be '3' which would suggest we recieved the dtmf 3 seconds after sending it.
The database -
Assuming the database was relational (i.e. mysql.. postgresql) each test would have it's own table. For example, dbo.audio_delay.
Below is an idea as to the table layouts, with column titles and ideas as to the data contained.
dbo.routes
ratcat_ref - 'x' ... generated by an unrelated web interface. used to map.
route_name - 'UK Mobile Orange'
account_number - '12345' ... generated by an unrelated web interface. used to map.
supplier_company_name - 'Telecom Company Ltd.'
supplier_contact_name - 'Mr Joe Bloggs'
supplier_contact_email - 'a@a.com'
supplier_contact_number - '12345678'
route_ip - '127.0.0.1:5060' .. the place to make the call
route_prefix - '9000' .. the prefix to pre-pend to the invite
route_number - '12345678' .. the number we will call
dbo.post_dial_delay
test_id - unique auto generated
updated - 'epoch time value of when the data was imported'
route_id - 'this will map the test to the route concerned in dbo.routes
value - '5' .. the actual pdd result value
dbo.false_answer_supervision
test_id - unique auto generated
updated - 'epoch time value of when the data was imported'
route_id - 'this will map the test to the route concerned in dbo.routes
value - '-1' .. the actual result.
dbo.packet_loss
test_id - unique auto generated
updated - 'epoch time value of when the data was imported'
route_id - 'this will map the test to the route concerned in dbo.routes
value - '-100' .. the actual result.
dbo.audio_delay
test_id - unique auto generated
updated - 'epoch time value of when the data was imported'
route_id - 'this will map the test to the route concerned in dbo.routes
value - '3' .. the actual result.
Happy to hear questions and proposals!

Ben C.
100% (7)Projects Completed
16
Freelancers worked with
11
Projects awarded
41%
Last project
13 Sep 2014
United Kingdom
New Proposal
Login to your account and send a proposal now to get this project.
Log inClarification Board Ask a Question
-
There are no clarification messages.
We collect cookies to enable the proper functioning and security of our website, and to enhance your experience. By clicking on 'Accept All Cookies', you consent to the use of these cookies. You can change your 'Cookies Settings' at any time. For more information, please read ourCookie Policy
Cookie Settings
Accept All Cookies