Browse Source

Updated example configurations for IMS:
- use NAPTR query (comment from Franz Edler & Andrea Meroni on sr-users)
- Rx (P-CSCF) is now asynchronous

Carsten Bock 11 years ago
parent
commit
94d5ace90a
3 changed files with 25 additions and 5 deletions
  1. 2 0
      examples/icscf/kamailio.cfg
  2. 20 4
      examples/pcscf/kamailio.cfg
  3. 3 1
      examples/scscf/kamailio.cfg

+ 2 - 0
examples/icscf/kamailio.cfg

@@ -59,6 +59,8 @@ auto_aliases=no
 dns_srv_lb=yes
 # Always: Also try IPv6:
 dns_try_ipv6=yes
+# Query NAPTR-Records as well:
+dns_try_naptr=yes
 
 #!ifdef WITH_XMLRPC
 #!ifndef WITH_TCP

+ 20 - 4
examples/pcscf/kamailio.cfg

@@ -59,6 +59,8 @@ shm_force_alloc=yes
 dns_srv_lb=yes
 # Always: Also try IPv6:
 dns_try_ipv6=yes
+# Query NAPTR-Records as well:
+dns_try_naptr=yes
 
 /* uncomment and configure the following line if you want Kamailio to 
    bind on a specific interface/port/proto (default bind on all available) */
@@ -762,7 +764,11 @@ route[RTPPROXY_TERM] {
 route[REGISTER] {
 #!ifdef WITH_RX	
 	xlog("L_DBG","Subscribing to signalling bearer status\n");
-	Rx_AAR_Register("location");
+	if (Rx_AAR_Register("REG_AAR_REPLY, "location") == 0)
+		exit;
+}
+
+route[REG_AAR_REPLY] {
 	switch ($avp(s:aar_return_code)) {
 		case 1:
 			xlog("L_DBG", "Diameter: AAR success on subscription to signalling\n");
@@ -883,7 +889,12 @@ route[Orig_Initial]
 
 #!ifdef WITH_RX
 	xlog("L_DBG","Diameter: Orig authorizing media via Rx\n");	
-	Rx_AAR("location");
+	if(Rx_AAR("ORIG_SESSION_AAR_REPLY","orig")==0){
+		exit;
+	}
+}
+
+route[ORIG_SESSION_AAR_REPLY] {
 	if ($avp(s:aar_return_code) != 1) {
 		xlog("L_ERR", "Diameter: AAR failed\n");
 		send_reply("403", "QoS not authorized");
@@ -1075,8 +1086,13 @@ route[Term_Initial]
 	t_on_failure("Term_Initial_failure");
 
 #!ifdef WITH_RX
-	xlog("L_DBG","Diameter: Orig authorizing media via Rx\n");	
-	Rx_AAR("location");
+	xlog("L_DBG","Diameter: Term authorizing media via Rx\n");	
+	if(Rx_AAR("TERM_SESSION_AAR_REPLY","orig")==0){
+		exit;
+	}
+}
+
+route[TERM_SESSION_AAR_REPLY] {
 	if ($avp(s:aar_return_code) != 1) {
 		xlog("L_ERR", "Diameter: AAR failed\n");
 		send_reply("403", "QoS not authorized");

+ 3 - 1
examples/scscf/kamailio.cfg

@@ -70,8 +70,10 @@ rev_dns=no      # (cmd. line: -R)
 dns_srv_lb=yes
 # Always: Also try IPv6:
 dns_try_ipv6=yes
-# Try onle IPv6:
+# Try only IPv6:
 dns_cache_flags=6
+# Query NAPTR-Records as well:
+dns_try_naptr=yes
 
 #!ifdef WITH_XMLRPC
 #!ifndef WITH_TCP