Hi I am having trouble with calls.
I have three clients created with alias’s asterisk =
38212352, user1 = 38212351 , user2 =38212350
All users can register and I can see with serctl
ul show the aliais and the
user names.
I am using MYSQL and SERWEB also.
When I try to call the alias from each user 1 & 2 nothing
happens. I think I have to correct something in the route section.
I want users to be able to call by alias and calls for PSTN
to route to Asterisk with 0 prefix.
I start ser with /usr/local/sbin/ser
-D –E
Can someone please help put my brain to rest.
Thank you for all your support.
# ------------------------- request routing logic
-------------------
# main routing logic
route{
#
initial sanity checks -- messages with
#
max_forwards==0, or excessively long requests
if (!mf_process_maxfwd_header("10"))
{
sl_send_reply("483","Too
Many Hops");
break;
};
if (msg:len >= max_len ) {
sl_send_reply("513",
"Message too big");
break;
};
#
we record-route all messages -- to make sure that
#
subsequent messages will go through our proxy; that's
#
particularly good if upstream and downstream entities
#
use different transport protocol
if (!method=="REGISTER") record_route();
#
subsequent messages withing
a dialog should take the
#
path determined by record-routing
if (loose_route()) {
#
mark routing logic in request
append_hf("P-hint:
rr-enforced\r\n");
route(1);
break;
};
if (!uri==myself) {
#
mark routing logic in request
append_hf("P-hint:
outbound\r\n");
route(1);
break;
};
#
if the request is for other domain use UsrLoc
#
(in case, it does not work, use the following command
#
with proper names and addresses in it)
if (uri==myself) {
if (method=="REGISTER") {
# Uncomment this if you want to use digest authentication
if (!www_authorize("192.168.1.4",
"subscriber")) {
www_challenge("192.168.1.4",
"0");
break;
};
save("location");
break;
};
lookup("aliases");
if (!uri==myself) {
append_hf("P-hint:
outbound alias\r\n");
route(1);
break;
};
#
native SIP destinations are handled using our USRLOC
DB
if (!lookup("location")) {
sl_send_reply("404",
"Not Found");
break;
};
};
append_hf("P-hint:
usrloc applied\r\n");
route(1);
}
route[1]
{
#
send it out now; use stateful
forwarding as it works reliably
#
even for UDP2TCP
if (!t_relay()) {
sl_reply_error();
};
if (method == "INVITE" && (uri=~"^sip:0")){
rewritehostport ("192.168.1.5:5060");
t_relay();
break();
}