@@ -374,15 +374,15 @@ onreply_route[do_save] {
374374 <title ><varname >attr_avp</varname > (string)</title >
375375 <para >
376376 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)
381382 </para >
382383 <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
386386 </para >
387387 <para >
388388 <emphasis >
@@ -404,10 +404,18 @@ if (is_method("REGISTER")) {
404404}
405405...
406406lookup("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+ ....
407414t_on_branch("parallel_fork");
415+ t_relay();
408416...
409417branch_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");
411419}
412420
413421 </programlisting >
0 commit comments