Hi,
Please help! I am trying to do call forwarding when user not online. But I
run the route below, the call went through for the PSTN gateway but I can
see multiple request. Anyone knoe what is happening ...thanks.!!
route{
# 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") {
save("location");
break;
};
};
lookup("aliases");
if (uri=~"sip:1234[0-9]+@iptel.org") {
rewritehostport("1.2.3.4:5060");
# first dump the message to a file using cat command
exec_msg("printenv SRCIP > /tmp/exectest.txt; cat >>
/tmp/exectest.txt");
# and then rewrite URI using external utility
# note that the last echo command trashes input parameter
if (exec_dset("echo $SIP_RURI ;echo SIP_SRCIP ;echo>/dev/null")) {
sl_send_reply("300", "Redirect");
} else {
sl_reply_error();
log(1, "alas, rewriting failed\n");
};
};
if (!uri==myself) {
t_relay();
break;
};
if (method=="INVITE") {
fix_nated_sdp("3");
append_hf("P-hint:Invite");
# native SIP destinations are handled using our USRLOC DB
if (!lookup("location")) {
sl_send_reply("", "Connecting");
break;
};
};
if (method=="ACK"){
sl_send_reply("", "ACK");
};
# forward to current uri now; use stateful forwarding; that
# works reliably even if we forward from TCP to UDP
if (!t_relay()) {
sl_reply_error();
break;
};
}
# all incoming replies for t_onrepli-ed transactions enter here
onreply_route[1] {
sdp_mangle_port("-12000");
if (isflagset(6) && status=~"2[0-9][0-9]"){
append_hf("First Route");
fix_nated_contact();
fix_nated_sdp("1");
force_rtp_proxy();
} else if (status=~"2[0-9][0-9]"){
if (uri=~"sip:019[0-9]+@iptel.org") {
append_hf("019");
fix_nated_contact();
fix_nated_sdp("3");
}
else{
append_hf("2nd Route");
fix_nated_contact();
fix_nated_sdp("2");
fix_nated_sdp("3");
force_rtp_proxy();
}
} else if (status=~"3[0-9][0-9]"){
append_hf("019");
fix_nated_contact();
fix_nated_sdp("3");
};
}
hi all,
here is my vm_test.sh:
here is the reply from /var/log/messages:
Apr 29 14:34:51 serveur1 /usr/sbin/ser[3657]: ERROR: fifo_uac:
Content-Type missing
I'd like to test vm module and sems
???
Harry
----------------------------------------------------
#!/bin/bash
loop=5
max_speed=30
SIP_DST="sip:harry@192.168.0.1"
alarm=0
SER_FIFO="/tmp/ser_fifo"
SIP_FROM="sip:webmaster@192.168.0.1"
cat > $SER_FIFO << EOF
:t_uac_dlg:am_fifo
INVITE
$SIP_DST
$SIP_DST
<$SIP_DST>
<$SIP_FROM>
12345-tag-12345
100
1234576098621
Content-Type: application/sdp
Contact: <sip:webmaster@192.168.0.11:5060>
v=0
o=username 0 0 IN IP4 192.168.0.1
s=session
c=IN IP4 192.168.0.1
t=0 0
m=audio 30000 RTP/AVP 0
a=rtpmap:0 PCMU/8000
.
EOF
--------------------------------------------------------------
Hello, serusers,
I have configured correctly SERWEB like mentionned in admin guide but:
I type correctly the UN & password and click login, but no result displayed (the progress indicator in the buttom of the page can't continue).
NB: I can access the admin interface when i type correctly the Admin name and password.
Can someone help me to resolve this problem.
Best regards.
Hi Andy,
Thank you for your email. I have having no more pending branches in the sip
message when I do a PC to PSTN through aliases.
PLease help.
Regards,
Shirley
> -----Original Message-----
> From: Andreas Granig [SMTP:a.granig@inode.at]
> Sent: Tuesday, April 27, 2004 10:50 PM
> To: Shirley
> Subject: Re: [Serusers] Using parameters from the database
>
> Shirley wrote:
> > Can I ask you another question, if I were to forward to PSTN gateway can
> i
> > still use this method?If yes is the coding the same? Thanks!!
>
> Yes of course. The host part of the aliased URI points to the new
> location (e.a. a PSTN-GW or another SIP-Proxy), and the Userpart is the
> Username/Number to forward to. You can just use t_relay() for forwarding
> then.
>
> hth,
> Andy
Hi,
I am testing ser with Asterisk which sends an OPTIONS
method every minute. The uri is sip:<my-ip-address>.
What's the proper way to handle this?
Thanks,
Richard
__________________________________
Do you Yahoo!?
Win a $20,000 Career Makeover at Yahoo! HotJobs
http://hotjobs.sweepstakes.yahoo.com/careermakeover
Hi,
In a multiple domain setup, are two functions
uri==myself and is_uri_host_local the same thing?
is_uri_host_local is not presented in the README, but
is exported. Is it a obsolete function?
Thanks,
Richard
__________________________________
Do you Yahoo!?
Win a $20,000 Career Makeover at Yahoo! HotJobs
http://hotjobs.sweepstakes.yahoo.com/careermakeover
Hello,
I wonder if it is a bug, non standard compliance or whatever
- When the PSTN side initiate a call to the IP leg, and the PSTN side
hang up first, the Cisco gateway issues a BYE message.
- When the IP side initiates the call to PSTN, and the PSTN hangs up
first, the Cisco does NOT issue a BYE message.
I want the Cisco to issue a BYE when the PSTN side hangs up if is
initiated on either leg.
I'm running a 3640 with this image: c3640-js-mz.122-15.T.bin
best regards,
hw
Hi all
I am trying nathelper with rtpproxy to let client behind nat/firewall can make a call ,
I have some questions...
(1)
Client A (kphone 3.14)------------------iptel.org-----------------------------NAT-------------------------Client B (kphone 3.14)
61.217.126.64 195.37.77.101 61.217.xxx.xxx 77.77.77.17
B call A , and the call has setup , also , both A and B send rtp packet to 195.37.77.101 , and receive in the port which describe in SDP
but both client can't receive any voice ... maybe it's something wrong in client ...
so is anyone have try if this scenario can work ? or iptel.org not support client behind NAT/ firewall ??
(2)
before trying (1) , i have build the environment
Client A (kphone 3.14)-------------SIP server SER + Rtpproxy ---------------------NAT/Firewall-------------------------Client B (kphone 3.14)
private IP public IP public IP private IP
whatever A call B , or B call A , the call can setup , but after forwarding by SER
the SDP didn't modify correctly , all the same as client send
it should modify to Ser server's ip and port , but it seems not...
i think maybe is my ser.cfg has some mistake
could anyone give some idea where should i add or modify something ?
here is my ser.cfg which refered to (http://www.informatik.uni-bremen.de/~prelle/terena/cookbook/main/ch04s07.ht…)
regards
jimmy
============================================================================================
#
# $Id: ser.cfg,v 1.21.4.1 2003/11/10 15:35:15 andrei Exp $
#
# simple quick-start config script
#
# ----------- global configuration parameters ------------------------
#debug=3 # debug level (cmd line: -dddddddddd)
#fork=yes
#log_stderror=no # (cmd line: -E)
#/* Uncomment these lines to enter debugging mode
debug=7
#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/ser_fifo"
# ------------------ module loading ----------------------------------
# Uncomment this if you want to use SQL database
#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"
#++++++++++ jimmy added ++++++++++++++++++
loadmodule "/usr/local/lib/ser/modules/textops.so"
loadmodule "/usr/local/lib/ser/modules/nathelper.so"
#----------------------------------------------------
# Uncomment this if you want digest authentication
# mysql.so must be loaded !
#loadmodule "/usr/local/lib/ser/modules/auth.so"
#loadmodule "/usr/local/lib/ser/modules/auth_db.so"
# ----------------- setting module-specific parameters ---------------
#++++++++++ jimmy added ++++++++++++++++++
#we will you flag 6 to mark NATed contacts
modparam("registrar","nat_flag",6)
#Enable NAT pinging
modparam("nathelper","natping_interval",3)
#ping only contacts that are known to be behind NAT
modparam("nathelper","ping_nated_only",1)
#----------------------------------------------------
# -- 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)
# ------------------------- request routing logic -------------------
# main routing logic
route{
#++++++++++ jimmy added ++++++++++++++++++
if(nat_uac_test("3"))
{
if((method == "REGISTER") || !(search("^Record-Route:")))
{
log("LOG:Someone trying to register from private IP, rewriting\n");
fix_nated_contact();
if(method == "INVITE")
{
fix_nated_sdp("3");
};
force_rport();
setflag(6);
};
};
#----------------------------------------------------
# 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;
};
# 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("iptel.org", "subscriber")) {
# www_challenge("iptel.org", "0");
# break;
# };
save("location");
break;
};
# native SIP destinations are handled using our USRLOC DB
if (!lookup("location")) {
sl_send_reply("404", "Not Found");
break;
};
};
# forward to current uri now; use stateful forwarding; that
# works reliably even if we forward from TCP to UDP
if (!t_relay()) {
sl_reply_error();
};
}
#++++++++++ jimmy added +++++++++++++++++++++
route[1]
{
if(uri=~"[@:](192\.168\.|10\.|172\.16)" && !search("^Route:"))
{
sl_send_reply("479","we don't forward to private IP address");
break;
};
if(isflagset(6))
{
force_rtp_proxy();
t_on_reply("1");
append_hf("P-Behind-NAT: Yes\r\n");
}
if(!t_relay())
{
sl_reply_error();
break;
}
}
onreply_route[1]
{
if(status =~ "(183)|2[0-9][0-9]")
{
fix_nated_contact();
force_rtp_proxy();
};
}
#----------------------------------------------------
============================================================================================
Hi!
I'm not sure about this, but I think the problem is that the hashed
password also include an random generated string.
What you can do is to authenticate only on the first server and trust
the request automaticall if REGISTER request comes from the other server.
regards,
klaus
John LI wrote:
> Hi Klaus,
>
> Thanks for your response, I have another question:
> I installed 2 Ser on the different machine, and add the 2 user 3001 3002 on
> both Ser. I configuer 2 SIP client to Regiseter to the same ser, there is no
> problem to make call to each other, but when I try to registered 2 sip
> client on the different machine, the problem happend.
>
> For example, 2 ser server IP is A=192.168.0.10 and B=192.168.0.20
>
> I changed ser.cfg in ser A as
>
> if (!src_ip==192.168.0.20) {
> log("*****replicate***");
> t_replicate("192.168.0.20", "5060");
>
> and on B
>
> if (!src_ip==192.168.0.10) {
> log("*****replicate***");
> t_replicate("192.168.0.10", "5060");
>
> And when I try to regiseter SIP client on A, it can register on A, then the
> Ser A will send a Register request to B like this:
>
> U 192.168.0.10:5060 -> 192.168.0.20:5060
> REGISTER sip:ny1.signalc.com SIP/2.0..Record-Route:
> <sip:192.168.0.10;ftag=35a
> 3@ny1.signalc.com..From:
> 3001<sip:3001@ny1.signalc.com;user=phone>;tag=35adc-1
> =phone>..CSeq: 102 REGISTER..Via: SIP/2.0/UDP
> 192.168.0.10;branch=z9hG4bK247f.
> 060..Contact: <sip:3001@192.168.0.30:5060;user=phone>..Max-Forwards:
> 69..User-
> ..Expires: 900..Supported: timer..Authorization: Digest
> username="3001",realm=
>
> ,response="4890af0391f9985e7d28a4f98e9132ab",nonce="4064805a3152161d3bb4ba9d
> 50
>
> U 192.168.0.20:5060 -> 192.168.0.10:5060
> SIP/2.0 401 Unauthorized..Call-ID:
> 55af-6a37c-4000fbb3@ny1.signalc.com..From:
> ag=35adc-1408..To:
> 3001<sip:3001@ny1.signalc.com;user=phone>;tag=b27e1a1d33761
> R..Via: SIP/2.0/UDP 192.168.0.10;branch=z9hG4bK247f.7ee9ba07.0..Via:
> SIP/2.0/U
> est realm="ny1.signalc.com",
> nonce="406490a267fa70c71b2e27a481dfbde8b5fd6bd4".
> inux))..Content-Length: 0..Warning: 392 192.168.0.20:5060 "Noisy feedback
> tell
> c_port=5060 in_uri=sip:ny1.signalc.comout_uri=sip:ny1.signalc.com
> via_cnt==2"
>
>
> Ser A will try to register 3001 to Ser B, but Ser B dose not authenticate
> the 3001 although the 3001 has the same user ID and Password on the Ser B.
>
> I wonder if the modification on the ser.cfg is correct, should I do more
> things for this?
>
> Thanks
>
> John
>
>
> ----- Original Message -----
> From: "Klaus Darilion" <klaus.mailinglists(a)pernau.at>
> To: "John LI" <john(a)signalc.com>
> Cc: "Serusers" <serusers(a)lists.iptel.org>
> Sent: Friday, March 26, 2004 4:36 AM
> Subject: Re: [Serusers] The problem when enable the MySql
>
>
>
>>Hi John!
>>
>>comments inline
>>
>>PS: Please always cc: to the list.
>>
>>John LI wrote:
>>
>>
>>>Hi Klaus,
>>>
>>>Thanks for your instaruction, after I do all those steps, the Ser with
>
> the
>
>>>Digest creditial works fine now.
>>>
>>>My Questions is, after I complile and installed the ser, is the Ser
>
> database
>
>>>installed?
>>
>>No, the ser database is not installed by "make install". You have to use
>>the ser_mysql.sh script to create the database.
>>
>>
>>>Need I to use the serctl create to create the database ser
>>>database again(from my practice, the Ser DB has been setup after all
>
> those
>
>>>steps), need I to install the ser-mysql-0.8.12-0 RPM package again?
>>
>>Once you have created the databse, you inly have to re-create it, if you
>>are using a new version of ser which uses a new format.
>>
>>If you compile ser from source, you don't need any of the rpm packages.
>>
>>regards,
>>klaus
>>
>>
>>>Thanks for you advice again.
>>>
>>>John
>>>
>>>
>>>
>>>----- Original Message -----
>>>From: "Klaus Darilion" <klaus.mailinglists(a)pernau.at>
>>>To: "John LI" <john(a)signalc.com>
>>>Cc: <serusers(a)lists.iptel.org>
>>>Sent: Thursday, March 25, 2004 3:07 AM
>>>Subject: Re: [Serusers] The problem when enable the MySql
>>>
>>>
>>>
>>>
>>>>compile ser by calling make:
>>>># make
>>>>
>>>>compile ser modules by calling:
>>>># make modules
>>>>
>>>>compile mysql ser modules by calling:
>>>># make modules modules=modules/mysql
>>>>
>>>>install ser:
>>>># make install
>>>>
>>>>install mysql module:
>>>># cp modules/mysql/mysql.so /usr/local/lib/ser/modules/
>>>>
>>>>
>>>>regards,
>>>>klaus
>>>>
>>>>John LI wrote:
>>>>
>>>>
>>>>>Dear Sir,
>>>>>
>>>>>I am installing the Ser on Redhat 9.0 platform.
>>>>>
>>>>>I download ser-0.8.12_src.tar.gz, and compile the souce code, and
>>>>>install it.
>>>>>The Ser working fine with out the MySQL enabled.
>>>>>
>>>>>I download the MySQL packges from www.mysql.com <http://www.mysql.com>
>>>>>
>>>>>MySQL-client-4.0.18-0.i386.rpm
>>>>>MySQL-server-4.0.18-0.i386.rpm
>>>>>MySQL-shared-4.0.18-0.i386.rpm
>>>>>
>>>>>and install them, and Mysql can start up.
>>>>>
>>>>>After this, I download the ser-0.8.12_src.tar.gz
>>>>>
>>>>>and try to install it, and it give me out the error messge
>>>>>error: Failed dependencies:
>>>>> ser = 0.8.12 is needed by ser-mysql-0.8.12-0
>>>>>
>>>>>I don't know what this means.
>>>>>
>>>>>BTW, when i enable the MySQL in ser.cfg, it give out the following
>
> error
>
>>>>>messages:
>>>>>0(25007) ERROR: load_module: could not open module
>>>>></usr/local/lib/ser/modules/mysql.so>:
>>>>>/usr/local/lib/ser/modules/mysql.so: cannot open shared object file: No
>>>>>such file or directory
>>>>>I wonder how can I get the mysql.so module.
>>>>>
>>>>>I am the fresh man in using Ser, please give me some instructions.
>>>>>
>>>>>John
>>>>>
>>>>>
>>
>>>>------------------------------------------------------------------------
>>>>
>>>>>_______________________________________________
>>>>>Serusers mailing list
>>>>>serusers(a)lists.iptel.org
>>>>>http://lists.iptel.org/mailman/listinfo/serusers
>>>>
>>>>
>>>
>>
>
>