- implement_default_route (u, node, NULL, agl_utils_new_stamp ());
+ /* we try to discover node routing group from the configuration, "Phone" for instance,
+ * see defaults in "config.c. Otherwise we just say NULL, a.k.a. default */
+ if (node->direction == agl_input) {
+ rtg = pa_hashmap_get (router->rtgroups.input, agl_node_type_str (node->type));
+ if (rtg)
+ implement_default_route (u, node, rtg->node, agl_utils_new_stamp ());
+ else
+ implement_default_route (u, node, NULL, agl_utils_new_stamp ());
+ } else {
+ rtg = pa_hashmap_get (router->rtgroups.output, agl_node_type_str (node->type));
+ if (rtg)
+ implement_default_route (u, rtg->node, node, agl_utils_new_stamp ());
+ else
+ implement_default_route (u, NULL, node, agl_utils_new_stamp ());
+ }