Hello,
I'm using the dialog module to control the maximum number of calls allowed to be passed through. Is it possible to share the dialogs stored in memory with multiple instances of kamailio?
So if both kamailio instances process calls, and the maximum is set to a global of 10, both combined should never let more than 10 calls through.
Regards,
Grant
Hello,
Currently, this is work in progress. But in the meantime, it is possible to achieve using htable with dmq enabled.
I can post an example later if required.
Cheers, Charles On 16 Jan 2015 07:54, "Grant Bagdasarian" gb@cm.nl wrote:
Hello,
I’m using the dialog module to control the maximum number of calls allowed to be passed through.
Is it possible to share the dialogs stored in memory with multiple instances of kamailio?
So if both kamailio instances process calls, and the maximum is set to a global of 10, both combined should never let more than 10 calls through.
Regards,
Grant
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Hello,
hmm, I thought there was already a patch from Alex Hermann, might be just early for me here and that was just in the plans, because he changed how the profiles are stored to allow mixing from different servers.
Cheers, Daniel
On 16/01/15 12:23, Charles Chance wrote:
Hello,
Currently, this is work in progress. But in the meantime, it is possible to achieve using htable with dmq enabled.
I can post an example later if required.
Cheers, Charles
On 16 Jan 2015 07:54, "Grant Bagdasarian" <gb@cm.nl mailto:gb@cm.nl> wrote:
Hello, I’m using the dialog module to control the maximum number of calls allowed to be passed through. Is it possible to share the dialogs stored in memory with multiple instances of kamailio? So if both kamailio instances process calls, and the maximum is set to a global of 10, both combined should never let more than 10 calls through. Regards, Grant _______________________________________________ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org <mailto:sr-users@lists.sip-router.org> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
www.sipcentric.com http://www.sipcentric.com/
Follow us on twitter @sipcentric http://twitter.com/sipcentric
Sipcentric Ltd. Company registered in England & Wales no. 7365592. Registered office: Faraday Wharf, Innovation Birmingham Campus, Holt Street, Birmingham Science Park, Birmingham B7 4BB.
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Hi Daniel,
Alex's work is still in a personal branch since he ran out of time to finish, IIRC. I have plans to look at it over the next week or so, unless Alex has other ideas.
Perhaps he can comment?
Best, Charles On 16 Jan 2015 11:27, "Daniel-Constantin Mierla" miconda@gmail.com wrote:
Hello,
hmm, I thought there was already a patch from Alex Hermann, might be just early for me here and that was just in the plans, because he changed how the profiles are stored to allow mixing from different servers.
Cheers, Daniel
On 16/01/15 12:23, Charles Chance wrote:
Hello,
Currently, this is work in progress. But in the meantime, it is possible to achieve using htable with dmq enabled.
I can post an example later if required.
Cheers, Charles On 16 Jan 2015 07:54, "Grant Bagdasarian" gb@cm.nl wrote:
Hello,
I’m using the dialog module to control the maximum number of calls allowed to be passed through.
Is it possible to share the dialogs stored in memory with multiple instances of kamailio?
So if both kamailio instances process calls, and the maximum is set to a global of 10, both combined should never let more than 10 calls through.
Regards,
Grant
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
www.sipcentric.com
Follow us on twitter @sipcentric http://twitter.com/sipcentric
Sipcentric Ltd. Company registered in England & Wales no. 7365592. Registered office: Faraday Wharf, Innovation Birmingham Campus, Holt Street, Birmingham Science Park, Birmingham B7 4BB.
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing listsr-users@lists.sip-router.orghttp://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
-- Daniel-Constantin Mierlahttp://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
On Friday 16 January 2015, Charles Chance wrote:
Alex's work is still in a personal branch since he ran out of time to finish, IIRC. I have plans to look at it over the next week or so, unless Alex has other ideas.
Perhaps he can comment?
I couldn't get the dialog+dmq+tm combination in a stable state, it kept crashing on me. Accounting for packet loss and out-of-order events required changes to the dialog module which might have caused the issues. Because i ran out of time i had to abandon that route and went for a quick mod_perl script to send events to an external counter process.
I still think the concept is ok and i probably need to take another stab at it, but i have no estimate yet of when that might happen.
If anyone wants to pick up, please do.
Hello Charles,
I’ve looked at the htable and dmq modules, but I don’t understand how to integrate this with the dialog module.
Could you post an example please?
Thanks!
Regards,
Grant
From: sr-users [mailto:sr-users-bounces@lists.sip-router.org] On Behalf Of Charles Chance Sent: Friday, January 16, 2015 12:23 PM To: SIP Router - Kamailio (OpenSER) and SIP Express Router (SER) - Users Mailing List Subject: Re: [SR-Users] dialog module shared memory
Hello,
Currently, this is work in progress. But in the meantime, it is possible to achieve using htable with dmq enabled.
I can post an example later if required.
Cheers, Charles On 16 Jan 2015 07:54, "Grant Bagdasarian" <gb@cm.nlmailto:gb@cm.nl> wrote: Hello,
I’m using the dialog module to control the maximum number of calls allowed to be passed through. Is it possible to share the dialogs stored in memory with multiple instances of kamailio?
So if both kamailio instances process calls, and the maximum is set to a global of 10, both combined should never let more than 10 calls through.
Regards,
Grant
_______________________________________________ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.orgmailto:sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
www.sipcentric.comhttp://www.sipcentric.com/
Follow us on twitter @sipcentrichttp://twitter.com/sipcentric
Sipcentric Ltd. Company registered in England & Wales no. 7365592. Registered office: Faraday Wharf, Innovation Birmingham Campus, Holt Street, Birmingham Science Park, Birmingham B7 4BB.
Hi Grant,
There is no integration with the dialog module directly - that is coming soon - but for now you can track call profiles across the cluster by doing something like:
loadmodule "dmq" loadmodule "htable" ... modparam("dmq", "server_address", "sip:MY_IP_ADDR:5080") # <--- make sure you listen on a separate, restricted port! modparam("dmq", "notification_address", "sip:REMOTE_DMQ_ADDR:5080") # <--- we just need to tell DMQ about one other node - it will learn about any others itself ... modparam("htable", "enable_dmq", 1) modparam("htable", "htable", "call_profiles=>size=7;autoexpire=3600;dmqreplicate=1;") ...
route {
if (method == "KDMQ" && $Rp == 5080) { dmq_handle_message(); exit; }
# handle requests within SIP dialogs route(WITHINDLG); ... # on INVITE, add the call to one or more "profiles"... $sht(call_profiles=>$ci) = "external:" + $fu; # you can append more if required (+ ",international:" + $fu + ",outgoing:" + $fu...)
t_on_failure("FAILURE"); ...
}
route[WITHINDLG] { ... if (is_method("BYE")) { $sht(call_profiles=>$ci) = $null; } ... }
failure_route[FAILURE] { ... $sht(call_profiles=>$ci) = $null; ... }
Now, any time you need to, you can get the current count of calls in any profile for any user by doing...
$var(count_external) = $shtcv(call_profiles=>external:$fu); $var(count_outgoing) = $shtcv(call_profiles=>outgoing:$fu);
The above offers flexibility of adding calls to multiple profiles, but if that is beyond your requirements, you could equally just increment/decrement a counter for each user with:
$shtinc(call_count=>$fu) $shtdec(call_count=>$fu)
I put this together quickly, so please excuse any typos or omissions, but it should hopefully be enough for illustration purposes.
Regards,
Charles
On 19 January 2015 at 07:05, Grant Bagdasarian gb@cm.nl wrote:
Hello Charles,
I’ve looked at the htable and dmq modules, but I don’t understand how to integrate this with the dialog module.
Could you post an example please?
Thanks!
Regards,
Grant
*From:* sr-users [mailto:sr-users-bounces@lists.sip-router.org] *On Behalf Of *Charles Chance *Sent:* Friday, January 16, 2015 12:23 PM *To:* SIP Router - Kamailio (OpenSER) and SIP Express Router (SER) - Users Mailing List *Subject:* Re: [SR-Users] dialog module shared memory
Hello,
Currently, this is work in progress. But in the meantime, it is possible to achieve using htable with dmq enabled.
I can post an example later if required.
Cheers, Charles
On 16 Jan 2015 07:54, "Grant Bagdasarian" gb@cm.nl wrote:
Hello,
I’m using the dialog module to control the maximum number of calls allowed to be passed through.
Is it possible to share the dialogs stored in memory with multiple instances of kamailio?
So if both kamailio instances process calls, and the maximum is set to a global of 10, both combined should never let more than 10 calls through.
Regards,
Grant
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
www.sipcentric.com
Follow us on twitter @sipcentric http://twitter.com/sipcentric
Sipcentric Ltd. Company registered in England & Wales no. 7365592. Registered office: Faraday Wharf, Innovation Birmingham Campus, Holt Street, Birmingham Science Park, Birmingham B7 4BB.
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Hello Charles,
Yes, It’s enough. I understand the concept now.
Thank you!
Regards,
Grant
From: sr-users [mailto:sr-users-bounces@lists.sip-router.org] On Behalf Of Charles Chance Sent: Monday, January 19, 2015 12:59 PM To: Kamailio (SER) - Users Mailing List Subject: Re: [SR-Users] dialog module shared memory
Hi Grant,
There is no integration with the dialog module directly - that is coming soon - but for now you can track call profiles across the cluster by doing something like:
loadmodule "dmq" loadmodule "htable" ... modparam("dmq", "server_address", "sip:MY_IP_ADDR:5080") # <--- make sure you listen on a separate, restricted port! modparam("dmq", "notification_address", "sip:REMOTE_DMQ_ADDR:5080") # <--- we just need to tell DMQ about one other node - it will learn about any others itself ... modparam("htable", "enable_dmq", 1) modparam("htable", "htable", "call_profiles=>size=7;autoexpire=3600;dmqreplicate=1;") ...
route {
if (method == "KDMQ" && $Rp == 5080) { dmq_handle_message(); exit; }
# handle requests within SIP dialogs route(WITHINDLG); ... # on INVITE, add the call to one or more "profiles"... $sht(call_profiles=>$ci) = "external:" + $fu; # you can append more if required (+ ",international:" + $fu + ",outgoing:" + $fu...)
t_on_failure("FAILURE"); ...
}
route[WITHINDLG] { ... if (is_method("BYE")) { $sht(call_profiles=>$ci) = $null; } ... }
failure_route[FAILURE] { ... $sht(call_profiles=>$ci) = $null; ... }
Now, any time you need to, you can get the current count of calls in any profile for any user by doing...
$var(count_external) = $shtcv(call_profiles=>external:$fu); $var(count_outgoing) = $shtcv(call_profiles=>outgoing:$fu);
The above offers flexibility of adding calls to multiple profiles, but if that is beyond your requirements, you could equally just increment/decrement a counter for each user with:
$shtinc(call_count=>$fu) $shtdec(call_count=>$fu)
I put this together quickly, so please excuse any typos or omissions, but it should hopefully be enough for illustration purposes.
Regards,
Charles
On 19 January 2015 at 07:05, Grant Bagdasarian <gb@cm.nlmailto:gb@cm.nl> wrote: Hello Charles,
I’ve looked at the htable and dmq modules, but I don’t understand how to integrate this with the dialog module.
Could you post an example please?
Thanks!
Regards,
Grant
From: sr-users [mailto:sr-users-bounces@lists.sip-router.orgmailto:sr-users-bounces@lists.sip-router.org] On Behalf Of Charles Chance Sent: Friday, January 16, 2015 12:23 PM To: SIP Router - Kamailio (OpenSER) and SIP Express Router (SER) - Users Mailing List Subject: Re: [SR-Users] dialog module shared memory
Hello,
Currently, this is work in progress. But in the meantime, it is possible to achieve using htable with dmq enabled.
I can post an example later if required.
Cheers, Charles On 16 Jan 2015 07:54, "Grant Bagdasarian" <gb@cm.nlmailto:gb@cm.nl> wrote: Hello,
I’m using the dialog module to control the maximum number of calls allowed to be passed through. Is it possible to share the dialogs stored in memory with multiple instances of kamailio?
So if both kamailio instances process calls, and the maximum is set to a global of 10, both combined should never let more than 10 calls through.
Regards,
Grant
_______________________________________________ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.orgmailto:sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
www.sipcentric.comhttp://www.sipcentric.com/
Follow us on twitter @sipcentrichttp://twitter.com/sipcentric
Sipcentric Ltd. Company registered in England & Wales no. 7365592. Registered office: Faraday Wharf, Innovation Birmingham Campus, Holt Street, Birmingham Science Park, Birmingham B7 4BB.
_______________________________________________ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.orgmailto:sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
www.sipcentric.comhttp://www.sipcentric.com/
Follow us on twitter @sipcentrichttp://twitter.com/sipcentric
Sipcentric Ltd. Company registered in England & Wales no. 7365592. Registered office: Faraday Wharf, Innovation Birmingham Campus, Holt Street, Birmingham Science Park, Birmingham B7 4BB.
Hello,
in 4.2.x should be dialog profile replication on top of dmq, added by Alex Hermann. I haven't played myself with it yet.
In the past versions, I used various mechanims, like shared database with queries, notification from config file (park the invite, uac_req_send() with the local number of dialogs, then wait for response from the peer to allow the call or not) or relying on htable (which has alse replication via dmq).
Cheers, Daniel
On 16/01/15 08:54, Grant Bagdasarian wrote:
Hello,
I’m using the dialog module to control the maximum number of calls allowed to be passed through.
Is it possible to share the dialogs stored in memory with multiple instances of kamailio?
So if both kamailio instances process calls, and the maximum is set to a global of 10, both combined should never let more than 10 calls through.
Regards,
Grant
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users