Hi

I'm using Kamailio 3.1.5 and want to fork calls to all members in the
same group defined in dbaliase. e.g. alias_username is 'clients' for 3
usernames: 'clientone', 'clienttwo', 'clientthree'.

If any of the 3 users are online, call to the alias_username 'clients'
looks fine: INVITE is forked to all online users etc.

But problem comes when none of the users are online: in this case,
t_relay will cause a server error 500, as server tries to relay to the
user on trunk, e.g. client...@domain.com, for which failed to find a
location entry and uri remaied client...@domain.com rather than an IP
address.

I expected server to send a 404 if non of the users for alias_username
'clients' is online. How should I fix it please?

Following is relevant parts from my config file:

#############################################################
route[LOCATION]
{
  if ( alias_db_lookup("dbaliases") )
  {
    t_on_branch("BRANCH_ALIASDB"); # in branch_route[BRANCH_ALIASDB],
                                   # call another route that looks up
location,
                                   # if not existent, call drop()

  }
  else
  {
    xlog("L_DBG","LOCATION: not alias - go to lookup location trunk\n");
    route(LOCATION_TRUNK); # normal look up location and sending of 404 etc
  }

... ...
}
#############################################################
branch_route[BRANCH_ALIASDB]
{
  xlog("L_DBG", "BRANCH_ALIASDB: $fU@$fd -> $rU@$rd; Method:$rm\n");
  route(LOCATION_BRANCH);
}

route[LOCATION_BRANCH]
{
  if (!lookup("location"))
  {
    # Drop this branch - it's going nowhere
    drop();
  }
}
#############################################################
route[RELAY] {
  xlog("L_DBG","RELAY: method=$rm, callid=$ci, cseq=$cs\n");


#!ifdef WITH_NAT
  if (check_route_param("nat=yes")) {
    setbflag(FLB_NATB);
  }
  if (isflagset(FLT_NATS) || isbflagset(FLB_NATB)) {
    xlog("L_DBG", "RELAY: about to call RTPPROXY\n");
    route(RTPPROXY);
  }
#!endif

  /* example how to enable some additional event routes */
  if (is_method("INVITE")) {
    t_on_reply("REPLY_ONE");
    t_on_failure("FAIL_ONE");
  }

  if (!t_relay()) {
    sl_reply_error();
  }

  exit;
}

#############################################################
And in the main route, route LOCATION and RELAY are the last two routes:
route {
...

  # user location service
  route(LOCATION);

  route(RELAY);
}

Thanks very much!

Yufei
--
Yufei Tao
Red Embedded

This E-mail and any attachments hereto are strictly confidential and intended 
solely for the addressee. If you are not the intended addressee please notify 
the sender by return and delete the message.

You must not disclose, forward or copy this E-mail or attachments to any third 
party without the prior consent of the sender.

Red Embedded Design, Company Number 06688253 Registered in England: The 
Waterfront, Salts Mill Rd, Saltaire, BD17 7EZ

_______________________________________________
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

Reply via email to