<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Lokesh,<br>
<br>
This: loadmodule "modules/sl/sl.so"<br>
Should probably look like this: loadmodule "modules/sl.so"<br>
<br>
Also, at <a class="moz-txt-link-abbreviated" href="http://www.openser.org">www.openser.org</a>, the tutorial for intergrating openser and
asterisk includes routing to PSTN.<br>
<br>
Good luck.<br>
<br>
---Mike<br>
<br>
The <br>
<br>
Lokesh Kumar wrote:
<blockquote cite="mid007c01c5f5c6$444a0ac0$2f00a8c0@lokesh" type="cite">
<pre wrap="">Hello Iqbal,
Yes, I am having all those modules present in proper directory. When I am
using this below openser.cfg conf file everything works fine, But i can't
call from SIP UA registered on openser to outside number.Infact I can recive
calls on SIP UA. Please help how to debug this problem. I will be very
thankful to you
#
# $Id: openser.cfg,v 1.5 2005/10/28 19:45:33 bogdan_iancu Exp $
#
# simple quick-start config script
#
# ----------- global configuration parameters ------------------------
debug=9 # debug level (cmd line: -dddddddddd)
fork=yes
log_stderror=no # (cmd line: -E)
# Uncomment these lines to enter debugging mode
#fork=no
#log_stderror=yes
check_via=no # (cmd. line: -v)
dns=no # (cmd. line: -r)
rev_dns=no # (cmd. line: -R)
port=5060
children=4
fifo="/tmp/openser_fifo"
#-----I had added from here---------------------------------
#listen=212.13.35.13
#port=5060
#children=4
#alias=212.13.35.13
#---------------Upto here-----------------------------------
# uncomment the following lines for TLS support
#disable_tls = 0
#listen = tls:your_IP:5061
#tls_verify = 1
#tls_require_certificate = 0
#tls_method = TLSv1
#tls_certificate = "/usr/local/etc/openser/tls/user/user-cert.pem"
#tls_private_key = "/usr/local/etc/openser/tls/user/user-privkey.pem"
#tls_ca_list = "/usr/local/etc/openser/tls/user/user-calist.pem"
# ------------------ module loading ----------------------------------
# Uncomment this if you want to use SQL database
#loadmodule "/usr/local/lib/openser/modules/mysql.so"
loadmodule "/usr/local/lib/openser/modules/sl.so"
loadmodule "/usr/local/lib/openser/modules/tm.so"
loadmodule "/usr/local/lib/openser/modules/rr.so"
loadmodule "/usr/local/lib/openser/modules/maxfwd.so"
loadmodule "/usr/local/lib/openser/modules/usrloc.so"
loadmodule "/usr/local/lib/openser/modules/registrar.so"
#loadmodule "/usr/local/lib/openser/modules/mediaproxy.so" #--I had added
#loadmodule "/usr/local/lib/openser/modules/nathelper.so"#----I had added
loadmodule "/usr/local/lib/openser/modules/textops.so"
#loadmodule "/usr/local/lib/openser/modules/domain.so"
# Uncomment this if you want digest authentication
# mysql.so must be loaded !
#loadmodule "/usr/local/lib/openser/modules/auth.so"
#loadmodule "/usr/local/lib/openser/modules/auth_db.so"
# ----------------- setting module-specific parameters ---------------
# -- usrloc params --
modparam("usrloc", "db_mode", 0)
# Uncomment this if you want to use SQL database
# for persistent storage and comment the previous line
#modparam("usrloc", "db_mode", 2)
# -- auth params --
# Uncomment if you are using auth module
#
#modparam("auth_db", "calculate_ha1", yes)
#
# If you set "calculate_ha1" parameter to yes (which true in this config),
# uncomment also the following parameter)
#
#modparam("auth_db", "password_column", "password")
# -- rr params --
# add value to ;lr param to make some broken UAs happy
modparam("rr", "enable_full_lr", 1)
#--I had added here----------
#modparam("nathelper","rtpproxy_disable",1)
#modparam("nathelper","natping_interval",180)
#modparam("mediaproxy","natping_interval",30)
#modparam("mediaproxy","mediaproxy_socket","/var/run/mediaproxy.sock")
#modparam("mediaproxy","sip_asymmetrics","/usr/local/etc/openser/sip-asymmet
ric-clients")
#modparam("mediaproxy","rtp_asymmetrics","/usr/local/etc/openser/rtp-asymmet
ric-clients")
#modparam("domain","db_url","dbtext:/usr/local/etc/openser/domaintables")
#-----Upto here--------------
# ------------------------- 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");
exit;
};
if (msg:len >= 2048 ) {
sl_send_reply("513", "Message too big");
exit;
};
# 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);
};
if (!uri==myself) {
# mark routing logic in request
append_hf("P-hint: outbound\r\n");
# if you have some interdomain connections via TLS
#if(uri=~"@tls_domain1.net") {
# t_relay_to_tls("IP_domain1","port_domain1");
# exit;
#} else if(uri=~"@tls_domain2.net") {
# t_relay_to_tls("IP_domain2","port_domain2");
# exit;
#}
route(1);
};
# 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("openser.org", "subscriber")) {
# www_challenge("openser.org", "0");
# exit;
#};
save("location");
exit;
};
lookup("aliases");
if (!uri==myself) {
append_hf("P-hint: outbound alias\r\n");
route(1);
};
# native SIP destinations are handled using our USRLOC DB
if (!lookup("location")) {
sl_send_reply("404", "Not Found");
exit;
};
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();
};
exit;
}
----- Original Message -----
From: "Iqbal" <a class="moz-txt-link-rfc2396E" href="mailto:iqbal@gigo.co.uk"><iqbal@gigo.co.uk></a>
To: "Lokesh Kumar" <a class="moz-txt-link-rfc2396E" href="mailto:lokesh@interacesso.pt"><lokesh@interacesso.pt></a>
Cc: "Norman Brandinger" <a class="moz-txt-link-rfc2396E" href="mailto:norm@goes.com"><norm@goes.com></a>; <a class="moz-txt-link-rfc2396E" href="mailto:serusers@iptel.org"><serusers@iptel.org></a>;
<a class="moz-txt-link-rfc2396E" href="mailto:users@openser.org"><users@openser.org></a>
Sent: Wednesday, November 30, 2005 12:32 PM
Subject: Re: [Users] Can anyone share his openser.cfg..in which openser is
routing calls to pstn gateway
</pre>
<blockquote type="cite">
<pre wrap="">have you got those modules that cant be found, and are they located in
that directory
iqbal
Lokesh Kumar wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Hello Norman,
When I type openser start it gives me " ERROR: Bad config file (4
</pre>
</blockquote>
</blockquote>
<pre wrap=""><!---->errors).
</pre>
<blockquote type="cite">
<blockquote type="cite">
<pre wrap="">here is the messages i got from cat /var/log/messages
---------
Nov 30 11:05:01 ser crond(pam_unix)[26819]: session closed for user root
Nov 30 11:07:16 ser openser: ERROR: load_module: could not open module
<modules/sl/sl.so>: modules/sl/sl.so: cannot open shared object file: No
such file or directory
Nov 30 11:07:16 ser openser: parse error (10,13-14): failed to load
</pre>
</blockquote>
</blockquote>
<pre wrap=""><!---->module
</pre>
<blockquote type="cite">
<blockquote type="cite">
<pre wrap="">Nov 30 11:07:16 ser openser: ERROR: load_module: could not open module
<modules/tm/tm.so>: modules/tm/tm.so: cannot open shared object file: No
such file or directory
Nov 30 11:07:16 ser openser: parse error (11,13-14): failed to load
</pre>
</blockquote>
</blockquote>
<pre wrap=""><!---->module
</pre>
<blockquote type="cite">
<blockquote type="cite">
<pre wrap="">Nov 30 11:07:16 ser openser: parse error (12,1-2): syntax error
Nov 30 11:07:16 ser openser: parse error (12,1-2):
Nov 30 11:09:11 ser openser: ERROR: load_module: could not open module
<modules/sl/sl.so>: modules/sl/sl.so: cannot open shared object file: No
such file or directory
Nov 30 11:09:11 ser openser: parse error (10,13-14): failed to load
</pre>
</blockquote>
</blockquote>
<pre wrap=""><!---->module
</pre>
<blockquote type="cite">
<blockquote type="cite">
<pre wrap="">Nov 30 11:09:11 ser openser: ERROR: load_module: could not open module
<modules/tm/tm.so>: modules/tm/tm.so: cannot open shared object file: No
such file or directory
Nov 30 11:09:11 ser openser: parse error (11,13-14): failed to load
</pre>
</blockquote>
</blockquote>
<pre wrap=""><!---->module
</pre>
<blockquote type="cite">
<blockquote type="cite">
<pre wrap="">Nov 30 11:09:11 ser openser: parse error (12,1-2): syntax error
Nov 30 11:09:11 ser openser: parse error (12,1-2):
[root@ser openser]#
------------------------------
Here is my openser.cfg , In which i had commented mysql, and auth
</pre>
</blockquote>
</blockquote>
<pre wrap=""><!---->modules.I
</pre>
<blockquote type="cite">
<blockquote type="cite">
<pre wrap="">want the things works without any AAA, initially.
#
# $Id: pstn.cfg,v 1.2 2005/07/25 16:27:33 miconda Exp $
#
# example: ser configured as PSTN gateway guard; PSTN gateway is located
# at 192.168.0.10
#
# ------------------ module loading ----------------------------------
loadmodule "modules/sl/sl.so"
loadmodule "modules/tm/tm.so"
;loadmodule "modules/acc/acc.so"
loadmodule "modules/rr/rr.so"
loadmodule "modules/maxfwd/maxfwd.so"
;loadmodule "modules/mysql/mysql.so"
;loadmodule "modules/auth/auth.so"
;loadmodule "modules/auth_db/auth_db.so"
;loadmodule "modules/group/group.so"
loadmodule "modules/uri/uri.so"
# ----------------- setting module-specific parameters ---------------
;modparam("auth_db", "db_url","mysql://ser:heslo@localhost/ser")
;modparam("auth_db", "calculate_ha1", yes)
;modparam("auth_db", "password_column", "password")
# -- acc params --
;modparam("acc", "log_level", 1)
# that is the flag for which we will account -- don't forget to
# set the same one :-)
;modparam("acc", "log_flag", 1 )
# ------------------------- request routing logic -------------------
# main routing logic
route{
/* ********* ROUTINE CHECKS **********************************
</pre>
</blockquote>
</blockquote>
<pre wrap=""><!---->*/
</pre>
<blockquote type="cite">
<blockquote type="cite">
<pre wrap=""> # filter too old messages
if (!mf_process_maxfwd_header("10")) {
log("LOG: Too many hops\n");
sl_send_reply("483","Too Many Hops");
return;
};
if (len_gt( max_len )) {
sl_send_reply("513", "Wow -- Message too large");
return;
};
/* ********* RR ********************************** */
/* grant Route routing if route headers present */
if (loose_route()) { t_relay(); return; };
/* record-route INVITEs -- all subsequent requests must visit us
</pre>
</blockquote>
</blockquote>
<pre wrap=""><!---->*/
</pre>
<blockquote type="cite">
<blockquote type="cite">
<pre wrap=""> 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=~<a class="moz-txt-link-rfc2396E" href="mailto:sip:\+?[0-9]+@.*">"sip:\+?[0-9]+@.*"</a>) {
if (method=="INVITE") {
sl_send_reply("403", "Call cannot be served
</pre>
</blockquote>
</blockquote>
<pre wrap=""><!---->here");
</pre>
<blockquote type="cite">
<blockquote type="cite">
<pre wrap=""> } else {
forward(uri:host, uri:port);
};
return;
};
# account completed transactions via syslog
setflag(1);
# free call destinations ... no authentication needed
if ( is_user_in("Request-URI", "free-pstn") /* free destinations
</pre>
</blockquote>
</blockquote>
<pre wrap=""><!---->*/
</pre>
<blockquote type="cite">
<blockquote type="cite">
<pre wrap=""> | uri=~<a class="moz-txt-link-rfc2396E" href="mailto:sip:[79][0-9][0-9][0-9]@.*">"sip:[79][0-9][0-9][0-9]@.*"</a> /* local
</pre>
</blockquote>
</blockquote>
<pre wrap=""><!---->PBX
</pre>
<blockquote type="cite">
<blockquote type="cite">
<pre wrap="">*/
| uri=~"sip:98[0-9][0-9][0-9][0-9]") {
log("free call");
} else if (src_ip==212.xx.35.xx) {
# our gateway doesn't support digest authentication;
# verify that a request is coming from it by source
# address
log("gateway-originated request");
} else {
# in all other cases, we need to check the request
</pre>
</blockquote>
</blockquote>
<pre wrap=""><!---->against
</pre>
<blockquote type="cite">
<blockquote type="cite">
<pre wrap=""> # access control lists; first of all, verify request
# originator's identity
if (!proxy_authorize( "gateway" /* realm */,
"subscriber" /* table name */)) {
proxy_challenge( "gateway" /* realm */, "0" /* no
qop */ );
return;
};
# authorize only for INVITEs -- RR/Contact may result in
weird
# things showing up in d-uri that would break our logic;
</pre>
</blockquote>
</blockquote>
<pre wrap=""><!---->our
</pre>
<blockquote type="cite">
<blockquote type="cite">
<pre wrap=""> # major concern is INVITE which causes PSTN costs
if (method=="INVITE") {
# does the authenticated user have a permission
</pre>
</blockquote>
</blockquote>
<pre wrap=""><!---->for
</pre>
<blockquote type="cite">
<blockquote type="cite">
<pre wrap="">local
# calls (destinations beginning with a single
</pre>
</blockquote>
</blockquote>
<pre wrap=""><!---->zero)?
</pre>
<blockquote type="cite">
<blockquote type="cite">
<pre wrap=""> # (i.e., is he in the "local" group?)
if (uri=~<a class="moz-txt-link-rfc2396E" href="mailto:sip:0[1-9][0-9]+@.*">"sip:0[1-9][0-9]+@.*"</a>) {
if (!is_user_in("credentials", "local"))
</pre>
</blockquote>
</blockquote>
<pre wrap=""><!---->{
</pre>
<blockquote type="cite">
<blockquote type="cite">
<pre wrap=""> sl_send_reply("403", "No
</pre>
</blockquote>
</blockquote>
<pre wrap=""><!---->permission
</pre>
<blockquote type="cite">
<blockquote type="cite">
<pre wrap="">for local calls");
return;
};
# the same for long-distance (destinations begin
with two zeros")
} else if (uri=~<a class="moz-txt-link-rfc2396E" href="mailto:sip:00[1-9][0-9]+@.*">"sip:00[1-9][0-9]+@.*"</a>) {
if (!is_user_in("credentials", "ld")) {
sl_send_reply("403", " no
</pre>
</blockquote>
</blockquote>
<pre wrap=""><!---->permission
</pre>
<blockquote type="cite">
<blockquote type="cite">
<pre wrap="">for LD ");
return;
};
# the same for international
</pre>
</blockquote>
</blockquote>
<pre wrap=""><!---->calls
</pre>
<blockquote type="cite">
<blockquote type="cite">
<pre wrap="">(three zeros)
} else if (uri=~<a class="moz-txt-link-rfc2396E" href="mailto:sip:000[1-9][0-9]+@.*">"sip:000[1-9][0-9]+@.*"</a>) {
if (!is_user_in("credentials", "int")) {
sl_send_reply("403",
</pre>
</blockquote>
</blockquote>
<pre wrap=""><!---->"International
</pre>
<blockquote type="cite">
<blockquote type="cite">
<pre wrap="">permissions needed");
return;
};
# everything else (e.g., interplanetary calls) is
denied
} else {
sl_send_reply("403", "Forbidden");
return;
};
}; # INVITE to authorized PSTN
}; # authorized PSTN
# if you have passed through all the checks, let your call go to
</pre>
</blockquote>
</blockquote>
<pre wrap=""><!---->GW!
</pre>
<blockquote type="cite">
<blockquote type="cite">
<pre wrap=""> rewritehostport("212.xx.35.xx:5060");
# forward the request now
if (!t_relay()) {
sl_reply_error();
return;
};
}
----- Original Message -----
From: "Norman Brandinger" <a class="moz-txt-link-rfc2396E" href="mailto:norm@goes.com"><norm@goes.com></a>
To: "Lokesh Kumar" <a class="moz-txt-link-rfc2396E" href="mailto:lokesh@interacesso.pt"><lokesh@interacesso.pt></a>
Cc: <a class="moz-txt-link-rfc2396E" href="mailto:serusers@iptel.org"><serusers@iptel.org></a>; <a class="moz-txt-link-rfc2396E" href="mailto:users@openser.org"><users@openser.org></a>
Sent: Tuesday, November 29, 2005 8:12 PM
Subject: Re: [Users] Can anyone share his openser.cfg..in which openser
</pre>
</blockquote>
</blockquote>
<pre wrap=""><!---->is
</pre>
<blockquote type="cite">
<blockquote type="cite">
<pre wrap="">routing calls to pstn gateway
</pre>
<blockquote type="cite">
<pre wrap="">Please post a summary of the error messages that you are receiving.
Lokesh Kumar wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Hello,
I am trying to configure pstn gateway with openser.when i start
openser with default openser file it works fine, but i one direction.
i can dial on my SIP user agent from outside. but when i am using
pstn.cfg file as a openser.cfg(after rename). I am unable to even
start openser server. it gives me errors and crashed.I puts my pstn
gateway ip's in that file where requested.
Please please help
Regards
</pre>
</blockquote>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite">
<pre wrap="">------------------------------------------------------------------------
</pre>
<blockquote type="cite">
<pre wrap="">_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@openser.org">Users@openser.org</a>
<a class="moz-txt-link-freetext" href="http://openser.org/cgi-bin/mailman/listinfo/users">http://openser.org/cgi-bin/mailman/listinfo/users</a>
</pre>
</blockquote>
</blockquote>
<pre wrap="">
_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@openser.org">Users@openser.org</a>
<a class="moz-txt-link-freetext" href="http://openser.org/cgi-bin/mailman/listinfo/users">http://openser.org/cgi-bin/mailman/listinfo/users</a>
.
</pre>
</blockquote>
</blockquote>
<pre wrap=""><!---->
_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@openser.org">Users@openser.org</a>
<a class="moz-txt-link-freetext" href="http://openser.org/cgi-bin/mailman/listinfo/users">http://openser.org/cgi-bin/mailman/listinfo/users</a>
</pre>
</blockquote>
</body>
</html>