Check if it is a gateway call before setting up the failure route.
klaus
if (isflagset(4)) { /*voicemail enabled*/
if (!(PSTN call?)) {
t_on_failure("1");
}
}
Andrea Bondavalli wrote:
Hi all,
I am configuring SER in order to use the SEMS's voicemail
when one of my subscribed users is not avaiable or
when all the INVITEs to their contacts fail (fork).
I'am using the following configuration:
route {
....
if (isflagset(4)) { /*voicemail enabled*/
t_on_failure("1");
}
if (!t_relay()) {
sl_reply_error();
break;
}
}
failure_route[1] {
t_reply("100","Trying -- going to voicemail");
if (method=="INVITE" || method=="REFER") {
log("**************** vm start - begin
******************\n");
log("**************** voicemail
******************\n");
if(!vm("/tmp/am_fifo","voicemail")){
log("could not contact the answer machine\n");
t_reply("500","could not contact the answer
machine");
};
log("**************** vm start - end ******************\n");
}
else if (method=="BYE") {
log("**************** vm end - begin ******************\n");
log("**************** voicemail ******************\n");
if(!vm("/tmp/am_fifo","bye")){
log("could not contact the answer machine\n");
t_reply("500","could not contact the answer
machine");
};
log("**************** vm end - end ******************\n");
};
}
...
This works fine when the system calls a user's contact whose username part
matches the subscribed user name.
Unfortunately, if the system tries to reach such a contact at a phone
number (using a gateway) the result is that SEMS reports:
"Error: 404 voicemail: no email address for user 034823213213."
Can you help me ?
Best regards,
Andrea
_______________________________________________
Serusers mailing list
serusers(a)lists.iptel.org
http://lists.iptel.org/mailman/listinfo/serusers