5

I need to measure the MOS and quality of the VOIP service in a network. I want to create a script that simulates calls and then measure the networks metrics.

I'm using asterisk.

Do you have any suggestion about how to script and schedulate test calls with asterisk?

I would like to make calls of different duration maybe using some avi files.

Obviously I need to automate both outgoing call and automatic answer to that outgoing calls.

Kerby82
  • 4,934
  • 14
  • 48
  • 74
  • Question too broad. What exactly not work for you? Have you checked asterisk book? Asterisk dialout article on voip-info.org wiki? – arheops Apr 13 '15 at 15:29
  • I understood the automatic dialout for asterisk but not how to make automatic answer on other peers. I want to simulate a call between to person not just automatic dialout. – Kerby82 Apr 13 '15 at 16:13
  • Sorry, that is out of topic here. You have show your effort and ask question. What is your question? answer on asterisk you can do by "Answer" dialplan command. – arheops Apr 13 '15 at 19:56

3 Answers3

6

I would suggest using Asterisk Call Files

Create a file name /tmp/example.call such as:

Channel: SIP/peerdevice/1234
Application: Playback
Data: silence/1&tt-weasels 

And then copy that file and move it into the asterisk outgoing spool, such as:

cp /tmp/example.call /tmp/example.call.new
mv /tmp/example.call.new /var/spool/asterisk/outgoing

You'll notice at the Asterisk CLI it will originate a new call.

You can make another asterisk box answer the call automatically by saying to answer it in the dialplan, e.g. If you have another device SIP/peerdevice, and you're dialing 1234 per my example, in your dialplan:

[somecontext]
exten => 1234,1,Answer()
same =>       n,Noop(Example call inbound)
same =>       n,Playback(hello-world)
same =>       n,Hangup()

And you could create multiple extensions to do what you like to vary the behavior of the call.

dougBTV
  • 1,883
  • 1
  • 15
  • 18
4

You can also use the originate command, such as:

ast*CLI> channel originate SIP/755XXXXX@sip-outbound extension s@context_name

Which can also be issued from a shell as:

[user@host]$ asterisk -rx 'channel originate SIP/755XXXXX@sip-outbound extension s@context_name'

SIP/755XXXXX@sip-outbound = Is what device to use when dialing out so this could be IAX.,SIP,DAHDI following a slash and phone number

extension = Is required for the command. You may also use application followed by an Asterisk application, a la channel originate SIP/device/1234 application playback tt-monkeys which would playback a sound file.

s = This is what extension to send to within the context specified below

@context_name = Which context to send to in extensions.conf

More information available in this Asterisk guide

dougBTV
  • 1,883
  • 1
  • 15
  • 18
Vivek Raj
  • 597
  • 1
  • 5
  • 16
0

In case you will call a asterisk extension:

asterisk -rx "console dial extension@context"
panticz
  • 2,135
  • 25
  • 16