Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Testing scenario examples #27

Open
igorolhovskiy opened this issue Aug 12, 2021 · 3 comments
Open

Testing scenario examples #27

igorolhovskiy opened this issue Aug 12, 2021 · 3 comments

Comments

@igorolhovskiy
Copy link
Collaborator

I have a small question, which I did not get from ClueCon presentation
or documentation (or maybe just were looking elsewhere :) )

For testing scenario like ring group, for ex

10 accounts, 88880 - 88889

9 is in the ring group and 1 is calling.
Like 88880 is calling some predefined number, like 99999 and 88881 - 88889 are members of this ring group.

All 10 should register on registrar server (could be one, could be different), than 88880 fire a call to 99999
And than other 9 (88881 - 88889) starts to receive calls in some predefined order (defined by PBX logic)
and some of accounts are rejecting calls (and this alter calling to other accounts).
It's really just a ring group with a bit complex scenario.

For ex (quite advanced scenario, not real life, but covers more-or-less real world cases by parts):
88880 USER/PASS reg on server0
88881 USER/PASS reg on server1
....
88889 USER/PASS reg on server9
After all regs are successful

88880 calls 99999 on server0
88881 and 88882 should receive a call simultaneously
88881 reject call with 603 Declined
88883 start ringing after 88881 rejects call
88882 does not answer within 20 sec
88884 starts ringing after 20 sec from call start
88885 and 88886 starts ringing after 40 sec from call start
88886 answers the call after 5 sec of ringing
All other ringing accounts stop ringing.
88886 after 10 sec of conversation transfer call to 88887 (blind transfer)
88887 ringing and not answering within 10 sec
88888 starts ringing after 10 sec of call transfer to 88887
88888 answers the call
88888 holding conversation and in a same time calling to 88889 (attendant transfer)
88889 answers the call
After 10 sec of a call, 88888 REFER the call with 88887 to 88889
After 10 sec of REFER 88889 hangs up the call
At the same moment 88880 should receive BYE

So, my question is. Do I need to have several instances of voip_patrol
or can I define all this in one XML? Means how to combine register/wait
and register/call based on XML and account numbers?

@jchavanton
Copy link
Owner

jchavanton commented Aug 13, 2021

I would do

    <action type="register" transport="tcp" expected_cause_code="200"
        username="88880" password="xxxx"  realm="registrar"  registrar="registrar"
    />
    <!-- ... all the others !-->
    <action type="register" transport="tcp" expected_cause_code="200"
        username="88889" password="xxxx"  realm="registrar"  registrar="registrar"
    />
    <action type="wait" complete="true"/>
    
    <action type="accept"
            account="88880"     username="88880"
            max_duration="20" hangup="60"  code="200" reason="OK"/>
 <!-- ... all the others !-->
    <action type="accept"
             account="88889"     username="88880"
            max_duration="20" hangup="60"  code="200" reason="OK"/>

  <!-- ... and finally call !-->
  <action type="call" 
        callee="[email protected]"
        caller="[email protected]" />
        
    <action type="wait" complete="true"/>

Not sure about all the tests, hopefully you can use the action params of accept and call to do what you want.

accept command parameters

Name Type Description
ringing_duration int ringing duration in seconds
early_media bool if "true" 183 with SDP and early media is used
timer string control SIP session timers, possible values are : inactive, optional, required or always
code int SIP cause code to return must be >100 and <700
account string Account will be used if it matches the user part of an incoming call RURI or "default" will catch all
response_delay int ms delay before reponse is sent, useful to test timeouts and race conditions
call_count int The amount of calls to receive to consider the command completed, default -1 (considered completed)
transport string Force a specific transport for all messages on accepted calls, default to all transport available
re_invite_interval int Interval in seconds at which a re-invite with SDP will be sent
rtp_stats bool if "true" the json report will include a report on RTP transmission
hangup int call duration in second before hangup

@jchavanton
Copy link
Owner

Does this help ? @igorolhovskiy

@igorolhovskiy
Copy link
Collaborator Author

@jchavanton Thanks for reply, did not completed full scenario yet, as went on vacations ) Done some basic scenarios though, looks promising.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants