Hello;

Results are here. Once i tried carrierroute config with kamailio V4.1.9 and it works. here version is kamailio 5.0.0-dev10 . it is started with "kamailio -dd -E"


[root@Test  master]# kamcmd cr.reload_routes
[root@Test  master]# kamcmd cr.dump_routes
error: 500 - Internal error - carrier structure
[root@Test  master]#
[root@Test  master]#
[root@Test  master]# kamctl rpc cr.dump_routes
{"jsonrpc":"2.0","result":{"routes":[{"carrier":,"id":1,"domains":[{"domain":,"id":1,"data":["      NULL: 100.000 %, 'ip:5060': ON, '0', '', '', '338'"]}]}]},"id":9684}


here is log


[root@TestDispatcher master]# 10(9666) INFO: carrierroute [cr_db.c:315]: load_route_data_db(): carrier 'default' (id 1) has 1 domains
10(9666) INFO: carrierroute [cr_data.c:456]: add_route(): adding prefix , prob 1.000000
10(9666) INFO: carrierroute [cr_carrier.c:98]: add_domain_data(): adding domain 1 'mydomainip' to carrier 1 'default'10(9666) INFO: carrierroute [cr_data.c:412]: get_domain_data_or_add(): added domain 1 'mydomainip' to carrier 1 'default'10(9666) INFO: carrierroute [cr_data.c:468]: add_route(): found carrier and domain, now adding route
10(9666) INFO: carrierroute [cr_rule.c:118]: add_route_rule(): no backed up rules
10(9666) INFO: carrierroute [cr_data.c:653]: rule_fixup(): fixing tree mydomainip
10(9666) INFO: carrierroute [cr_data.c:613]: rule_fixup_recursor(): hashless rule with host ip:5060 hash, hash_index 1
10(9666) ERROR: ctl [binrpc_run.c:1112]: rpc_struct_add(): failed to add attribute-value
10(9666) ERROR: carrierroute [cr_fifo.c:1192]: cr_rpc_dump_routes(): add carrier structure failure at count 0


In addition , I tried to modify code like this  and it didnt work either. it gives same error.


                    if(rpc->struct_add(dh, "Sd[", "carrier", "at",
                                                "id", "123",
                                                "domains",  &eh)<0) {
                                LM_ERR("add carrier structure failure at count %d\n", i);
                                rpc->fault(ctx, 500, "Internal error - carrier structure");
                                goto error;
                        }


5.01.2017 00:39 tarihinde Daniel-Constantin Mierla yazdı:
kamctl rpc cr.dump_routes

--