[Serusers] error 404 user not found when call to PSTN
gunawan
gun_cool182 at yahoo.com
Wed Jul 6 05:10:01 CEST 2005
--- gunawan <gun_cool182 at yahoo.com> wrote:
Hi, All..
I used ser.cfg from getting started document 4a from
www.onsip.org
but I get error 404 user not found when I tried to
call to PSTN number ( I tried 0811xxxxxx)
is something I missed in my ser.cfg????/
the following is my ser.cfg :
debug=3
fork=yes
log_stderror=yes
listen=202.xx.xxx.xxx # put your server IP
address here
port=5060
children=4
dns=no
rev_dns=no
fifo="/tmp/ser_fifo"
fifo_db_url="mysql://ser:heslo@localhost/ser"
loadmodule "/usr/local/lib/ser/modules/mysql.so"
loadmodule "/usr/local/lib/ser/modules/sl.so"
loadmodule "/usr/local/lib/ser/modules/tm.so"
loadmodule "/usr/local/lib/ser/modules/rr.so"
loadmodule "/usr/local/lib/ser/modules/maxfwd.so"
loadmodule "/usr/local/lib/ser/modules/usrloc.so"
loadmodule "/usr/local/lib/ser/modules/registrar.so"
loadmodule "/usr/local/lib/ser/modules/auth.so"
loadmodule "/usr/local/lib/ser/modules/auth_db.so"
loadmodule "/usr/local/lib/ser/modules/uri.so"
loadmodule "/usr/local/lib/ser/modules/uri_db.so"
loadmodule "/usr/local/lib/ser/modules/mediaproxy.so"
loadmodule "/usr/local/lib/ser/modules/nathelper.so"
loadmodule "/usr/local/lib/ser/modules/textops.so"
loadmodule "/usr/local/lib/ser/modules/domain.so"
loadmodule "/usr/local/lib/ser/modules/avpops.so"
loadmodule "/usr/local/lib/ser/modules/domain.so"
loadmodule "/usr/local/lib/ser/modules/permissions.so"
modparam("auth_db|permissions|uri_db|usrloc","db_url",
"mysql://ser:heslo@localhost/ser")
modparam("auth_db|uri_db|usrloc", "db_url",
"mysql://ser:heslo@localhost/ser")
modparam("auth_db", "calculate_ha1", 1)
modparam("auth_db", "password_column", "password")
modparam("nathelper", "rtpproxy_disable", 1)
modparam("nathelper", "natping_interval", 0)
modparam("mediaproxy","natping_interval", 30)
modparam("mediaproxy","mediaproxy_socket",
"/var/run/mediaproxy.sock")
modparam("mediaproxy","sip_asymmetrics","/usr/local/etc/ser/sip-
clients")
modparam("mediaproxy","rtp_asymmetrics","/usr/local/etc/ser/rtp-
clients")
modparam("usrloc", "db_mode", 2)
modparam("registrar", "nat_flag", 6)
modparam("rr", "enable_full_lr", 1)
modparam("tm", "fr_inv_timer", 27)
modparam("tm", "fr_inv_timer_avp", "inv_timeout")
modparam("permissions", "db_mode", 1)
modparam("permissions", "trusted_table", "trusted")
alias='pcr.ac.id'
route {
#
------------------------------------------------------------
-----
# Sanity Check Section
#
------------------------------------------------------------
-----
if (!mf_process_maxfwd_header("10")) {
sl_send_reply("483", "Too Many Hops");
break;
};
if (msg:len > max_len) {
sl_send_reply("513", "Message
Overflow");
break;
};
#
------------------------------------------------------------
-----
# Record Route Section
#
------------------------------------------------------------
-----
if (method=="INVITE" && client_nat_test("3"))
{
# INSERT YOUR IP ADDRESS HERE
record_route_preset("202.xx.xxx.xxx:5060;nat=yes");
} else if (method!="REGISTER") {
record_route();
};
#
------------------------------------------------------------
-----
# Call Tear Down Section
#
------------------------------------------------------------
-----
if (method=="BYE" || method=="CANCEL") {
end_media_session();
};
#
------------------------------------------------------------
-----
# Loose Route Section
#
------------------------------------------------------------
-----
if (loose_route()) {
if (has_totag() && (method=="INVITE"
|| method=="ACK"))
{
if (client_nat_test("3") ||
search
("^Route:.*;nat=yes")) {
setflag(6);
use_media_proxy();
};
};
route(1);
break;
};
#
------------------------------------------------------------
-----
# Call Type Processing Section
#
------------------------------------------------------------
-----
if (uri!=myself) {
route(5);
route(1);
break;
};
if (uri==myself) {
if (method=="ACK") {
route(6);
break;}
else if (method=="CANCEL") {
route(3);
break;
} else if (method=="INVITE") {
route(3);
break;
} else if (method=="REGISTER") {
route(2);
break;
};
lookup("aliases");
if (uri!=myself) {
route(5);
route(1);
break;
};
if (!lookup("location")) {
sl_send_reply("404", "User Not
Found");
break;
};
};
route(1);
}
route[1] {
#
------------------------------------------------------------
-----
# Default Message Handler
#
------------------------------------------------------------
-----
t_on_reply("1");
if (!t_relay()) {
if (method=="INVITE" || method=="ACK")
{
end_media_session();
};
sl_reply_error();
};
}
route[2] {
#
------------------------------------------------------------
-----
# REGISTER Message Handler
#
------------------------------------------------------------
----
sl_send_reply("100", "Trying");
if (!search("^Contact:\ +\*") &&
client_nat_test("7")) {
setflag(6);
fix_nated_register();
force_rport();
};
if (!www_authorize("pcr.ac.id","subscriber"))
{
www_challenge("pcr.ac.id","0");
break;
};
if (!check_to()) {
sl_send_reply("401", "Unauthorized");
break;
};
consume_credentials();
if (!save("location")) {
sl_reply_error();
};
}
route[3] {
#
------------------------------------------------------------
-----
# CANCEL and INVITE Message Handler
#
------------------------------------------------------------
-----
if (client_nat_test("3")) {
setflag(7);
force_rport();
fix_nated_contact();
};
if (method=="INVITE" && !allow_trusted()) {
if (!proxy_authorize("pcr.ac.id","subscriber")) {
proxy_challenge("pcr.ac.id","0");
break;
} else if (!check_from()) {
sl_send_reply("403", "Use From=ID");
break;
};
consume_credentials();
};
if (uri=~"^sip:081[0-9]*@") {
route(4);
break;
};
lookup("aliases");
if (uri!=myself) {
route(5);
route(1);
break;
};
if (!lookup("location")) {
if (uri=~"^sip:[0-9]{10}@") {
route(4);
break;
};
sl_send_reply("404", "User Not
Found");
break;
};
if (method=="CANCEL") {
route(1);
break;
};
route(5);
route(1);
}
route[4] {
#
-----------------------------------------------------------------
# PSTN Handler
#
-----------------------------------------------------------------
rewritehostport("202.xx.xxx.xxx:5060"); # INSERT YOUR
PSTN GATEWAY IP
ADDRESS
avp_write("i:45", "inv_timeout");
route(5);
route(1);
}
route[5] {
#
-----------------------------------------------------------------
# RTP Proxy Enabler
#
-----------------------------------------------------------------
if (isflagset(6) || isflagset(7)) {
use_media_proxy();
};
}
route[6] {
#
---------------------------------------------------------------------
# ACK Handler
#
---------------------------------------------------------------------
#
---------------------------------------------------------------------
# Aliases Section
#
---------------------------------------------------------------------
lookup("aliases");
if (uri!=myself) {
route(5);
route(1);
break;
};
lookup("location");
route(1);
}
onreply_route[1] {
if ((isflagset(6) || isflagset(7)) &&
(status=~"(180)|(183)|2
[0-9][0-9]")) {
if (!search("^Content-Length:\ +0")) {
use_media_proxy();
};
};
if (client_nat_test("1")) {
fix_nated_contact();
};
}
and I already configured The Cisco Router... when I
tried dial to Cisco gateway from PSTN.... for the
first
few seconds I heard sound which like the router
answered the calls, after that I received busy
tone....
Why did I receive busy tone after the router answered
my call??? Is my configuration in Router wrong????
I already use debug ccsip messages, but nothing
appeared in my console... ????? :?
could somebody help me... thanks all..... v(^_^)v
> --- Steve Blair <blairs at isc.upenn.edu> wrote:
>
> >
> >
> > gunawan wrote:
> >
> > >Hi, Steve.....
> > >
> > >I want to ask about dial-peers u provide in ur
> >
> >website(http://mit.edu/sip/sip.edu/ciscoGW.html)...
> > >
> > >
> > >
> > Just for clarification this isn't my site. This is
> > where some of the
> > documents associated
> > with the Internet2 working group of which I am a
> > member.
> >
> > >1. dial-peer voice 680010 voip
> > > description Only peer for inbound
> > to
> > >SIP Proxy 215-746-8001:8009 extensions
> > > huntstop
> > > preference 2
> > > destination-pattern 6800[1-9]
> > > progress_ind setup enable 3
> > > voice-class codec 1
> > > session protocol sipv2
> > > session target sip-server
> > > dtmf-relay rtp-nte
> > > no vad
> > >
> > >what is 680010?????? is that ur phone number????
> > >something related to phone number???
> > >
> > >
> > No it is not my phon enumber. This is an example
> > only. The value following
> > dial-peer voice is just a label to uniquely
> identify
> > that dial-peer. The
> > value
> > specified in the destination-pattern parameter is
> > what is matched
> > against the
> > dialed digits. In this example the 6800[1-9]
> > specifies a range of numbers
> > from 68001 through 68009. These are real Centrex
> > extensions within our
> > numbering plan bu tthey are test numbers reserved
> > for use by our VoIP
> > project.
> > We use 5 digits because that is how many digits
> our
> > Centrex provider hands
> > us in the call setup message.
> >
> > >2. dial-peer voice 61 pots
> > > description Only peer for outbound 5-digit 746
> > >campus calls
> > > translation-profile outgoing Prefix
> > > preference 3
> > > destination-pattern 6....
> > > direct-inward-dial
> > > port 1/0:23
> > > prefix 215746
> > >
> > >why do u use 61???? something related to ur pone
> > >number????
> > >
> > >
> > >
> > Same as above. This is an illustration. The 61 is
> > just a label . In this
> > example
> > 61 is the first dial-peer defined to handle
> outbound
> > calls to Centrex
> > extensions
> > 6xxxx.
> >
> > >3. could u give me some other example
> > configuration,
> > >bcoz I dun use PABX or analog router here.. I
> plug
> > in
> > >my Telephone line direct to VIC2FXO card...
> > >so I Wish that my SIP client can call to PSTN
> > >client...
> > >my Telephone number that I plug to cisco router
> is
> > >62(761) 53808 , 62 is country code, 761 is area
> > kode,
> > >53808 is my phone number...
> > >
> > >
> > >
> > The FXS and FXO peers are similar to those
> mentioned
> > in the document. You
> > may need to fiddle with parameters for your
> specific
> > type of connection.
> > You may need to know if you are using wink-start
> or
> > loop-start signaling,
> > what port to use, etc. A very basic setup would
> > include something like:
> >
> > voice-port 1/0/0
> > input gain 10
> > connection plar opx 32766
> > description FXO 1/0/0 5732767 for VoIP
> >
> > dial-peer voice 91 pots
> > destination-pattern 9
> > port 1/0/0
> > prefix 9
> > !
> >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >__________________________________
> > >Yahoo! Mail Mobile
> > >Take Yahoo! Mail with you! Check email on your
> > mobile phone.
> > >http://mobile.yahoo.com/learn/mail
> > >
> > >
> >
> > --
> >
> > ISC Network Engineering
> > The University of Pennsylvania
> > 3401 Walnut Street, Suite 221A
> > Philadelphia, PA 19104
> >
> >
> > voice: 215-573-8396
> >
> > 215-746-8001
> >
> > fax: 215-898-9348
> >
> > sip:blairs at upenn.edu
> >
> >
>
>
>
>
> ____________________________________________________
>
> Yahoo! Sports
> Rekindle the Rivalries. Sign up for Fantasy Football
>
> http://football.fantasysports.yahoo.com
>
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
More information about the sr-users
mailing list