[SR-Users] YNT: Ring all strategy
Volkan Oransoy
volkan at ni.net.tr
Tue Aug 20 14:22:58 CEST 2013
Hi Daniel,
Thank you for your reply, I am using version 4.0.2.
I have solved the ring all with this piece of code but I am not sure if this is the right way.
I keep members of ring group in avp_ring_groups table.
xlog("Ring Group config started");
avp_db_load("$ruri/username", "$avp(s:member)/avp_ring_groups");
avp_pushto("$ruri/username","$avp(s:member)/g");
lookup_branches("location");
t_relay();
exit;
Is this the right way for parallel fork?
Thank you
Volkan Oransoy | CTO
Netinternet Bilgisayar Telekomunikasyon San. ve Tic. Ltd. Sti.
Pamukkale Üniversitesi Teknoloji Geliştirme Bölgesi Denizli / TURKEY
Phone: +90 258 215 50 55 / Fax: +90 258 215 50 71
________________________________
Kimden: Daniel-Constantin Mierla [miconda at gmail.com] adına sr-users-bounces at lists.sip-router.org [sr-users-bounces at lists.sip-router.org]
Gönderildi: 20 Ağustos 2013 Salı 15:24
Kime: Kamailio (SER) - Users Mailing List
Konu: Re: [SR-Users] Ring all strategy
Hello,
what version of kamailio are you using? Older versions didn't support variables in append_branch() parameters.
You can use xlog() to print $ru before relaying, for troubleshooting reasons. Also, you can set debug=3 for more verbose output.
Cheers,
Daniel
On 8/18/13 10:59 AM, Volkan Oransoy wrote:
Hi all,
I am trying to add a ring all function to my kamailio system. When a user calls a two digit extension, system will load corresponding userlist to avp and fork them in parallel. But I tried tens of way to accomplish but no luck. Does anyone have any idea about my problem or a neat way to create a ring group?
Here is my config.
I added this right before lookup("location") directive. I succesfully capture two digits uris and send them to RING_GROUPS route.
if (uri=~"^sip:[1-9][0-9]{1}@") {
route(RING_GROUPS);
}
My RING_GROUPS route is like that:
route[RING_GROUPS] {
avp_db_load("$ruri","$avp(s:member)/avp_ring_groups");
while($avp(s:member)) {
append_branch("$avp(s:member)", "0.5");
avp_delete("$avp(s:member)");
}
t_load_contacts();
t_next_contacts();
t_on_failure("PARALLEL");
t_relay();
break;
}
failure_route["PARALLEL"]
{
if (!t_next_contacts()) {
exit;
}
t_on_failure("PARALLEL");
t_relay();
}
My avp_ring_groups table looks like this
+----+------+----------+--------------------+-----------+------+-----------------------------------+---------------------+
| id | uuid | username | domain | attribute | type | value | last_modified |
+----+------+----------+--------------------+-----------+------+-----------------------------------+---------------------+
| 1 | | 10 | netinternet.com.tr | member | 0 | sip:1001 at netinternet.com.tr | 2013-08-16 17:50:40 |
| 2 | | 10 | netinternet.com.tr | member | 0 | sip:1002 at netinternet.com.tr | 2013-08-17 23:51:38 |
+----+------+----------+--------------------+-----------+------+-----------------------------------+---------------------+
I got these error messages when I call 10 at netinternet.com.tr<mailto:10 at netinternet.com.tr> :
Aug 18 11:46:49 proxy /usr/local/sbin/kamailio[15736]: WARNING: <core> [rvalue.c:1012]: rval_get_int(): automatic string to int conversion for "sip:1002 at netinternet.com.tr"<sip:1002 at netinternet.com.tr> failed
Aug 18 11:46:49 proxy /usr/local/sbin/kamailio[15736]: WARNING: <core> [rvalue.c:1916]: rval_expr_eval_int(): rval expression conversion to int failed (794,22-794,22)
Aug 18 11:46:49 proxy /usr/local/sbin/kamailio[15736]: ERROR: tm [t_lookup.c:1347]: new_t(): ERROR: new_t: uri invalid
Aug 18 11:46:49 proxy /usr/local/sbin/kamailio[15736]: ERROR: tm [t_lookup.c:1494]: t_newtran(): ERROR: t_newtran: new_t failed
Aug 18 11:46:49 proxy /usr/local/sbin/kamailio[15736]: ERROR: pv [pv_core.c:307]: pv_get_ruri_attr(): failed to parse the R-URI
Volkan Oransoy | CTO
Netinternet Bilgisayar Telekomunikasyon San. ve Tic. Ltd. Sti.
Pamukkale Üniversitesi Teknoloji Geliştirme Bölgesi Denizli / TURKEY
Phone: +90 258 215 50 55 / Fax: +90 258 215 50 71
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users at lists.sip-router.org<mailto:sr-users at lists.sip-router.org>
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
--
Daniel-Constantin Mierla - http://www.asipto.com
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20130820/7a818ce1/attachment-0001.html>
More information about the sr-users
mailing list