modparam("tm", "contacts_avp", "tm_contacts");
route {
seturi("sip:a@example.com");
append_branch("sip:b@example.com", "0.5");
append_branch("sip:c@example.com", "0.5");
append_branch("sip:d@example.com", "1.0");
t_load_contacts();
t_next_contacts();
t_on_failure("serial");
t_relay();
break;
}
failure_route["serial"]
{
if (!t_next_contacts()) {
exit;
}
t_on_failure("serial");
t_relay();
}
failure_route[GroupFailureRoute]{
t_next_contacts();
while(!route(GROUP_LOCATION))
{
if (!t_next_contacts()) {
send_reply("408","Nobody available");
exit;
}
}
t_on_failure("GroupFailureRoute");
t_relay();
}
route[GROUP_RELAY_SER]{
append_branch("sip:9919995@192.168.1.41","1");
append_branch("sip:9919992@192.168.1.41", "0.21");
append_branch("sip:9919997@192.168.1.41", "0.22");
append_branch("sip:9919991@192.168.1.41", "0.22");
t_load_contacts();
t_next_contacts();
while(!route(GROUP_LOCATION))
{
if (!t_next_contacts()) {
send_reply("408","Timeout or nobody available");
exit;
}
}
t_on_failure("GroupFailureRoute");
t_relay();
break;
}
public2_addr 192.168.1.41 192.168.1.24 192.168.1.10
──────────┬───────── ──────────┬───────── ──────────┬───────── ──────────┬─────────
│ INV (192.168.1.41) │ |
│ audio 39776 (g711u) │ |
│ ─────────────────────────────── ──────────────> │
│ INV (192.168.1.41) │ │
│─┐ audio 39776 (g711u) │ │
│<┘ │ │
│─┐ 407 Proxy Authentication R│ │
│<┘ │ │
│ CANCEL │ │
│ ─────────────────────> │ │
│─┐ ACK │ │
│<┘ │ │
│ 487 Request Terminated │ │
│ <────────────────────── │ │
│ ACK │ │
│ ─────────────────────> │ │
│ 200 OK │ │
│ <───────────────────── │ │
│ 100 Trying │
│ <────────────────────────────────────────────── │
│ 180 Ringing │
│ <─────────────────────────────────────────── ── │
│ 180 Ringing │ │ │
│ <─────────────────── │ │ │