Hello My Openser users can call PSTN numbers through a PSTN gateway. But they cant call each other dialing the usernames. Where is the bug in my config? here is my openser.cfg
route{
if (!mf_process_maxfwd_header("10")) { sl_send_reply("483","Too Many Hops"); exit; };
if (msg:len >= 2048 ) { sl_send_reply("513", "Message too big"); exit; };
if (!method=="REGISTER") record_route();
if (loose_route()) { # mark routing logic in request append_hf("P-hint: rr-enforced\r\n"); route(1); };
# -------------------------------------------------- # Registration # --------------------------------------------------
if (uri==myself) {
if (method=="REGISTER") {
# Uncomment this if you want to use digest authentication if (!www_authorize("myserver.com", "subscriber")) { www_challenge("myserver.com", "0"); exit; };
save("location"); exit; }; }
if (is_method("INVITE")) {
# Route E.164 numbers to PSTN Gateway if (uri=~"sip:+[1-9][0-9]*@myserver.com" ) {
if (isflagset(29)){ route(2); return; }
}
# Route E.164 numbers to PSTN Gateway if (uri=~"sip:[1-9][0-9]*@myserver.com" ) {
if (isflagset(29)){ route(2); return; } }
} # method = invite
route(1); }
route[1] { # send it out now; use stateful forwarding as it works reliably # even for UDP2TCP if (!t_relay()) { sl_reply_error(); }; exit; }
# Gateway PSTN route[2] {
rewritehost("gateways_IP");
t_on_reply("1");
if (!t_relay()) { sl_reply_error(); }; }
Thanks for the help Joao Pereira