Hi
When using the lcr module, the DB that is created namely gw, has a int
type for the ip_addr field, which means that I cant insert a IP address,
if I change the column type to say varchar (so I can enter in '.'),
then the data which is returned is a random IP address, (or what seems
to be a random one).
Any ideas
iqbal
Right, I dont have anything for 'MESSAGE' in my routes.
Would you please suggest me, what I should have in my ser.cfg to handle
'MESSAGE'
Also, if possible, would you or anybody tell me:
How can I learn more about methods
What each methods do and what are their purpose.
Any documentation out there without RFC?
Thank AJ, really appreciate your help.
MOhammad
AJ Grinnell wrote:
>Looks to me that the method is MESSAGE, but you dont have a way to
>handle MESSAGE in your routes
>
>
>On Wed, 02 Mar 2005 14:48:44 -0500, Mohammad Khan <info(a)beeplove.com> wrote:
>
>
>>What is wrong here?
>>
>>beeplove(a)projukee.com -> behind NAT outside ser using Kphone
>>mahfuz(a)projuktee.com -> behind another NAT outside ser using Windows
>>Messenger
>>
>>Could anybody show me where I am doing wrong?
>>
>>SipClient: Sending: 14:39:54.899
>>--------------------------------
>>MESSAGE sip:mahfuz@projuktee.com SIP/2.0
>>Via: SIP/2.0/TCP 10.51.0.161;branch=z9hG4bK5FEAA78B;alias
>>CSeq: 7658 MESSAGE
>>To: <sip:mahfuz@projuktee.com>
>>Content-Type: text/plain;charset=UTF-8
>>From: "Mohammad Khan" <sip:beeplove@projuktee.com>;tag=5208EA62
>>Call-ID: 1457236851(a)10.51.0.161
>>Content-Length: 9
>>User-Agent: kphone/4.1.0
>>Contact: "Mohammad Khan" <sip:beeplove@10.51.0.161;transport=tcp>
>>
>>helloooo
>>
>>SipClient: Sending to 'sip.projuktee.com:5060' (TCP)
>>SipClient: Receiving message...
>>
>>SipClient: Received: 14:40:05.024
>>---------------------------------
>>SIP/2.0 477 Unfortunately error on sending to next hop occurred (477/TM)
>>Via: SIP/2.0/TCP
>>10.51.0.161;branch=z9hG4bK5FEAA78B;alias;rport=38973;received=66.105.xxx.yyy
>>CSeq: 7658 MESSAGE
>>To: <sip:mahfuz@projuktee.com>;tag=76b43a3b01465a3cbddc081c4176c4c9-3a18
>>From: "Mohammad Khan" <sip:beeplove@projuktee.com>;tag=5208EA62
>>Call-ID: 1457236851(a)10.51.0.161
>>Server: Sip EXpress router (0.9.0 (i386/linux))
>>Content-Length: 0
>>Warning: 392 192.168.71.2:5060 "Noisy feedback tells: pid=9204
>>req_src_ip=66.105.xxx.yyy req_src_port=38973
>>in_uri=sip:mahfuz@projuktee.com
>>out_uri=sip:192.168.1.54:10745;transport=tcp via_cnt==1"
>>
>>ser.cfg
>> if (nat_uac_test("3")) {
>> # Allow RR-ed requests, as these may indicate that
>> # a NAT-enabled proxy takes care of it; unless it is
>> # a REGISTER
>> if (method == "REGISTER" || ! search("^Record-Route:")) {
>> xlog("L_DBG", "LOG: Someone trying to register
>>from private IP, rewriting\n");
>> # This will work only for user agents that
>>support symmetric
>> # communication. We tested quite many ofhem and
>>majority is
>> # smart enough to be symmetric. In some phones
>>it takes a configuration
>> # option. With Cisco 7960, it is called
>>NAT_Enable=Yes, with kphone it is
>> # called "symmetric media" and "symmetric
>>signalling".
>> fix_nated_contact(); # Rewrite contact with
>>source IP of signalling
>> if (method == "INVITE" || method == 'NOTIFY') {
>> fix_nated_sdp("1"); # Add
>>direction=active to SDP
>> };
>> force_rport(); # Add rport parameter to topmost Via
>> setflag(6); # Mark as NATed
>> };
>> };
>>
>> # 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=~"projuktee.com") {
>>
>> if (method=="REGISTER") {
>>
>> if (!www_authorize("projuktee.com", "subscriber")) {
>> www_challenge("projuktee.com", "1");
>> break;
>> };
>>
>> save("location");
>> break;
>> };
>>
>> if (method=="PUBLISH") {
>> if (!t_newtran()) {
>> xlog("L_DBG", "newtran error\n");
>> sl_reply_error();
>> };
>> handle_publish("registrar");
>> break;
>> };
>>
>> lookup("aliases");
>> if (!uri=~"projuktee.com") {
>> append_hf("P-hint: outbound alias\r\n");
>> route(1);
>> break;
>> };
>>
>> # native SIP destinations are handled using our USRLOC DB
>> if (!lookup("location")) {
>> sl_send_reply("404", "Not Found");
>> break;
>> };
>> };
>> append_hf("P-hint: usrloc applied\r\n");
>> route(1);
>>}
>>
>>route[1]
>>{
>>
>> # !! Nathelper
>> #if (uri=~"[@:](192\.168\.|10\.|172\.(1[6-9]|2[0-9]|3[0-1])\.)"
>>&& !search("^Route:")){
>> # sl_send_reply("479", "We don't forward to private IP >
>> >addresses");
>> # break;
>> #};
>>
>> # if client or server know to be behind a NAT, enable relay
>> if (isflagset(6)) {
>> force_rtp_proxy();
>> };
>>
>> ##################
>> # NAT processing of replies; apply to all transactions (for example,
>> # re-INVITEs from public to private UA are hard to identify as
>> # NATed at the moment of request processing); look at replies
>> #t_on_reply("1");
>>
>> if (isflagset(6) && status =~ "(183)|2[0-9][0-9]") {
>> fix_nated_contact();
>> force_rtp_proxy();
>> # otherwise, is it a transaction behind a NAT and we did not
>> # know at time of request processing ? (RFC1918 contacts)
>> } else if (nat_uac_test("1")) {
>> fix_nated_contact();
>> };
>> ################
>>
>> # send it out now; use stateful forwarding as it works reliably
>> # even for UDP2TCP
>> if (!t_relay()) {
>> sl_reply_error();
>> };
>>}
>>
>>_______________________________________________
>>Serusers mailing list
>>serusers(a)lists.iptel.org
>>http://lists.iptel.org/mailman/listinfo/serusers
>>
>>
>>
I want to test someone's post about NATHELPER/RTPPROXY setting. He tested
with 0.8.99-devXX.
How do I get it? I tried to use cvs to get by tag without success.
Thank you!
Hi
i was looking at the LCR module, and have tried to cmpile it later into
my running ser, using make modules.
however I get the following errors:
lcr_mod.c: In function `load_gws':
lcr_mod.c:570: error: `HDR_FROM_F' undeclared (first use in this
function)
lcr_mod.c:570: error: (Each undeclared identifier is reported only once
lcr_mod.c:570: error: for each function it appears in.)
lcr_mod.c: In function `next_gw':
lcr_mod.c:671: error: structure has no member named `route_mode'
lcr_mod.c: In function `load_contacts':
lcr_mod.c:817: error: `nr_branches' undeclared (first use in this
function)
lcr_mod.c:830: error: too many arguments to function `next_branch'
lcr_mod.c:852: error: too many arguments to function `next_branch'
lcr_mod.c: In function `next_contacts':
lcr_mod.c:934: error: structure has no member named `route_mode'
make[1]: *** [lcr_mod.o] Error 1
make[1]: Leaving directory `/sip/srcfiles/sip_router/modules/lcr'
Has anyone come across this
tks
Iqbal
Good day,
I am trying to get the sample config of the media proxy up and going.
I have added the few modules needed to my config and replaced my entire
route section with the current route section from the config file in the
mediaproxy modules config directory.
Once I start it up I get the following error:
/var/log/debug:Mar 2 11:52:06 hostthe3rd ser: find_export: <is_from_local>
not found
/var/log/debug:Mar 2 11:52:06 hostthe3rd ser: find_export:
<is_uri_host_local> not found
I have the module mediaproxy being loaded earlier in the debug file. These 2
lines are the only lines coming up as being not found commands in any
module.
Below is the copy of the config I am running, I do realize that it is a bit
full of other items and will be hopefully adding more to the config once I
get this part working.
Is there something that I am missing? I am running ser-0.8.14 on a Linux
system. My ultimate goal is to have ser running to allow connections from
both Internet IP'd phones and Nat based phones with voicemail support using
sems.
Terry
--- Attached ser.cfg file ---
# ------------- version 0.8.11-0
# ------------- Initial global variables
debug=7
fork=yes
log_stderror=no
listen=216.94.106.12
listen=127.0.0.1
# hostname matching an alias will satisfy the condition uri==myself".
# dns - Uses dns to check if it is necessary to add a "received=" field
# to a via. Default is no.
# rev_dns - Same as dns but use reverse DNS.
dns=no
rev_dns=no
port=5061
children=4
# check_via - Turn on or off Via host checking when forwarding replies.
# Default is no. arcane. looks for discrepancy between name and
# ip address when forwarding replies.
check_via=yes
# syn_branch - Shall the server use stateful synonym branches? It is
# faster but not reboot-safe. Default is yes.
#syn_branch=yes
# memlog - Debugging level for final memory statistics report. Default
# is L_DBG -- memory statistics are dumped only if debug is set high.
memlog=3
# sip_warning - Should replies include extensive warnings? By default
# yes, it is good for trouble-shooting.
sip_warning=yes
# fifo - FIFO special file pathname
fifo="/tmp/ser_fifo"
# server_signature - Should locally-generated messages include server's
# signature? By default yes, it is good for trouble-shooting.
server_signature=yes
# reply_to_via - A hint to reply modules whether they should send reply
# to IP advertised in Via. Turned off by default, which means that
# replies are sent to IP address from which requests came.
reply_to_via=no
# user | uid - uid to be used by the server. 99 = nobody.
#uid="sip"
# group | gid - gid to be used by the server. 99 = nobody.
gid="sip"
# mhomed -- enable calculation of outbound interface; useful on
# multihomed servers.
mhomed=0
# ------------- external module loading
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/acc.so"
loadmodule "/usr/local/lib/ser/modules/exec.so"
loadmodule "/usr/local/lib/ser/modules/group.so"
loadmodule "/usr/local/lib/ser/modules/print.so"
loadmodule "/usr/local/lib/ser/modules/textops.so"
loadmodule "/usr/local/lib/ser/modules/uri.so"
loadmodule "/usr/local/lib/ser/modules/mediaproxy.so"
# ------------- tm parameters
modparam("tm", "fr_timer", 12)
modparam("tm", "fr_inv_timer", 24)
# ------------- rr parameters
# set ";lr" tag to ";lr=true"
modparam("rr", "enable_full_lr", 1)
# ------------- accounting parameters
modparam("acc", "db_missed_flag", 3)
modparam("acc", "db_flag", 1)
modparam("acc", "log_missed_flag", 3)
modparam("acc", "log_level", 1)
modparam("acc", "log_flag", 1)
modparam("acc", "db_url", "sql://ser:2002suckz@localhost/ser")
modparam("acc", "report_cancels", 0)
modparam("acc", "report_ack", 0)
modparam("acc", "log_fmt", "cdfimorstup")
modparam("acc", "failed_transactions", 1)
# ------------- usrloc parameters
# 2 enables write-back to persistent mysql storage for speed
# disable=0, write-through=1
modparam("usrloc", "db_mode", 2)
# minimize write back window - default is 60 seconds
modparam("usrloc", "timer_interval", 10)
# database location
modparam("usrloc", "db_url", "sql://ser:2002suckz@localhost/ser")
# ------------- auth parameters
# database location
modparam("auth_db", "db_url", "sql://ser:2002suckz@localhost/ser")
# allows clear text passwords in the mysql database
modparam("auth_db", "calculate_ha1", yes)
# name of password column in mysql database
modparam("auth_db", "password_column", "password")
# Example ser.cfg for mediaproxy functionality
#loadmodule "/usr/local/lib/ser/modules/registrar.so"
#loadmodule "/usr/local/lib/ser/modules/domain.so"
modparam("mediaproxy", "natping_interval", 60)
modparam("registrar", "nat_flag", 2)
route{
if (!mf_process_maxfwd_header("10")) {
if (method!="ACK") {
sl_send_reply("483", "Too many hops");
};
break;
};
if (msg:len >= max_len) {
if (method!="ACK") {
sl_send_reply("513", "Message too big");
};
break;
};
if (method=="REGISTER") {
if (is_from_local()) {
# Mark as NAT'ed
if (client_nat_test("3")) {
setflag(2);
force_rport();
fix_contact();
};
if (!www_authorize("", "subscriber")) {
www_challenge("", "0");
break;
} else if (!check_to()) {
sl_send_reply("403", "Username!=To not allowed");
break;
};
if (!save("location")) {
sl_reply_error();
};
} else {
sl_send_reply("403", "This domain is not served here");
};
break;
};
if (method=="INVITE") {
if (!(is_from_local() || is_uri_host_local())) {
sl_send_reply("403", "Relaying is forbidden");
break;
};
t_on_failure("1");
} else if (method == "BYE" || method == "CANCEL") {
end_media_session();
};
if (loose_route()) {
if (method=="INVITE" || method=="ACK") {
use_media_proxy();
};
# end media session for BYE and CANCEL is done above
# before entering the loose route. no need to call it here
t_relay();
break;
};
# Force subsequent messages to pass trough this proxy
if (method == "INVITE") {
record_route();
};
if (client_nat_test("3") && !search("^Record-Route:")) {
# Mark as NAT'ed
force_rport();
fix_contact();
};
if (method=="INVITE") {
t_on_reply("1");
};
if (is_uri_host_local()) {
if (!lookup("location")) {
sl_send_reply("404", "User not found");
break;
};
};
if (method=="INVITE" || method=="ACK") {
use_media_proxy();
};
if (!t_relay()) {
if (method=="INVITE" || method=="ACK") {
end_media_session();
};
sl_reply_error();
};
}
failure_route[1] {
end_media_session();
}
onreply_route[1] {
if (status=~"(183)|(2[0-9][0-9])") {
if (client_nat_test("1")) {
fix_contact();
};
use_media_proxy();
};
}
hi all,
I set up ser + serweb + asterisk with 2 ip300 Polycom.
ip300 Polycom support SUBSCRIBE/NOTIFY/MESSAGE
methods.
When i set one phone offline (phone is powered and
registerd in location table) i can't store IM in msilo
table.
if i switch off phone IM is stored in msilo table but
when I switch on the phone IM is not dumped to phone.
Can I use presence instead of location in order to
store IM ?
Harry
Découvrez le nouveau Yahoo! Mail : 250 Mo d'espace de stockage pour vos mails !
Créez votre Yahoo! Mail sur http://fr.mail.yahoo.com/
I just spoke with an enginee from a manufacturer of the WorldAccxx
telephone adapter and he told me that my SIP proxy was in voliation of
RFC3261.
Below is a SIP registration against my ser-0.9 proxy. I'm using media
proxy for NAT traversal and he says that my 200 OK is not valid and
therefore their IAD disregards the 200 OK response.
The problem he claims is with the <Contact:> header in the 200 OK. SER
has rewritten the contact becase his IAD is NATed. Should I not be
doing this?
The actual problem is that when their IAD is NATed the device looses
its registration with ser because (they claim) that the REGISTER
message they send has a <Contact> header iwith a different IP than
what ser sends back in the 200 OK message.
They referenced section 10.2.4 and 19.1.4 in RFC3261.
Can anyone confirm or reject their claims?
Please help.
Paul
REGISTER sip:sip.mycompany.com:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.0.180;branch=z9hG4bKbb013e10d
Max-Forwards: 70
Content-Length: 0
To: Accxx <sip:1000@sip.mycompany.com:5060>
From: Accxx <sip:1000@sip.mycompany.com:5060>;tag=1eb7db0b344ac92
Call-ID: bd4da0ebfe98297597243a92b1b0f868(a)192.168.0.180
CSeq: 392547129 REGISTER
Contact: Accxx <sip:1000@192.168.0.180;user=phone>;expires=200
Allow: NOTIFY
Allow: REFER
Allow: OPTIONS
Allow: INVITE
Allow: ACK
Allow: CANCEL
Allow: BYE
User-Agent: WATA200 Callctrl/1.5.1.1 MxSF/v3.2.6.26
SIP/2.0 100 Trying
Via: SIP/2.0/UDP
192.168.0.180;branch=z9hG4bKbb013e10d;rport=36323;received=65.77.37.2
To: Accxx <sip:1000@sip.mycompany.com:5060>
From: Accxx <sip:1000@sip.mycompany.com:5060>;tag=1eb7db0b344ac92
Call-ID: bd4da0ebfe98297597243a92b1b0f868(a)192.168.0.180
CSeq: 392547129 REGISTER
Content-Length: 0
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP
192.168.0.180;branch=z9hG4bKbb013e10d;rport=36323;received=65.77.37.2
To: Accxx <sip:1000@sip.mycompany.com:5060>;tag=bf952ed189d8425c881b09485aa0b6f1.bdad
From: Accxx <sip:1000@sip.mycompany.com:5060>;tag=1eb7db0b344ac92
Call-ID: bd4da0ebfe98297597243a92b1b0f868(a)192.168.0.180
CSeq: 392547129 REGISTER
WWW-Authenticate: Digest realm="sip.mycompany.com",
nonce="42025161902f6f6af11f01f0a93ad2877e606bbc"
Content-Length: 0
REGISTER sip:sip.mycompany.com:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.0.180;branch=z9hG4bK88fcb4e76
Max-Forwards: 70
Content-Length: 0
To: Accxx <sip:1000@sip.mycompany.com:5060>
From: Accxx <sip:1000@sip.mycompany.com:5060>;tag=1eb7db0b344ac92
Call-ID: bd4da0ebfe98297597243a92b1b0f868(a)192.168.0.180
CSeq: 392547130 REGISTER
Contact: Accxx <sip:1000@192.168.0.180;user=phone>;expires=200
Allow: NOTIFY
Allow: REFER
Allow: OPTIONS
Allow: INVITE
Allow: ACK
Allow: CANCEL
Allow: BYE
Authorization:Digest
response="18aabe984a6d89cc537cec9ce43b198d",username="1000",realm="sip.mycompany.com",nonce="42025161902f6f6af11f01f0a93ad2877e606bbc",uri="sip:sip.mycompany.com:5060"
User-Agent: WATA200 Callctrl/1.5.1.1 MxSF/v3.2.6.26
SIP/2.0 100 Trying
Via: SIP/2.0/UDP
192.168.0.180;branch=z9hG4bK88fcb4e76;rport=36323;received=65.77.37.2
To: Accxx <sip:1000@sip.mycompany.com:5060>
From: Accxx <sip:1000@sip.mycompany.com:5060>;tag=1eb7db0b344ac92
Call-ID: bd4da0ebfe98297597243a92b1b0f868(a)192.168.0.180
CSeq: 392547130 REGISTER
Content-Length: 0
SIP/2.0 200 OK
Via: SIP/2.0/UDP
192.168.0.180;branch=z9hG4bK88fcb4e76;rport=36323;received=65.77.37.2
To: Accxx <sip:1000@sip.mycompany.com:5060>;tag=bf952ed189d8425c881b09485aa0b6f1.5e63
From: Accxx <sip:1000@sip.mycompany.com:5060>;tag=1eb7db0b344ac92
Call-ID: bd4da0ebfe98297597243a92b1b0f868(a)192.168.0.180
CSeq: 392547130 REGISTER
Contact: <sip:1000@65.77.37.2:36323;user=phone>;expires=200,
<sip:1000@65.77.37.2:36235;user=phone>;expires=3
Content-Length: 0
Hi, All:
Please forgive me for such stupid questions,
Whether it is a must that rtpprox must be located on the same machine
with the SER.
I want to enable the SER to support both the video and audio port
modification
when SIP UA are behind the NAT. To do that what files should I
modify(modules/nathelper/
nathelper.c???), but I don't know the protocol between the rtpproxy and
SER. It is very kind
of you to help me on that!
Last day I used the SER on the iptel.org to test the nathelp module,
my twu UA is located
behind the NAT. one UA is registered on my SER server, the other on
iptel.org'ser. After
establishing connection, I checked the message log, I found the SER
modified the SDP's c
IP value to iptel.org's address(195.37.77.99). If I am right, the ser
can know whether
both UA are located within the same NAT clouds by examining the source
IP of SIP message,
why does it modified its SDP c value under such situations.
Thanks for your kind help and advices!
Best Regards.
Sun Zongjun
Hi sir,
may i introduce myself ANIL KUMAR PAL currently i am
working with softphone actually the problem is that my
softphone is configured with ser and so many SIP
server is available in the market like ASTREK SIP
SERVER and MORA SIP SERVER so pls tell what is changes
in my project so that my application is compatable
with other SIP server like as i have written in my
mail so pls let me know the soultion ia m waiting your
positive respone .
thnax a lot
your's ANIL KUMAR PAL
__________________________________
Celebrate Yahoo!'s 10th Birthday!
Yahoo! Netrospective: 100 Moments of the Web
http://birthday.yahoo.com/netrospective/