On Jun 04, 2004 at 15:46, Bert Berlin <btberlin(a)quintum.com> wrote:
I am trying to get record_route() working in a simple
configuration file
which I use for lab testing of our UA product.
After the INVITE is sent by the UA (our gateway) the call just isn't
routed.
It doesn't work because you have a break immediately after
record_route(). break will immediately stop script processing (so your
request is not forwarded anymore).
Commented cfg.:
# store user location if a REGISTER appears
if (method=="REGISTER") {
save("location");
};
Add a break after save(). You don't want the REGISTER to be forwarded
somewhere else.
############################
/* grant Route routing if route headers present */
# if (loose_route()) { t_relay(); break; };
/* record-route INVITEs -- all subsequent requests must visit us */
# if (method=="INVITE") {
# record_route();
# };
Here record_route is commented out.
# now check if it really is a PSTN destination which should be
handled
# by our gateway; if not, and the request is an invitation, drop
it --
# we cannot terminate it in PSTN; relay non-INVITE requests --
it may
# be for example BYEs sent by gateway to call originator
if (uri=="sip:17325555555@192.168.20.12") {
sl_send_reply("678","matched uri for 20.137");
if (method=="INVITE")
# forward(192.168.20.137, 5060);
record_route();
# t_relay();
break;
};
Here you have a break after it and t_relay is commented => the request
will be dropped.
if
(uri=~"sip:1732922[0-9]*@192.168.20.12") {
sl_send_reply("678","matched uri for 20.220");
if (method=="INVITE")
# forward(192.168.20.220, 5060);
record_route();
# t_relay();
break;
};
The same here.
Andrei