Hard to tell -- a script fragment is not sufficient to judge the error cause.
If you get 404, you apparently call sl_send_reply(404), that's it.
A typical script fragment looks like this:
if (my_domain) {
if (register) { register stuff; break; }
/* lookup PSTN destinations */
if (uri=~"sip:+1[0-9]*@foo.bar) { sethost(gateway_address); }
else {
if (!lookup) { sl_send_reply(404...); break; }
};
t_relay();
}
A complete example is iptel.cfg in our source distribution.
-Jiri
At 03:05 PM 4/24/2003, Yang Xiang wrote:
Hi all,
I put following config in the main routing-block for forwarding INVITE-msg
to pstn-gatway:
...
route{
...
if (!t_relay()) {
sl_reply_error();
};
# forward message to PSTN Gateway
if (uri=~"^sip:[0-9]*@"){
log(5, "Forward to pstn \n");
forward("10.20.0.6");
break;
};
}
However, SER doesn't do it and sends a reply "404 not found" back instead.
Is it the correct position to put the function "forward()" there?
By the way, ser also doesn't write log message to syslog. Following is my
syslog.conf, is anything wrong in the syslog.conf?
#ident "(a)(#)syslog.conf 1.5 98/12/14 SMI" /* SunOS 5.0 */
#
# Copyright (c) 1991-1998 by Sun Microsystems, Inc.
# All rights reserved.
#
# syslog configuration file.
#
# This file is processed by m4 so be careful to quote (`') names
# that match m4 reserved words. Also, within ifdef's, arguments
# containing commas must be quoted.
#
*.debug;*.notice;*.info;*.crit;*.alert /var/log/debug
*.err;kern.notice;auth.notice /dev/sysmsg
*.err;kern.debug;daemon.notice;mail.crit /var/adm/messages
*.alert;kern.err;daemon.err operator
*.alert root
*.emerg *
# if a non-loghost machine chooses to have authentication messages
# sent to the loghost machine, un-comment out the following line:
#auth.notice ifdef(`LOGHOST', /var/log/authlog, @loghost)
mail.debug ifdef(`LOGHOST', /var/log/syslog, @loghost)
#
# non-loghost machines will use the following lines to cause "user"
# log messages to be logged locally.
#
user.err /dev/sysmsg
user.err /var/adm/messages
user.alert `root, operator'
user.emerg *
auth.info /var/adm/messages
local6.debug /var/adm/imapd.log
auth.debug /var/adm/auth.log
Thanks,
Yang
_______________________________________________
Serusers mailing list
serusers(a)lists.iptel.org
http://lists.iptel.org/mailman/listinfo/serusers