Hello. Have a following task. Select carrier by carrierroute module from db, try to route (dial, relay, bridge - you name it) call there and if call is failed/rejected due to any reason, go to failure_route(?), perform carrierroute lookup again for another carrier and route call there. Main problem is that different carriers require different From/To format. And Kamailio don't allow to use uac* functions in failure_route. How to resolve this? Maybe entire routing method is wrong for my task? Any advice? -- sent from myMail for Android
hello, i route it another request route, for example. In addition, i remember that there is only once can change from header or uac module breaks from header. check headers please.
failroute{ route(changecli) route(outcarrierroute) route(relay) }
route[changecli] { .... return }
route[outcarrierroute]{ .... return }
route[RELAY]{
}
-- Sent from: http://sip-router.1086192.n5.nabble.com/Users-f3.html
A trick to jump out of first failure route after first call attempt works, and now Kami permits to use uac* functions. But they don't work. From/To remains unchanged on second call.
01.09.2017 8:59, ycaner пишет:
hello, i route it another request route, for example. In addition, i remember that there is only once can change from header or uac module breaks from header. check headers please.
failroute{ route(changecli) route(outcarrierroute) route(relay) }
route[changecli] { .... return }
route[outcarrierroute]{ .... return }
route[RELAY]{
}
-- Sent from: http://sip-router.1086192.n5.nabble.com/Users-f3.html
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Finally I've found dirty hack for that:
remove_hf("From"); insert_hf("From: sip:$fU@my_ip;tag=$fti\r\n");
instead of uac_replace_from()? and similiar for To.
So weird that such a simple option requires such hacks and can't be done using standard tools (or I've just overlooked them).
01.09.2017 8:59, ycaner пишет:
hello, i route it another request route, for example. In addition, i remember that there is only once can change from header or uac module breaks from header. check headers please.
failroute{ route(changecli) route(outcarrierroute) route(relay) }
route[changecli] { .... return }
route[outcarrierroute]{ .... return }
route[RELAY]{
}
-- Sent from: http://sip-router.1086192.n5.nabble.com/Users-f3.html
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users