-
-
Notifications
You must be signed in to change notification settings - Fork 12
/
default.js
203 lines (197 loc) · 9.2 KB
/
default.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
// HEPGEN-JS SETTINGS (please configure)
// ------------------------------------------------------
var call_id = Math.random().toString(36).substring(7) + '@127.0.0.1';
var config = {
NAME: 'SIP Session + All Reports',
HEP_SERVER: '127.0.0.1',
HEP_PORT: 9060,
HEP_ID: '2001',
HEP_AUTH: 'myHep',
// the Messages to send
MESSAGES: [
{
// SIP INVITE
rcinfo: {
type: 'HEP',
version: 3,
payload_type: 1,
captureId: '2001',
capturePass: 'myHep',
ip_family: 2,
protocol: 17,
proto_type: 1,
correlation_id: call_id,
srcIp: '192.168.1.1',
dstIp: '192.168.1.2',
srcPort: 5060,
dstPort: 5060
},
pause: 0,
payload: 'INVITE sip:[email protected] SIP/2.0\nCall-ID: '+call_id+'\nCSeq: 1 INVITE\nFrom: <sip:[email protected]>;tag=2628881569\nTo: <sip:[email protected]>\nVia: SIP/2.0/UDP 127.0.0.1:48495;branch=z9hG4bK9b82aa8fb4c7705466a3456dfff7f384333332\nMax-Forwards: 70\nAllow: INVITE, ACK, CANCEL, BYE\nUser-Agent: HEPGEN-UAC\nContent-Type: application/sdp\nContent-Length: 287\n\nv=0\no=nodejs-Session 1028236597 1930329353 IN IP4 127.126.124.123s=nodejs\nc=IN IP4 127.126.124.123\nt=0 0\nm=audio 5072 RTP/AVP 18 0 8 101\na=fmtp:101 0-15\na=rtpmap:18 G729/8000\na=rtpmap:0 PCMU/8000\na=rtpmap:8 PCMA/8000\na=rtpmap:101 telephone-event/8000\na=ptime:20\na=sendrecv\r\n\r\n'
},
{
// SIP Response 100 Trying
rcinfo: {
type: 'HEP',
version: 3,
payload_type: 1,
captureId: '2001',
capturePass: 'myHep',
ip_family: 2,
protocol: 17,
proto_type: 1,
correlation_id: call_id,
srcIp: '192.168.1.2',
dstIp: '192.168.1.1',
srcPort: 5060,
dstPort: 5060
},
pause: 200,
payload: 'SIP/2.0 100 Trying\nCall-ID: '+call_id+'\nCSeq: 1 INVITE\nFrom: <sip:[email protected]>;tag=2628881569\nTo: <sip:[email protected]>;tag=1d24a28a0bded6c40d31e6db8aab9ac6.369f\nVia: SIP/2.0/UDP 192.168.1.1:48495;branch=z9hG4bK9b82aa8fb4c7705466a3456dfff7f384333332;rport=48495\nUser-Agent: HEPGEN-UAS\nContent-Length: 0\r\n\r\n'
},
{
// SIP Response 407
rcinfo: {
type: 'HEP',
version: 3,
payload_type: 1,
captureId: '2001',
capturePass: 'myHep',
ip_family: 2,
protocol: 17,
proto_type: 1,
correlation_id: call_id,
srcIp: '192.168.1.2',
dstIp: '192.168.1.1',
srcPort: 5060,
dstPort: 5060
},
pause: 800,
payload: 'SIP/2.0 407 Proxy Authentication Required\nCall-ID: '+call_id+'\nCSeq: 1 INVITE\nFrom: <sip:[email protected]>;tag=2628881569\nTo: <sip:[email protected]>;tag=1d24a28a0bded6c40d31e6db8aab9ac6.369f\nVia: SIP/2.0/UDP 192.168.1.1:48495;branch=z9hG4bK9b82aa8fb4c7705466a3456dfff7f384333332;rport=48495\nProxy-Authenticate: Digest realm="127.0.0.1", nonce="VmsCHVZrAPHQLsMOHd44GstzBKBncUuh"\nUser-Agent: HEPGEN-UAS\nContent-Length: 0\r\n\r\n'
},
{
// SIP Request
rcinfo: {
type: 'HEP',
version: 3,
payload_type: 1,
captureId: '2001',
capturePass: 'myHep',
ip_family: 2,
protocol: 17,
proto_type: 1,
correlation_id: call_id,
srcIp: '192.168.1.1',
dstIp: '192.168.1.2',
srcPort: 5060,
dstPort: 5060
},
pause: 1000,
payload: 'OPTIONS sip:127.0.0.1 SIP/2.0\nCall-ID: '+call_id+'\nCSeq: 9999 OPTIONS\nFrom: <sip:[email protected]>;tag=2628881569\nTo: <sip:[email protected]>\nVia: SIP/2.0/UDP 127.0.0.1:48495;branch=z9hG4bK9b82aa8fb4c7705466a3456dfff7f384333332\nMax-Forwards: 70\nUser-Agent: HEPGEN-UAC\nContent-Length: 0\r\n\r\n'
},
{
// Session Log
rcinfo: {
type: 'HEP',
version: 3,
payload_type: 'SIP',
captureId: '2001',
capturePass: 'myHep',
ip_family: 2,
protocol: 17,
proto_type: 100,
srcIp: '192.168.1.1',
dstIp: '192.168.1.2',
srcPort: 0,
dstPort: 0,
correlation_id: call_id
},
pause: 1000,
payload: 'SYSLOG: Processing OPTIONS request from nodejs using Call-Id: '+call_id
},
{
// SIP Response
rcinfo: {
type: 'HEP',
version: 3,
payload_type: 1,
captureId: '2001',
capturePass: 'myHep',
ip_family: 2,
protocol: 17,
proto_type: 1,
correlation_id: call_id,
srcIp: '192.168.1.2',
dstIp: '192.168.1.1',
srcPort: 5060,
dstPort: 5060
},
pause: 1200,
payload: 'SIP/2.0 200 Alive\nRecord-Route: <sip:127.0.0.1;r2=on;lr=on;ftag=2628881569;socket=udp:127.0.0.1:5060>\nCall-ID: '+call_id+'\nCSeq: 9999 OPTIONS\nFrom: <sip:[email protected]>;tag=2628881569\nTo: <sip:[email protected]>;tag=1d24a28a0bded6c40d31e6db8aab9ac6.369f\nVia: SIP/2.0/UDP 192.168.1.1:48495;branch=z9hG4bK9b82aa8fb4c7705466a3456dfff7f384333332;rport=48495\nUser-Agent: HEPGEN-UAS\nContent-Length: 0\r\n\r\n'
},
{
// SIP PUBLISH RTCP-XR Vq
rcinfo: {
type: 'HEP',
version: 3,
payload_type: 1,
captureId: '2001',
capturePass: 'myHep',
ip_family: 2,
protocol: 17,
proto_type: 1,
correlation_id: call_id,
srcIp: '192.168.1.1',
dstIp: '192.168.1.2',
srcPort: 5060,
dstPort: 5060
},
pause: 1300,
payload: 'PUBLISH sip:[email protected]:5999;transport=udp SIP/2.0\nCall-ID: '+call_id+'\nCSeq: 1 PUBLISH\nFrom: <sip:[email protected]>;tag=2628881569\nTo: <sip:[email protected]>;tag=1d24a28a0bded6c40d31e6db8aab9ac6.369f\nVia: SIP/2.0/UDP 192.168.1.1:48495;branch=z9hG4bK9b82aa8fb4c7705466a3456dfff7f384333332\nUser-Agent: HEPGEN-UAS\nContent-Type: application/vq-rtcpxr\nContent-Length: 450\n\nVQIntervalReport\nLocalMetrics:\nSessionDesc:PT=124 PD=opus SR=48000\nTimestamps:START=2015-02-28T21:04:31.000582Z STOP=2015-02-28T21:04:36.000598Z\nCallID:'+call_id+'\nFromID:<sip:[email protected]>\nToID:<sip:[email protected]>\nOrigID:<sip:[email protected]>\nLocalAddr:IP:192.168.1.55 PORT:30539\nLocalMAC:99:e6:ba:df:7b:dd\nRemoteAddr:IP:192.168.1.23 PORT:7079\nRemoteMAC:99:72:b9:28:c2:82\nPacketLoss:NLR=8.0\nDelay:IAJ=93\r\n\r\n'
},
/*
{
// QoS Report
rcinfo: {
type: 'HEP',
version: 3,
payload_type: 'JSON',
captureId: '2001',
capturePass: 'myHep',
ip_family: 2,
protocol: 17,
proto_type: 99,
srcIp: '192.168.1.1',
dstIp: '192.168.1.2',
srcPort: 0,
dstPort: 0,
correlation_id: call_id
},
pause: 1300,
payload: '{"CORRELATION_ID":"'+call_id+'","RTP_SIP_CALL_ID":"'+call_id+'","DELTA":19.971924,"JITTER":0.162653,"REPORT_TS":1443793820,"TL_BYTE":0,"SKEW":0.701172, "TOTAL_PK":1783,"PACKET_LOSS":0,"SEQ":0,"MAX_JITTER":0.575890,"MAX_DELTA":140.515137,"MAX_SKEW":-1.395996,"MEAN_JITTER":0.196664,"MIN_MOS":4.324768, "MEAN_MOS":4.394112, "MOS":4.394147,"RFACTOR":92.442569,"MIN_RFACTOR":89.429284,"MEAN_RFACTOR":92.440869,"SRC_IP":"192.168.1.1", "SRC_PORT":21122, "DST_IP":"192.168.1.2","DST_PORT":52268,"CODEC_PT":8, "CLOCK":8000,"CODEC_NAME":"pcma","TYPE":"HANGUP"}'
},
*/
{
// RTCP Report
rcinfo: {
type: 'HEP',
version: 3,
payload_type: 'JSON',
captureId: '2001',
capturePass: 'myHep',
ip_family: 2,
protocol: 17,
proto_type: 5,
srcIp: '192.168.1.1',
dstIp: '192.168.1.2',
srcPort: 0,
dstPort: 0,
correlation_id: call_id
},
pause: 1300,
payload: '{"sender_information":{"ntp_timestamp_sec":3650797214,"packets":106,"ntp_timestamp_usec":13217348104192,"octets":16960,"rtp_timestamp":16960},"ssrc":451916597,"type":200,"report_blocks":[{"source_ssrc":898343773,"highest_seq_no":20881,"fraction_lost":0,"ia_jitter":1,"packets_lost":0,"lsr":-1097006646,"dlsr":7733}],"report_count":0}'
}
]
};
// ------------------------------------------------------
module.exports = config;