Hi,
I can place and receive call from the PSTN, but I can place call even if I am not registered !!!!!!!
And I want only user who are registered can place call?
How can I do please?
That's my configuration file :
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
record_route();
# loose-route processing
if (loose_route()) {
t_relay();
break;
};
/* 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();
};
# 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=~"My realm") {
if (method=="REGISTER") {
# Uncomment this if you want to use digest authentication
if (!www_authorize("My realm ", "subscriber")) {
www_challenge("My realm ", "0");
break;
};
save("location");
break;
};
# native SIP destinations are handled using our USRLOC DB
if (!lookup("location")) {
#rewritehostport("*****:5060");
forward(*****, 5060);
};
# forward the request now
if (!t_relay()) {
sl_reply_error();
break;
};
};
}