@@ -374,15 +374,15 @@ onreply_route[do_save] {
374
374
<title ><varname >attr_avp</varname > (string)</title >
375
375
<para >
376
376
AVP to store specific additional information for each registration.
377
- This information is read from the AVP and stored (in memory, db or both)
378
- at every registrar 'save'. When a registrar 'lookup' or 'is_registered'
379
- function is called, the <emphasis >attr_avp</emphasis > is populated with
380
- the value saved at [re]registration.
377
+ This information is read from the AVP and stored (in memory, db
378
+ or both) at every registrar 'save()'. When a registrar 'lookup()' or
379
+ 'is_registered()' function is called, the stored information is
380
+ pushed into a message branch attribute with the same name as
381
+ <emphasis >attr_avp</emphasis > (see $msg.branch.attr() core variable)
381
382
</para >
382
383
<para >
383
- When doing call forking, the avp will hold multiple values. The position of
384
- the corresponding attribute information in <emphasis >attr_avp</emphasis > is
385
- equal to the branch index. An example scenario is given below.
384
+ When doing parallel call forking, the contact attributes will be
385
+ pushed to the attributes of the corresponding branch
386
386
</para >
387
387
<para >
388
388
<emphasis >
@@ -404,10 +404,18 @@ if (is_method("REGISTER")) {
404
404
}
405
405
...
406
406
lookup("location");
407
+ # list all resulted branches and their attribute
408
+ $var(i) = 0;
409
+ while ($(msg.branch.uri[$var(i)])!=NULL) {
410
+ xlog("branch $var(i): $(msg.branch.uri[$var(i)]), attr=$(msg.branch.attr(attr)[$var(i)])\n");
411
+ $var(i) = $var(i) + 1;
412
+ }
413
+ ....
407
414
t_on_branch("parallel_fork");
415
+ t_relay();
408
416
...
409
417
branch_route [parallel_fork] {
410
- xlog("Attributes for branch $T_branch_idx: $(avp( attr)[$T_branch_idx] )\n");
418
+ xlog("Attributes for branch $T_branch_idx: $tm.branch.attr( attr)\n");
411
419
}
412
420
413
421
</programlisting >
0 commit comments