[sr-dev] git:master: ims_qos: Updated example-config and documentation for the Rx-Interface

Carsten Bock carsten at ng-voice.com
Tue Dec 2 21:23:28 CET 2014


Module: sip-router
Branch: master
Commit: 91123f6c510e3fc127adaa1b4ffa1adba4a1a287
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=91123f6c510e3fc127adaa1b4ffa1adba4a1a287

Author: Carsten Bock <carsten at ng-voice.com>
Committer: Carsten Bock <carsten at ng-voice.com>
Date:   Tue Dec  2 21:22:56 2014 +0100

ims_qos: Updated example-config and documentation for the Rx-Interface

---

 examples/pcscf/kamailio.cfg           |   27 ++++++++++++++++++++++++---
 modules/ims_qos/doc/ims_qos_admin.xml |   16 ++++++++++++++++
 2 files changed, 40 insertions(+), 3 deletions(-)

diff --git a/examples/pcscf/kamailio.cfg b/examples/pcscf/kamailio.cfg
index 21a0146..c09cdc9 100644
--- a/examples/pcscf/kamailio.cfg
+++ b/examples/pcscf/kamailio.cfg
@@ -795,8 +795,25 @@ route[REGISTER] {
 
 #!ifdef WITH_RX	
 	xlog("L_DBG","Subscribing to signalling bearer status\n");
-	if (Rx_AAR_Register("REG_AAR_REPLY", "location") == 0)
-		exit;
+
+	Rx_AAR_Register("REG_AAR_REPLY", "location");
+	switch ($retcode) {
+		case -1:
+			# There was an error sending the AAR-Request:
+			xlog("L_ERR", "Diameter: AAR failed on subscription to signalling\n");
+			send_reply("403", "Can't register to QoS for signalling");
+			exit;
+			break;
+		case 0:
+			# We are waiting for an async reply, just exit here.
+			exit;
+			break;
+		case 1:
+			# We did not need to send AAR, so just continue as normal
+			route(REGISTER_CONTINUE);
+			break;
+	}
+	exit;
 }
 
 route[REG_AAR_REPLY] {
@@ -809,8 +826,12 @@ route[REG_AAR_REPLY] {
 			send_reply("403", "Can't register to QoS for signalling");
 			exit;
 	}
-#!endif
+	# Proceed with Registering:
+	route(REGISTER_CONTINUE);
+}
 
+route[REGISTER_CONTINUE] {
+#!endif
 #!ifndef WITH_SBC
 #!ifdef WITH_WEBSOCKET
 	if (($Rp == MY_WS_PORT || $Rp == MY_WSS_PORT) && (proto == WS || proto == WSS)) {
diff --git a/modules/ims_qos/doc/ims_qos_admin.xml b/modules/ims_qos/doc/ims_qos_admin.xml
index 726e441..05f76c5 100644
--- a/modules/ims_qos/doc/ims_qos_admin.xml
+++ b/modules/ims_qos/doc/ims_qos_admin.xml
@@ -229,6 +229,22 @@ modparam("ims_qos", "authorize_video_flow", 0)
         </listitem>
       </itemizedlist>
 
+	<para>Return codes:</para>
+		<itemizedlist>
+		<listitem>
+			<para>
+			<emphasis>-1</emphasis> - error: There was an error, so we must either ignore it (no subscription) or send 403 (depends on behaviour you want)
+			</para>
+			<para>
+			<emphasis>0</emphasis> - Success: AAR-Request sent, reply is processed asynchronously.
+			</para>
+			<para>
+			<emphasis>1</emphasis> - Success: No need to send AAR-Request, as a subscription still exists (continue as normal)
+			</para>
+		</listitem>
+		</itemizedlist>
+
+
       <para>This function can be used from REQUEST_ROUTE.</para>
 
       <para>p.s. this is executed asynchronously. See example on how to




More information about the sr-dev mailing list