[sr-dev] [kamailio/kamailio] Load dialogs from db at runtime, without restarting kamailio (#1274)
alexsosic
notifications at github.com
Tue Apr 10 14:05:36 CEST 2018
Ok @miconda,
So let's start with the failover case first.
I start a call on **kamailio1**:
`kamcmd> dlg.list
{
h_entry: 2294
h_id: 5833
ref: 2
call-id: lbiUaRwZR8x3mRiBjxWlJDpqkO9JHTdD
from_uri: sip:0409828030 at proxy.alex.cloud.evox.it
to_uri: sip:390409828030 at proxy.alex.cloud.evox.it
state: 4
start_ts: 1523361570
init_ts: 1523361570
end_ts: 0
timeout: 1523361757
lifetime: 187
dflags: 643
sflags: 0
iflags: 1
caller: {
tag: 2Qp.E4ft3KpSHWbjfHVMI2Q3Jz0wEyxW
contact: sip:0409828030 at 172.16.21.38:55236;ob
cseq: 1646
route_set: <sip:172.22.2.58;lr=on;ftag=2Qp.E4ft3KpSHWbjfHVMI2Q3Jz0wEyxW;did=6f8.6b92>
socket: udp:172.22.2.57:5060
}
callee: {
tag: as47e134c0
contact: sip:39390409828030 at 172.16.201.101:5060
cseq: 0
route_set: <sip:172.22.2.58;lr=on;ftag=2Qp.E4ft3KpSHWbjfHVMI2Q3Jz0wEyxW;did=6f8.7b92>
socket: udp:172.22.2.57:5060
}
profiles: {
}
variables: {
{
ru: sip:39390409828030 at carrier1.cloud.evox.it
}
{
du: sip:172.22.2.58:5060
}
{
cgrSupplier: carrier1.cloud.evox.it
}
{
cgrSuppliers: carrier1.cloud.evox.it,carrier2.cloud.evox.it,carrier3.cloud.evox.it
}
{
cgrCallip: 172.16.21.38
}
{
cgrDestination: 39390409828030
}
{
cgrAccount: 0409828030
}
{
cgrTenant: evox.it
}
{
cgrReqType: *prepaid
}
{
calleeNumber: 39390409828030
}
{
au: 0409828030
}
{
authType: subscriber
}
{
cgrSubsystems: "cgr_subsystems":"*resources;*suppliers;*accounts"
}
{
originalSourceIP: 172.16.21.38
}
}
}`
I then kill the **kamailio1** and start a new node **kamailio2** with empty dispatcher list. The call is still going on... now client side I do end the call that sends a bye to **kamailio2**, so the new kamailio node does this:
`# -----------------------------------------------------------------------------
# route FOREIGN_DIALOG
# short description
# -----------------------------------------------------------------------------
route[FOREIGN_DIALOG] {
$var(breadcrumbs) = "FOREIGN_DIALOG"; BREADCRUMBS
xlog("L_NOTICE","[f:$fU-t:$tU id:$ci | $rm] Foreign dialog detected for Call-ID: $ci\n");
dlg_db_load_callid($ci);
setflag(FLG_AUTH_PASSED);
if (is_method("BYE")) {
route(CGR_CALL_END);
sl_send_reply("200","OK");
}
exit;
} # end route FOREIGN_DIALOG`
After the call has ended I have this in the dialog inside the kamailio2 node:
`kamcmd> dlg.list
{
h_entry: 2294
h_id: 5833
ref: 2
call-id: lbiUaRwZR8x3mRiBjxWlJDpqkO9JHTdD
from_uri: sip:0409828030 at proxy.alex.cloud.evox.it
to_uri: sip:390409828030 at proxy.alex.cloud.evox.it
state: 4
start_ts: 1523361570
init_ts: 1523361632
end_ts: 0
timeout: 1523361758
lifetime: 188
dflags: 0
sflags: 0
iflags: 1
caller: {
tag: 2Qp.E4ft3KpSHWbjfHVMI2Q3Jz0wEyxW
contact: sip:0409828030 at 172.16.21.38:55236;ob
cseq: 1646
route_set: <sip:172.22.2.58;lr=on;ftag=2Qp.E4ft3KpSHWbjfHVMI2Q3Jz0wEyxW;did=6f8.6b92>
socket:
}
callee: {
tag: as47e134c0
contact: sip:39390409828030 at 172.16.201.101:5060
cseq: 0
route_set: <sip:172.22.2.58;lr=on;ftag=2Qp.E4ft3KpSHWbjfHVMI2Q3Jz0wEyxW;did=6f8.7b92>
socket:
}
profiles: {
}
variables: {
{
originalSourceIP: 172.16.21.38
}
{
cgrSubsystems: "cgr_subsystems":"*resources;*suppliers;*accounts"
}
{
authType: subscriber
}
{
au: 0409828030
}
{
calleeNumber: 39390409828030
}
{
cgrReqType: *prepaid
}
{
cgrTenant: evox.it
}
{
cgrAccount: 0409828030
}
{
cgrDestination: 39390409828030
}
{
cgrCallip: 172.16.21.38
}
{
cgrSuppliers: carrier1.cloud.evox.it,carrier2.cloud.evox.it,carrier3.cloud.evox.it
}
{
cgrSupplier: carrier1.cloud.evox.it
}
{
du: sip:172.22.2.58:5060
}
{
ru: sip:39390409828030 at carrier1.cloud.evox.it
}
}
}`
This stays in memory on the node and in the DB for 2 minutes after the call has ended and then it is cleared.
Is this behaviour correct? Am I clear enough or do you want me to make a video of what's going on?
Kind regards,
Alex
--
You are receiving this because you commented.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/1274#issuecomment-380074715
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-dev/attachments/20180410/1a9db4f6/attachment.html>
More information about the sr-dev
mailing list