mirror of
https://github.com/jambonz/sbc-sip-sidecar.git
synced 2026-03-21 18:58:05 +00:00
Regbot persistent call-id and other fixes (#130)
* use gw sid as call id and fix bug on updateing regbots we must not mutate gw directly, as it is cached in the gateways array and adding properties would cause the JSON.stringify comparison to detect a false change on every checkStatus cycle, triggering unnecessary re-registrations. * fix tests add influx and also the registered now changes to remove previous reg on update * better test scenario still checks that we have 1 registered as expires now at 600s so it doesn't expire before the 65sec delay
This commit is contained in:
@@ -44,6 +44,16 @@ services:
|
||||
sbc-sip-sidecar:
|
||||
ipv4_address: 172.39.0.12
|
||||
|
||||
influxdb:
|
||||
image: influxdb:1.8
|
||||
ports:
|
||||
- "8086:8086/tcp"
|
||||
environment:
|
||||
INFLUXDB_DB: "jambones_time_series"
|
||||
networks:
|
||||
sbc-sip-sidecar:
|
||||
ipv4_address: 172.39.0.16
|
||||
|
||||
redis:
|
||||
image: redis:5-alpine
|
||||
ports:
|
||||
|
||||
@@ -72,6 +72,7 @@ test('trunk register tests', (t) => {
|
||||
})
|
||||
.then(() => {
|
||||
const obj = srf.locals.regbotStatus();
|
||||
console.log(`regbotStatus: total=${obj.total}, registered=${obj.registered}, active=${obj.active}`);
|
||||
return t.ok(obj.total === 2 && obj.registered === 1, 'successfully added gateway that tests failure result');
|
||||
})
|
||||
.then(() => {
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
[last_To:];tag=[pid]SIPpTag01[call_number]
|
||||
[last_Call-ID:]
|
||||
[last_CSeq:]
|
||||
Contact: <sip:[local_ip]:[local_port];transport=[transport]>;expires=60
|
||||
Contact: <sip:[local_ip]:[local_port];transport=[transport]>;expires=600
|
||||
Content-Type: application/sdp
|
||||
Content-Length: 0
|
||||
|
||||
@@ -75,7 +75,7 @@
|
||||
[last_To:];tag=[pid]SIPpTag01[call_number]
|
||||
[last_Call-ID:]
|
||||
[last_CSeq:]
|
||||
Contact: <sip:[local_ip]:[local_port];transport=[transport]>;expires=60
|
||||
Contact: <sip:[local_ip]:[local_port];transport=[transport]>;expires=600
|
||||
Content-Type: application/sdp
|
||||
Content-Length: 0
|
||||
|
||||
|
||||
Reference in New Issue
Block a user