Skip to content

Commit

Permalink
try to reproduce the issue
Browse files Browse the repository at this point in the history
  • Loading branch information
xquanluu committed Jan 22, 2024
1 parent d66d068 commit c570f03
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 28 deletions.
6 changes: 3 additions & 3 deletions test/docker-compose-testbed.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ networks:
services:

drachtio-sut:
image: drachtio/drachtio-server:latest
command: drachtio --contact "sip:*;transport=udp" --loglevel info --sofia-loglevel 3
image: drachtio/drachtio-server:0.8.24
command: drachtio --contact "sip:172.29.0.10;transport=udp" --loglevel info --sofia-loglevel 3
container_name: drachtio-sut
ports:
- "9061:9022/tcp"
Expand All @@ -32,7 +32,7 @@ services:

sipp-uas:
image: drachtio/sipp:latest
command: sipp -sf /tmp/uas.xml
command: sipp -sf /tmp/uas.xml -trace_msg
container_name: sipp-uas
volumes:
- ./scenarios:/tmp
Expand Down
12 changes: 6 additions & 6 deletions test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ exec('"npm" run unittests', (err, stdout, stderr) => {
console.log('Run integration tests');

require('./docker_start');
require('./b2b');
require('./reinvite-tests');
require('./uac');
require('./uas');
// require('./b2b');
// require('./reinvite-tests');
// require('./uac');
// require('./uas');
require('./proxy');
require('./utils');
require('./refer');
// require('./utils');
// require('./refer');
require('./docker_stop');
});

Expand Down
15 changes: 1 addition & 14 deletions test/proxy.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ test('proxy', (t) => {

// proxy uses Promise
.then(() => {
return proxy.proxyPromise('sipp-uas');
return proxy.proxyPromise(['sip:123124123@sipp-uas;transport=udp']);
})
.then((proxy) => {
return sippUac('uac-proxy.xml');
Expand All @@ -26,19 +26,6 @@ test('proxy', (t) => {
return proxy.disconnect();
})

//proxy provides callback
.then(() => {
proxy = new Proxy();
return proxy.proxyCb('sipp-uas');
})
.then((uas) => {
return sippUac('uac-proxy.xml');
})
.then(() => {
return t.pass('srf.proxyRequest accepts a callback');
})


.then(() => {
proxy.disconnect();
return new Promise((resolve, reject) => {
Expand Down
11 changes: 7 additions & 4 deletions test/scripts/proxy.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,13 @@ class App extends Emitter {

proxyPromise(dest) {
this.srf.invite((req, res) => {
this.srf.proxyRequest(req, dest, {remainInDialog: true})
.then((results) => {
this.emit('proxy', results)
});
this.srf.proxyRequest(req, dest, {
remainInDialog: true,
followRedirects: false}
)
.then((results) => {
this.emit('proxy', results)
});
});
}

Expand Down
2 changes: 1 addition & 1 deletion test/sipp.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ obj.sippUac = (file) => {
'-sleep', '250ms',
'-nostdin',
'-cid_str', `%u-%p@%s-${idx++}`,
'drachtio-sut'
'drachtio-sut', '-trace_msg'
];

clearOutput();
Expand Down

0 comments on commit c570f03

Please sign in to comment.