~ubuntu-branches/debian/sid/kamailio/sid

« back to all changes in this revision

Viewing changes to modules/ims_icscf/doc/ims_icscf_admin.xml

  • Committer: Package Import Robot
  • Author(s): Victor Seva
  • Date: 2014-01-06 11:47:13 UTC
  • mfrom: (1.1.5)
  • Revision ID: package-import@ubuntu.com-20140106114713-t8xidp4arzrnyeya
Tags: 4.1.1-1
* New upstream release
* debian/patches:
  - add upstream fixes
* Added tls outbound websocket autheph dnssec modules
  - openssl exception added to their license
* removing sparc and ia64 from supported archs
  for mono module (Closes: #728915)

Show diffs side-by-side

added added

removed removed

Lines of Context:
189
189
     t_relay();
190
190
}
191
191
...
192
 
</programlisting>
 
192
        </programlisting>
193
193
      </example>
194
194
    </section>
195
195
 
215
215
 
216
216
    <section>
217
217
      <title><function
218
 
      moreinfo="none">I_perform_user_authorization_request(capabalities)</function></title>
 
218
      moreinfo="none">I_perform_user_authorization_request(route_block, capabalities)</function></title>
219
219
 
220
220
      <para>Perform a UAR on Diameter CXDX interface. This function will build
221
221
      a list of SCSCFs to be used and populate the SCSCF list for the request.
224
224
 
225
225
      <itemizedlist>
226
226
        <listitem>
 
227
          <para>Route block to resume after async UAR Diameter reply.</para>
 
228
        </listitem>
 
229
        <listitem>
227
230
          <para>capabilities - whether to request capabilities or not "1" -
228
231
          with capabilities, "0" - no capabilities.</para>
229
232
        </listitem>
239
242
 
240
243
        <programlisting format="linespecific">
241
244
...
242
 
            I_perform_user_authorization_request("0"); #0=REG/DEREG; 1=REG+Capabilities
243
 
            #this is async so to know status we have to check the reply avp
244
 
            switch ($avp(s:uaa_return_code)){
245
 
                case 1: #success
 
245
I_perform_user_authorization_request("REG_UAR_REPLY","0"); #0=REG/DEREG; 1=REG+Capabilities
 
246
exit;
 
247
...
 
248
route[REG_UAR_REPLY]
 
249
{
 
250
    #this is async so to know status we have to check the reply avp
 
251
    switch ($avp(s:uaa_return_code)){
 
252
            case 1: #success
246
253
                    if (I_scscf_select("0")){
247
 
                        t_on_failure("register_failure");
248
 
                        t_on_reply("register_reply");
249
 
                        if (!t_relay()) {
250
 
                            t_reply("500", "Error forwarding to SCSCF");
251
 
                        }
 
254
                            t_on_failure("register_failure");
 
255
                            t_on_reply("register_reply");
 
256
                            #now relay to appropriate SCSCF
 
257
                            if (!t_relay()) {
 
258
                                    t_reply("500", "Error forwarding to SCSCF");
 
259
                            }
252
260
                    } else {#select failed
253
 
                        I_scscf_drop();
254
 
                        t_reply("500", "Server error on SCSCF Select (UAR)");
 
261
                            I_scscf_drop();
 
262
                            t_reply("500", "Server error on SCSCF Select (UAR)");
 
263
                    }       
 
264
                    break;          
 
265
            case -1: #failure
 
266
                    xlog("L_ERR", "UAR failure - error response sent from module\n");
 
267
                    break;
 
268
            case -2: #error
 
269
                    xlog("L_ERR", "UAR error - sending error response now\n");
 
270
                    t_reply("500", "UAR failed");
 
271
                    break;
 
272
            default:
 
273
                    xlog("L_ERR", "Unknown return code from UAR, value is [$avp(s:uaa_return_code)]\n");
 
274
                    t_reply("500", "Unknown response code from UAR");
 
275
                    break;
 
276
    }
 
277
}
 
278
...          
 
279
        </programlisting>
 
280
      </example>
 
281
    </section>
 
282
 
 
283
    <section>
 
284
      <title><function
 
285
      moreinfo="none">I_perform_location_information_request(route_block)</function></title>
 
286
 
 
287
      <para>Perform a LIR on Diameter CXDX interface.</para>
 
288
 
 
289
      <itemizedlist>
 
290
        <listitem>
 
291
          <para>Route block to resume after async LIR Diameter reply.</para>
 
292
        </listitem>
 
293
      </itemizedlist>
 
294
 
 
295
      <para>This function can be used from REQUEST_ROUTE.</para>
 
296
 
 
297
      <para>p.s. this is executed asynchronously. See example on how to
 
298
      retrieve return value</para>
 
299
 
 
300
      <example>
 
301
        <title>I_perform_location_information_request()</title>
 
302
 
 
303
        <programlisting format="linespecific">
 
304
...
 
305
I_perform_location_information_request("SESSION_LIR_REPLY","0");
 
306
exit;
 
307
...
 
308
route[SESSION_LIR_REPLY]
 
309
{
 
310
    if ($avp(lia_return_code) == 1) {
 
311
            if (I_scscf_select("0")) {
 
312
                    append_branch();
 
313
                    t_on_reply("initial_request_reply");
 
314
                    t_on_failure("initial_request_failure");
 
315
                    if (!t_relay()) {
 
316
                            t_reply("500","Error forwarding towards S-CSCF");
 
317
                            break;
255
318
                    }
256
319
                    break;
257
 
                case -1: #failure
258
 
                    xlog("L_ERR", "UAR failure - error response sent from module");
259
 
                    break;
260
 
                case -2: #error
261
 
                    xlog("L_ERR", "UAR error - sending error response now");
262
 
                    t_reply("500", "UAR failed");
263
 
                    break;
264
 
                default:
265
 
                    xlog("L_ERR", "Unknown return code from UAR, value is [$avp(s:uaa_return_code)]");
266
 
                    t_reply("500", "Unknown response code from UAR"); 
 
320
            } else {
 
321
                    xlog("L_DBG", "dropping scscf list on initial request\n");
 
322
                    I_scscf_drop();
 
323
                    t_reply("500", "Server error on LIR select S-CSCF");
267
324
                    break;
268
325
            }
269
 
...
270
 
</programlisting>
271
 
      </example>
272
 
    </section>
273
 
 
274
 
    <section>
275
 
      <title><function
276
 
      moreinfo="none">I_perform_location_information_request()</function></title>
277
 
 
278
 
      <para>This function can be used from REQUEST_ROUTE.</para>
279
 
 
280
 
      <example>
281
 
        <title>proxy_authorize usage</title>
282
 
 
283
 
        <programlisting format="linespecific">
284
 
...
285
 
if (!proxy_authorize("$fd", "subscriber)) {
286
 
proxy_challenge("$fd", "1");  # Realm will be autogenerated
287
 
};
288
 
...
289
 
</programlisting>
 
326
    } else {
 
327
            t_reply("500", "Server error on LIR");
 
328
            break;
 
329
    }
 
330
    break;
 
331
}
 
332
...          
 
333
        </programlisting>
290
334
      </example>
291
335
    </section>
292
336
  </section>
293
 
 
294
337
  <section>
295
338
    <title>Statistics</title>
296
339