[SR-Users] AliasDB module & Forking
Daniel-Constantin Mierla
miconda at gmail.com
Mon Nov 3 11:45:09 CET 2014
Hello,
On 03/11/14 10:26, Marino Mileti wrote:
> Hi guys,
>
> i've implemented a parallel forking using aliasdb module. Everything is
> working good if the first client (first row in dbaliases table) in online.
> When I try to make a call to a specific number three clients rings together.
>
> If the first client isn't online no call is forwarded to other clients :( I
> know that with alias_db_lookup() the first record from DB is the new R-URI
> and the others are added like branches. But if the R-URI in unreachable how
> can try to call the other branches?
>
> This is location script..
>
> if(alias_db_lookup("dbaliases")){
> $sht(a=>$ci) = $sel(contact.uri);
> }
> $avp(oexten) = $rU;
> if (!lookup("location")) {
> $var(rc) = $rc;
> t_newtran();
> switch ($var(rc)) {
> case -1:
> xlog("L_INFO","No contact found\n");
> exit;
> case -3:
> send_reply("404", "Erorr");
> exit;
> case -2:
> send_reply("405", "Method Not Allowed");
> exit;
> }
> }
>
> Any suggest?
> My script still log "No contanct found" until timeout :(
all the branches are forwarded, but probably they are discarded as the
additional ones are looped back. Check your config and be sure you allow
traffic from "scr_ip==mysqlf" without authentication.
The alternative is to use lookup_branches() instead of lookup() -- see
the readme of registrar module.
Cheers,
Daniel
--
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio Advanced Training, Nov 24-27, Berlin - http://www.asipto.com
More information about the sr-users
mailing list