Hi all folks, Hello people, I'm new and I've been reading, so I have some but not much knowledge.
I must integrate as work, two asterisk to the kamailio, a month ago I started with the real time guide [1] with only one kamailio, register, start the call, etc.. I am with the basics and it works.
Now I must put two asterisk and using dispatcher, but although I read the documentation of the module.. use it and so then configure a list of file (with the asterisk where to dispatch) and not in the database..
MY HELP REQUEST QUESTION: How do I use dispatcher in load balancing mode, but taking in consideration my already working realtime-asterisk worling setup?
THE PROBLEM: since with what I did it simply sends the call to both asterisk. i setup only 4 easy steps.. load module, then setup params (where i set the asterisk lists by file, and not db) and then added a "ds_select_dst(1, 4);" before the "route(RELAY);" line. please help!
as i know.. the ds_select_dst(1, 4); prepare wicht asterisk will be choose to use and then when the routing RELAY happends no cares if in the realtime previously guide are a main asterisk? right?
NOTE: I know it's a big world... but I can't keep reading the kamailio theory, i must goon forward due i have to lear later once are property working..
[1] https://kb.asipto.com/asterisk:realtime:kamailio-4.0.x-asterisk-11.3.0-astdb
the problem with Aserisk realtime and the kamailio dispatcher integration, are the string ip comparitions. The guide points out two important routines, which are FROMASTERISK and TOASTERISK, in these it is verified if the request acts from asterisk, or goes to asterisk. But are another routine that are also important, es la REGFWD
I was able to adjust these routines (mediocre, because I only check if it comes from one of the asterisks on the list and not the one in question), but in the REGFWD rules, the code are bit confusing..
i made this:
1) follow the normal guideliness ... enable the module by addiding the loadmodule "dispatcher.so" and later specify source list/db by modparam("dispatcher", "list_file", "/etc/kamailio/dispatcher.list") etc etc .. and adde a rule "route[DISPATCH]" of course. .. 2) later i sustitute the rutines of FROMASTERISK and TOASTERISK by that code:
route[FROMASTERISK] { if(ds_is_from_list()){ return 1; } return -1; } route[TOASTERISK] { ds_mark_dst("P"); if(!ds_select_dst("1", "2")) { # i have only 2 sterisk in list sl_send_reply("500", "Service Unavailable"); exit; } route(RELAY); exit; }
And that'sall.. but:
NOTE. the code on TOASTERISK exit if service are unavailable,, i have doubs about that, due i assume that if does not return (noted the "!" in the contidional) from the list.. there's no way to deliver to a asterisk.. so exit,cos i not have enought xpertise to propety code a subrutine that waiths to an asterisk to be available!
HERE THE LAST PROBLEM:
taken from the asterisk realtime guide, just almost at the lasted lines of the kamailio.cfg this is the code part that i cannot or i does not have enoought knowledge to translate that rules to the dispatcher ruling.. there are the code:
route[REGFWD] { if(!is_method("REGISTER")) { return; } $var(rip) = $sel(cfg_get.asterisk.bindip); $uac_req(method)="REGISTER"; $uac_req(ruri)="sip:" + $var(rip) + ":" + $sel(cfg_get.asterisk.bindport); $uac_req(furi)="sip:" + $au + "@" + $var(rip); $uac_req(turi)="sip:" + $au + "@" + $var(rip); $uac_req(hdrs)="Contact: <sip:" + $au + "@" + $sel(cfg_get.kamailio.bindip) + ":" + $sel(cfg_get.kamailio.bindport) + ">\r\n"; if($sel(contact.expires) != $null) $uac_req(hdrs)= $uac_req(hdrs) + "Expires: " + $sel(contact.expires) + "\r\n"; else $uac_req(hdrs)= $uac_req(hdrs) + "Expires: " + $hdr(Expires) + "\r\n"; uac_req_send(); }
2020-04-22 19:59 GMT-04:00, ospos web osposweb@gmail.com:
Hi all folks, Hello people, I'm new and I've been reading, so I have some but not much knowledge.
I must integrate as work, two asterisk to the kamailio, a month ago I started with the real time guide [1] with only one kamailio, register, start the call, etc.. I am with the basics and it works.
Now I must put two asterisk and using dispatcher, but although I read the documentation of the module.. use it and so then configure a list of file (with the asterisk where to dispatch) and not in the database..
MY HELP REQUEST QUESTION: How do I use dispatcher in load balancing mode, but taking in consideration my already working realtime-asterisk worling setup?
THE PROBLEM: since with what I did it simply sends the call to both asterisk. i setup only 4 easy steps.. load module, then setup params (where i set the asterisk lists by file, and not db) and then added a "ds_select_dst(1, 4);" before the "route(RELAY);" line. please help!
as i know.. the ds_select_dst(1, 4); prepare wicht asterisk will be choose to use and then when the routing RELAY happends no cares if in the realtime previously guide are a main asterisk? right?
NOTE: I know it's a big world... but I can't keep reading the kamailio theory, i must goon forward due i have to lear later once are property working..
[1] https://kb.asipto.com/asterisk:realtime:kamailio-4.0.x-asterisk-11.3.0-astdb
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
On Sun, May 3, 2020 at 3:17 PM PICCORO McKAY Lenz mckaygerhard@gmail.com wrote:
are the string ip comparitions. The guide points out two important routines, which are FROMASTERISK and TOASTERISK, in these it is verified if the request acts from asterisk, or goes to asterisk. But are another routine that are also important, es la REGFWD
many many thans! now it worked at leas some call are making in some asterisk.. but as you pointed here seems nobody wants to help us with the route[REGFWD} also i am a novice in this SIP world.. can anybody help me? PLEASE!
HERE THE LAST PROBLEM:
taken from the asterisk realtime guide, just almost at the lasted lines of the kamailio.cfg this is the code part that i cannot or i does not have enoought knowledge to translate that rules to the dispatcher ruling.. there are the code:
route[REGFWD] { if(!is_method("REGISTER")) { return; } $var(rip) = $sel(cfg_get.asterisk.bindip); $uac_req(method)="REGISTER"; $uac_req(ruri)="sip:" + $var(rip) + ":" + $sel(cfg_get.asterisk.bindport); $uac_req(furi)="sip:" + $au + "@" + $var(rip); $uac_req(turi)="sip:" + $au + "@" + $var(rip); $uac_req(hdrs)="Contact: <sip:" + $au + "@" + $sel(cfg_get.kamailio.bindip) + ":" + $sel(cfg_get.kamailio.bindport) + ">\r\n"; if($sel(contact.expires) != $null) $uac_req(hdrs)= $uac_req(hdrs) + "Expires: " + $sel(contact.expires) + "\r\n"; else $uac_req(hdrs)= $uac_req(hdrs) + "Expires: " + $hdr(Expires) + "\r\n"; uac_req_send(); }
2020-04-22 19:59 GMT-04:00, ospos web osposweb@gmail.com:
Hi all folks, Hello people, I'm new and I've been reading, so I have some but not much knowledge.
I must integrate as work, two asterisk to the kamailio, a month ago I started with the real time guide [1] with only one kamailio, register, start the call, etc.. I am with the basics and it works.
Now I must put two asterisk and using dispatcher, but although I read the documentation of the module.. use it and so then configure a list of file (with the asterisk where to dispatch) and not in the database..
MY HELP REQUEST QUESTION: How do I use dispatcher in load balancing mode, but taking in consideration my already working realtime-asterisk worling setup?
THE PROBLEM: since with what I did it simply sends the call to both asterisk. i setup only 4 easy steps.. load module, then setup params (where i set the asterisk lists by file, and not db) and then added a "ds_select_dst(1, 4);" before the "route(RELAY);" line. please help!
as i know.. the ds_select_dst(1, 4); prepare wicht asterisk will be choose to use and then when the routing RELAY happends no cares if in the realtime previously guide are a main asterisk? right?
NOTE: I know it's a big world... but I can't keep reading the kamailio theory, i must goon forward due i have to lear later once are property working..
[1] https://kb.asipto.com/asterisk:realtime:kamailio-4.0.x-asterisk-11.3.0-astdb
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
-- Lenz McKAY Gerardo (PICCORO) http://qgqlochekone.blogspot.com
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Hi,
the learning curve in sipproxies is really hard cos you have to understand the basics of sip. It's nothing you can do in a day. I learn every day and I am sure that I not understand everything.
You could hire one of the business professionals on Kamailio to help you
https://www.kamailio.org/w/business-directory/
There you find many great people that can help you for some money.
Cheers Karsten
ospos web osposweb@gmail.com schrieb am Di., 5. Mai 2020, 01:17:
On Sun, May 3, 2020 at 3:17 PM PICCORO McKAY Lenz mckaygerhard@gmail.com wrote:
are the string ip comparitions. The guide points out two important
routines,
which are FROMASTERISK and TOASTERISK, in these it is verified if the request acts from asterisk, or goes to asterisk. But are another routine that are also important, es la REGFWD
many many thans! now it worked at leas some call are making in some asterisk.. but as you pointed here seems nobody wants to help us with the route[REGFWD} also i am a novice in this SIP world.. can anybody help me? PLEASE!
HERE THE LAST PROBLEM:
taken from the asterisk realtime guide, just almost at the lasted lines of the kamailio.cfg this is the code part that i cannot or i does not have enoought knowledge to translate that rules to the dispatcher ruling.. there are the code:
route[REGFWD] { if(!is_method("REGISTER")) { return; } $var(rip) = $sel(cfg_get.asterisk.bindip); $uac_req(method)="REGISTER"; $uac_req(ruri)="sip:" + $var(rip) + ":" +
$sel(cfg_get.asterisk.bindport);
$uac_req(furi)="sip:" + $au + "@" + $var(rip); $uac_req(turi)="sip:" + $au + "@" + $var(rip); $uac_req(hdrs)="Contact: <sip:" + $au + "@" + $sel(cfg_get.kamailio.bindip) + ":" + $sel(cfg_get.kamailio.bindport)
- ">\r\n";
if($sel(contact.expires) != $null) $uac_req(hdrs)= $uac_req(hdrs) + "Expires: " +
$sel(contact.expires) + "\r\n";
else $uac_req(hdrs)= $uac_req(hdrs) + "Expires: " +
$hdr(Expires) + "\r\n";
uac_req_send();
}
2020-04-22 19:59 GMT-04:00, ospos web osposweb@gmail.com:
Hi all folks, Hello people, I'm new and I've been reading, so I have some but not much knowledge.
I must integrate as work, two asterisk to the kamailio, a month ago I started with the real time guide [1] with only one kamailio, register, start the call, etc.. I am with the basics and it works.
Now I must put two asterisk and using dispatcher, but although I read the documentation of the module.. use it and so then configure a list of file (with the asterisk where to dispatch) and not in the database..
MY HELP REQUEST QUESTION: How do I use dispatcher in load balancing mode, but taking in consideration my already working realtime-asterisk worling setup?
THE PROBLEM: since with what I did it simply sends the call to both asterisk. i setup only 4 easy steps.. load module, then setup params (where i set the asterisk lists by file, and not db) and then added a "ds_select_dst(1, 4);" before the "route(RELAY);" line. please help!
as i know.. the ds_select_dst(1, 4); prepare wicht asterisk will be choose to use and then when the routing RELAY happends no cares if in the realtime previously guide are a main asterisk? right?
NOTE: I know it's a big world... but I can't keep reading the kamailio theory, i must goon forward due i have to lear later once are property working..
[1]
https://kb.asipto.com/asterisk:realtime:kamailio-4.0.x-asterisk-11.3.0-astdb
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
-- Lenz McKAY Gerardo (PICCORO) http://qgqlochekone.blogspot.com
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
-- www.osposweb.com
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
2020-05-05 2:40 GMT-04:00, Karsten Horsmann khorsmann@gmail.com:
the learning curve in sipproxies is really hard cos you have to understand the basics of sip. It's nothing you can do in a day. I learn every day and I am sure that I not understand everything.
umm ok but i only need a VERY SPECIFIC THING i already asked! route[REGFWD} are the only thing i need to complete the coding of the kamailio+asterisk real-time dispatcher case
You could hire one of the business professionals on Kamailio to help you
https://www.kamailio.org/w/business-directory/
There you find many great people that can help you for some money.
Umm seems we can paste a propagande here with total free!
Cheers Karsten
ospos web osposweb@gmail.com schrieb am Di., 5. Mai 2020, 01:17:
On Sun, May 3, 2020 at 3:17 PM PICCORO McKAY Lenz mckaygerhard@gmail.com wrote:
are the string ip comparitions. The guide points out two important
routines,
which are FROMASTERISK and TOASTERISK, in these it is verified if the request acts from asterisk, or goes to asterisk. But are another routine that are also important, es la REGFWD
many many thans! now it worked at leas some call are making in some asterisk.. but as you pointed here seems nobody wants to help us with the route[REGFWD} also i am a novice in this SIP world.. can anybody help me? PLEASE!
HERE THE LAST PROBLEM:
taken from the asterisk realtime guide, just almost at the lasted lines of the kamailio.cfg this is the code part that i cannot or i does not have enoought knowledge to translate that rules to the dispatcher ruling.. there are the code:
route[REGFWD] { if(!is_method("REGISTER")) { return; } $var(rip) = $sel(cfg_get.asterisk.bindip); $uac_req(method)="REGISTER"; $uac_req(ruri)="sip:" + $var(rip) + ":" +
$sel(cfg_get.asterisk.bindport);
$uac_req(furi)="sip:" + $au + "@" + $var(rip); $uac_req(turi)="sip:" + $au + "@" + $var(rip); $uac_req(hdrs)="Contact: <sip:" + $au + "@" + $sel(cfg_get.kamailio.bindip) + ":" + $sel(cfg_get.kamailio.bindport)
- ">\r\n";
if($sel(contact.expires) != $null) $uac_req(hdrs)= $uac_req(hdrs) + "Expires: " +
$sel(contact.expires) + "\r\n";
else $uac_req(hdrs)= $uac_req(hdrs) + "Expires: " +
$hdr(Expires) + "\r\n";
uac_req_send();
}
2020-04-22 19:59 GMT-04:00, ospos web osposweb@gmail.com:
Hi all folks, Hello people, I'm new and I've been reading, so I have some but not much knowledge.
I must integrate as work, two asterisk to the kamailio, a month ago I started with the real time guide [1] with only one kamailio, register, start the call, etc.. I am with the basics and it works.
Now I must put two asterisk and using dispatcher, but although I read the documentation of the module.. use it and so then configure a list of file (with the asterisk where to dispatch) and not in the database..
MY HELP REQUEST QUESTION: How do I use dispatcher in load balancing mode, but taking in consideration my already working realtime-asterisk worling setup?
THE PROBLEM: since with what I did it simply sends the call to both asterisk. i setup only 4 easy steps.. load module, then setup params (where i set the asterisk lists by file, and not db) and then added a "ds_select_dst(1, 4);" before the "route(RELAY);" line. please help!
as i know.. the ds_select_dst(1, 4); prepare wicht asterisk will be choose to use and then when the routing RELAY happends no cares if in the realtime previously guide are a main asterisk? right?
NOTE: I know it's a big world... but I can't keep reading the kamailio theory, i must goon forward due i have to lear later once are property working..
[1]
https://kb.asipto.com/asterisk:realtime:kamailio-4.0.x-asterisk-11.3.0-astdb
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
-- Lenz McKAY Gerardo (PICCORO) http://qgqlochekone.blogspot.com
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
-- www.osposweb.com
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Hi,
then you want to send the register message to all members of the dispatcher group? So the registrations are equal to all of them at the same time?
Cheers Karsten
PICCORO McKAY Lenz mckaygerhard@gmail.com schrieb am Do., 7. Mai 2020, 23:04:
2020-05-05 2:40 GMT-04:00, Karsten Horsmann khorsmann@gmail.com:
the learning curve in sipproxies is really hard cos you have to
understand
the basics of sip. It's nothing you can do in a day. I learn every day
and
I am sure that I not understand everything.
umm ok but i only need a VERY SPECIFIC THING i already asked! route[REGFWD} are the only thing i need to complete the coding of the kamailio+asterisk real-time dispatcher case
You could hire one of the business professionals on Kamailio to help you
https://www.kamailio.org/w/business-directory/
There you find many great people that can help you for some money.
Umm seems we can paste a propagande here with total free!
Cheers Karsten
ospos web osposweb@gmail.com schrieb am Di., 5. Mai 2020, 01:17:
On Sun, May 3, 2020 at 3:17 PM PICCORO McKAY Lenz mckaygerhard@gmail.com wrote:
are the string ip comparitions. The guide points out two important
routines,
which are FROMASTERISK and TOASTERISK, in these it is verified if the request acts from asterisk, or goes to asterisk. But are another routine that are also important, es la REGFWD
many many thans! now it worked at leas some call are making in some asterisk.. but as you pointed here seems nobody wants to help us with the route[REGFWD} also i am a novice in this SIP world.. can anybody help me? PLEASE!
HERE THE LAST PROBLEM:
taken from the asterisk realtime guide, just almost at the lasted lines of the kamailio.cfg this is the code part that i cannot or i does not have enoought knowledge to translate that rules to the dispatcher ruling.. there are the code:
route[REGFWD] { if(!is_method("REGISTER")) { return; } $var(rip) = $sel(cfg_get.asterisk.bindip); $uac_req(method)="REGISTER"; $uac_req(ruri)="sip:" + $var(rip) + ":" +
$sel(cfg_get.asterisk.bindport);
$uac_req(furi)="sip:" + $au + "@" + $var(rip); $uac_req(turi)="sip:" + $au + "@" + $var(rip); $uac_req(hdrs)="Contact: <sip:" + $au + "@" + $sel(cfg_get.kamailio.bindip) + ":" +
$sel(cfg_get.kamailio.bindport)
- ">\r\n";
if($sel(contact.expires) != $null) $uac_req(hdrs)= $uac_req(hdrs) + "Expires: " +
$sel(contact.expires) + "\r\n";
else $uac_req(hdrs)= $uac_req(hdrs) + "Expires: " +
$hdr(Expires) + "\r\n";
uac_req_send();
}
2020-04-22 19:59 GMT-04:00, ospos web osposweb@gmail.com:
Hi all folks, Hello people, I'm new and I've been reading, so I have some but not much knowledge.
I must integrate as work, two asterisk to the kamailio, a month ago
I
started with the real time guide [1] with only one kamailio, register, start the call, etc.. I am with the basics and it works.
Now I must put two asterisk and using dispatcher, but although I
read
the documentation of the module.. use it and so then configure a
list
of file (with the asterisk where to dispatch) and not in the database..
MY HELP REQUEST QUESTION: How do I use dispatcher in load balancing mode, but taking in consideration my already working realtime-asterisk worling setup?
THE PROBLEM: since with what I did it simply sends the call to both asterisk. i setup only 4 easy steps.. load module, then setup params (where i set the asterisk lists by file, and not db) and then added
a
"ds_select_dst(1, 4);" before the "route(RELAY);" line. please help!
as i know.. the ds_select_dst(1, 4); prepare wicht asterisk will be choose to use and then when the routing RELAY happends no cares if
in
the realtime previously guide are a main asterisk? right?
NOTE: I know it's a big world... but I can't keep reading the kamailio theory, i must goon forward due i have to lear later once are property working..
[1]
https://kb.asipto.com/asterisk:realtime:kamailio-4.0.x-asterisk-11.3.0-astdb
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
-- Lenz McKAY Gerardo (PICCORO) http://qgqlochekone.blogspot.com
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
-- www.osposweb.com
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
-- Lenz McKAY Gerardo (PICCORO) http://qgqlochekone.blogspot.com
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users