240
243
<programlisting format="linespecific">
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
I_perform_user_authorization_request("REG_UAR_REPLY","0"); #0=REG/DEREG; 1=REG+Capabilities
250
#this is async so to know status we have to check the reply avp
251
switch ($avp(s:uaa_return_code)){
246
253
if (I_scscf_select("0")){
247
t_on_failure("register_failure");
248
t_on_reply("register_reply");
250
t_reply("500", "Error forwarding to SCSCF");
254
t_on_failure("register_failure");
255
t_on_reply("register_reply");
256
#now relay to appropriate SCSCF
258
t_reply("500", "Error forwarding to SCSCF");
252
260
} else {#select failed
254
t_reply("500", "Server error on SCSCF Select (UAR)");
262
t_reply("500", "Server error on SCSCF Select (UAR)");
266
xlog("L_ERR", "UAR failure - error response sent from module\n");
269
xlog("L_ERR", "UAR error - sending error response now\n");
270
t_reply("500", "UAR failed");
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");
285
moreinfo="none">I_perform_location_information_request(route_block)</function></title>
287
<para>Perform a LIR on Diameter CXDX interface.</para>
291
<para>Route block to resume after async LIR Diameter reply.</para>
295
<para>This function can be used from REQUEST_ROUTE.</para>
297
<para>p.s. this is executed asynchronously. See example on how to
298
retrieve return value</para>
301
<title>I_perform_location_information_request()</title>
303
<programlisting format="linespecific">
305
I_perform_location_information_request("SESSION_LIR_REPLY","0");
308
route[SESSION_LIR_REPLY]
310
if ($avp(lia_return_code) == 1) {
311
if (I_scscf_select("0")) {
313
t_on_reply("initial_request_reply");
314
t_on_failure("initial_request_failure");
316
t_reply("500","Error forwarding towards S-CSCF");
258
xlog("L_ERR", "UAR failure - error response sent from module");
261
xlog("L_ERR", "UAR error - sending error response now");
262
t_reply("500", "UAR failed");
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");
321
xlog("L_DBG", "dropping scscf list on initial request\n");
323
t_reply("500", "Server error on LIR select S-CSCF");
276
moreinfo="none">I_perform_location_information_request()</function></title>
278
<para>This function can be used from REQUEST_ROUTE.</para>
281
<title>proxy_authorize usage</title>
283
<programlisting format="linespecific">
285
if (!proxy_authorize("$fd", "subscriber)) {
286
proxy_challenge("$fd", "1"); # Realm will be autogenerated
327
t_reply("500", "Server error on LIR");
295
338
<title>Statistics</title>