11.8 Walk through a sequence
1 service foreach_seq {
processing {
dialog {
response incoming INVITE() {
5
uri<> students =
<'sip:student.1@enseirb.fr',
'sip:student.2@enseirb.fr',
'sip:student.3@enseirb.fr'>;
10
if ( FROM == 'sip:wife@fwd.com' ) {
return forward;
}
else {
15 foreach (student in students) {
if ( FROM == student ) {
return /ERROR/REDIRECTION/MOVED_TEMPORARILY
with {reason = "Busy Here contact Bob",
#contact: 'sip:bob@enseirb.fr'};
20 }
}
return forward 'sip:phoenix-contact@enseirb.fr';
}
}
25 }
}
}