|
@@ -266,7 +266,7 @@ route{
|
|
|
}
|
|
|
|
|
|
# NAT detection
|
|
|
- route(4);
|
|
|
+ route(NAT);
|
|
|
|
|
|
if (has_totag()) {
|
|
|
# sequential request withing a dialog should
|
|
@@ -280,7 +280,7 @@ route{
|
|
|
} else {
|
|
|
if (is_method("SUBSCRIBE") && uri == myself) {
|
|
|
# in-dialog subscribe requests
|
|
|
- route(2);
|
|
|
+ route(PRESENCE);
|
|
|
exit;
|
|
|
}
|
|
|
if ( is_method("ACK") ) {
|
|
@@ -311,7 +311,7 @@ route{
|
|
|
t_check_trans();
|
|
|
|
|
|
# authentication
|
|
|
- route(3);
|
|
|
+ route(AUTH);
|
|
|
|
|
|
# record routing for dialog forming requests (in case they are routed)
|
|
|
if (is_method("INVITE|SUBSCRIBE"))
|
|
@@ -334,13 +334,13 @@ route{
|
|
|
## t_relay("tls:domain2.net");
|
|
|
## exit;
|
|
|
##}
|
|
|
- route(1);
|
|
|
+ route(RELAY);
|
|
|
}
|
|
|
|
|
|
# requests for my domain
|
|
|
|
|
|
if( is_method("PUBLISH|SUBSCRIBE"))
|
|
|
- route(2);
|
|
|
+ route(PRESENCE);
|
|
|
|
|
|
if (is_method("REGISTER"))
|
|
|
{
|
|
@@ -375,23 +375,23 @@ route{
|
|
|
# when routing via usrloc, log the missed calls also
|
|
|
setflag(2);
|
|
|
|
|
|
- route(1);
|
|
|
+ route(RELAY);
|
|
|
}
|
|
|
|
|
|
|
|
|
-route[1] {
|
|
|
+route[RELAY] {
|
|
|
#n# if (check_route_param("nat=yes")) {
|
|
|
#n# setbflag(6);
|
|
|
#n# }
|
|
|
#n# if (isflagset(5) || isbflagset(6)) {
|
|
|
-#n# route(5);
|
|
|
+#n# route(RTPPROXY);
|
|
|
#n# }
|
|
|
|
|
|
/* example how to enable some additional event routes */
|
|
|
if (is_method("INVITE")) {
|
|
|
- #t_on_branch("1");
|
|
|
- t_on_reply("1");
|
|
|
- t_on_failure("1");
|
|
|
+ #t_on_branch("BRANCH_ONE");
|
|
|
+ t_on_reply("REPLY_ONE");
|
|
|
+ t_on_failure("FAIL_ONE");
|
|
|
}
|
|
|
|
|
|
if (!t_relay()) {
|
|
@@ -403,7 +403,7 @@ route[1] {
|
|
|
|
|
|
# Presence route
|
|
|
/* uncomment the whole following route for enabling presence server */
|
|
|
-route[2]
|
|
|
+route[PRESENCE]
|
|
|
{
|
|
|
#p# if (!t_newtran())
|
|
|
#p# {
|
|
@@ -435,7 +435,7 @@ route[2]
|
|
|
|
|
|
# Authentication route
|
|
|
/* uncomment the whole following route for enabling authentication */
|
|
|
-route[3] {
|
|
|
+route[AUTH] {
|
|
|
#a# if (is_method("REGISTER"))
|
|
|
#a# {
|
|
|
#a# # authenticate the REGISTER requests (uncomment to enable auth)
|
|
@@ -480,7 +480,7 @@ route[3] {
|
|
|
|
|
|
# Caller NAT detection route
|
|
|
/* uncomment the whole following route for enabling Caller NAT Detection */
|
|
|
-route[4]{
|
|
|
+route[NAT]{
|
|
|
#n# force_rport();
|
|
|
#n# if (nat_uac_test("19")) {
|
|
|
#n# if (method=="REGISTER") {
|
|
@@ -495,7 +495,7 @@ route[4]{
|
|
|
|
|
|
# RTPProxy control
|
|
|
/* uncomment the whole following route for enabling RTPProxy Control */
|
|
|
-route[5] {
|
|
|
+route[RTPPROXY] {
|
|
|
#n# if (is_method("BYE")) {
|
|
|
#n# unforce_rtp_proxy();
|
|
|
#n# } else if (is_method("INVITE")){
|
|
@@ -505,12 +505,12 @@ route[5] {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
-branch_route[1] {
|
|
|
+branch_route[BRANCH_ONE] {
|
|
|
xdbg("new branch at $ru\n");
|
|
|
}
|
|
|
|
|
|
|
|
|
-onreply_route[1] {
|
|
|
+onreply_route[REPLY_ONE] {
|
|
|
xdbg("incoming reply\n");
|
|
|
|
|
|
#n# if ((isflagset(5) || isbflagset(6)) && status=~"(183)|(2[0-9][0-9])") {
|
|
@@ -522,7 +522,7 @@ onreply_route[1] {
|
|
|
}
|
|
|
|
|
|
|
|
|
-failure_route[1] {
|
|
|
+failure_route[FAIL_ONE] {
|
|
|
#n# if (is_method("INVITE")
|
|
|
#n# && (isbflagset(6) || isflagset(5))) {
|
|
|
#n# unforce_rtp_proxy();
|