Hello Everybody,
Why enum module is not capable of parsing a response to a naptr query if this response don´t have any Authority and Additional RRs?
When it receives some response like this one, it work well:
Domain Name System (response)
Transaction ID: 0xbe8b
Flags: 0x8580 (Standard query response, No error)
1... .... .... .... = Response: Message is a response
.000 0... .... .... = Opcode: Standard query (0)
.... .1.. .... .... = Authoritative: Server is an authority for domain
.... ..0. .... .... = Truncated: Message is not truncated
.... ...1 .... .... = Recursion desired: Do query recursively
.... .... 1... .... = Recursion available: Server can do recursive queries
.... .... ..0. .... = Answer authenticated: Answer/authority portion was not authenticated by the server
.... .... .... 0000 = Reply code: No error (0)
Questions: 1
Answer RRs: 1
Authority RRs: 1
Additional RRs: 1
Queries
0.9.2.9.7.0.5.1.2.1.5.3.e164.arpa: type NAPTR, class inet
Name: 0.9.2.9.7.0.5.1.2.1.5.3.e164.arpa
Type: Naming authority pointer
Class: inet
Answers
0.9.2.9.7.0.5.1.2.1.5.3.e164.arpa: type NAPTR, class inet
Name: 0.9.2.9.7.0.5.1.2.1.5.3.e164.arpa
Type: Naming authority pointer
Class: inet
Time to live: 0 time
Data length: 69
Data: u e2u+sip !^\+351215079290(.*)$!sip:\celso@sip.sapo.pt!
Authoritative nameservers
e164.arpa: type NS, class inet, ns dasilva.cet.pt
Name: e164.arpa
Type: Authoritative name server
Class: inet
Time to live: 0 time
Data length: 16
Name server: dasilva.cet.pt
Additional records
dasilva.cet.pt: type A, class inet, addr 10.112.128.6
Name: dasilva.cet.pt
Type: Host address
Class: inet
Time to live: 1 day
Data length: 4
Addr: 10.112.128.6
But when it receives a response like this one, it get a parsing error:
Domain Name System (response)
Transaction ID: 0xbe8b
Flags: 0x8580 (Standard query response, No error)
1... .... .... .... = Response: Message is a response
.000 0... .... .... = Opcode: Standard query (0)
.... .1.. .... .... = Authoritative: Server is an authority for domain
.... ..0. .... .... = Truncated: Message is not truncated
.... ...1 .... .... = Recursion desired: Do query recursively
.... .... 1... .... = Recursion available: Server can do recursive queries
.... .... ..0. .... = Answer authenticated: Answer/authority portion was not authenticated by the server
.... .... .... 0000 = Reply code: No error (0)
Questions: 1
Answer RRs: 1
Authority RRs: 0
Additional RRs: 0
Queries
0.9.2.9.7.0.5.1.2.1.5.3.e164.arpa: type NAPTR, class inet
Name: 0.9.2.9.7.0.5.1.2.1.5.3.e164.arpa
Type: Naming authority pointer
Class: inet
Answers
0.9.2.9.7.0.5.1.2.1.5.3.e164.arpa: type NAPTR, class inet
Name: 0.9.2.9.7.0.5.1.2.1.5.3.e164.arpa
Type: Naming authority pointer
Class: inet
Time to live: 0 time
Data length: 69
Data: u e2u+sip !^\+351215079290(.*)$!sip:\celso@sip.sapo.pt!
The reported error on ser debug is:
9(24255) ERROR: get_record: rdata parse error
9(24255) ERROR: get_record
9(24255) enum_query(): No NAPTR record found for 0.9.2.9.7.0.5.1.2.1.5.3.e164.arpa..
Can somebody point us a solution to this problem?
Many Thanks,
Toni
Good day,
I have a very interesting error coming back with my attempts to use the
mediaproxy module.
This is what is appearing in the syslog file:
Mar 3 13:26:37 hostthe3rd /usr/local/sbin/ser[30021]: error:
mediaproxy/sendMediaproxyCommand(): can't connect to MediaProxy
Mar 3 13:26:37 hostthe3rd /usr/local/sbin/ser[30020]: error:
mediaproxy/sendMediaproxyCommand(): can't connect to MediaProxy
I can send a full copy of my cfg file if needed, but will attach small
snippits of it that have the sections on the mediaproxy parts.
Any help on this would be greatly appreciated.
Thanks
Terry
--- Snippets from ser.cfg file ---
loadmodule "/usr/local/lib/ser/modules/mediaproxy.so"
...
modparam("mediaproxy", "natping_interval", 60)
modparam("registrar", "nat_flag", 2)
...
route {
...
if (method=="REGISTER") {
# Nat Info - Hopefully
if (client_nat_test("3")) {
setflag(2);
force_rport();
fix_contact();
};
...
route[2] {
if (method=="INVITE") {
t_on_failure("1");
} else if (method=="BYE" || method=="CANCEL") {
end_media_session();
};
if (loose_route()) {
if (method=="INVITE" || method=="ACK") {
use_media_proxy();
};
t_relay();
break;
}
if (method=="INVITE") {
record_route();
};
if (client_nat_test("3") && !search("^Recored-Route:")) {
force_rport();
fix_contact();
};
if (method=="INVITE") {
t_on_reply("1");
};
if (method=="INVITE" || method=="ACK") {
use_media_proxy();
};
# outbound requests are allowed only for registered BigU users
if (!(src_ip==216.94.106.12) &
!(proxy_authorize("hostthe3rd.rivernet.net", "subscriber"))) {
# ACK and CANCEL have no security mechanisms so they are just
# noted
if (method=="ACK" | method=="BYE") {
log(1, "LOG: failed outbound authentication for ACK granted\n");
} else if (method=="CANCEL") {
log(1, "LOG: failed outbound authentication for CANCEL granted\n");
} else if (method=="INVITE") {
setflag(1);
} else {
proxy_challenge("hostthe3rd.rivernet.net", "0");
break;
};
setflag(1);
};
# to maintain credibility of our proxy, we check From in INVITEs
# if (!src_ip==216.94.106.12 & method=="INVITE" & !check_from()) {
# log(1, "LOG: Spoofed from attempt\n");
# sl_send_reply("403", "Use From=id next time");
# break;
# };
append_hf("P-hint: OUTBOUND ON INTERNET\r\n");
setflag(1);
if (!t_relay()) {
if (method=="INVITE" || method=="ACK") {
end_media_session();
};
sl_reply_error();
break;
};
}
...
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.
Does anyone have a ser.cfg example for using the pike module to block
SIP registration attempts when 20 failures per minute have been
exceeded?
Is this even possible wike pike?
Regards,
Paul
hi all,
I set up ser + serweb + asterisk with 2 ip300 Polycom.
ip300 Polycom supporting SUBSCRIBE/NOTIFY/MESSAGE
methods.
When i set one phone offline (phone is powered and
registered in location table) i can't store IM in
msilo
table.IM is sent to phone
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/
Hi
I am looking to send inbound calls (selectively) into asterisk to rewrite
the calledID and then send back to ser to complete the call onto a IP
phone, can anyone provide any input to this.
The callerID needs to be replaced for a pbx functionality, however from
previous posts its seems as if SER is not the best place to do it, hence
the aim is to lookup th inbound number , see if its field is set to pbx,
route to asterisk replace callerID, and then send back to SER for
completion...if possible :-)
Iqbal
Hi All.
RFC3261 section 10.2.2 Removing Bindings says that when a registrar
server receives a Contact header with a value of "*" and expires=0 it
should remove all bindings for the AOR.
Do I just send back a 200OK? How do I handle this in ser.cfg?
Regards,
Paul
I installed ser on a linux box centos 3.4
I use mysql 4.10
Furthermore I am noob on Linux and Ser :(
I get this messages at boot in the messages file
Impossible the for an UA to connect to ser...
Help is welcome,
regards,
Olivier
Mar 3 17:12:19 linux ser: WARNING: could not rev. resolve 82.146.123.252
Mar 3 17:12:19 linux ser: Listening on
Mar 3 17:12:19 linux ser: 127.0.0.1 [127.0.0.1]:5060
Mar 3 17:12:19 linux ser: 82.146.123.252
[82.146.123.252]:5060
Mar 3 17:12:19 linux ser: Aliases: localhost:5060
localhost.localdomain:5060 82.146.123.252:* linux.finalcut.be:*
finalcut.be:*
Mar 3 17:12:19 linux ser: Listening on
Mar 3 17:12:19 linux ser: 127.0.0.1 [127.0.0.1]:5060
Mar 3 17:12:19 linux ser: 82.146.123.252
[82.146.123.252]:5060
Mar 3 17:12:19 linux ser: Aliases: localhost:5060
localhost.localdomain:5060 82.146.123.252:* linux.finalcut.be:*
finalcut.be:*
Mar 3 17:12:19 linux ser: Listening on
Mar 3 17:12:19 linux ser: 127.0.0.1 [127.0.0.1]:5060
Mar 3 17:12:19 linux ser: 82.146.123.252
[82.146.123.252]:5060
Mar 3 17:12:19 linux ser: Aliases: localhost:5060
localhost.localdomain:5060 82.146.123.252:* linux.finalcut.be:*
finalcut.be:*
Mar 3 17:12:19 linux ser: ser startup succeeded
Mar 3 17:12:19 linux /usr/sbin/ser[2649]: connect_db(): Can't connect
to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
Mar 3 17:12:19 linux /usr/sbin/ser[2649]: db_init(): Error while trying
to connect database
Mar 3 17:12:19 linux /usr/sbin/ser[2649]: mod_init(): Error while
connecting database
Mar 3 17:12:19 linux /usr/sbin/ser[2649]: init_mod(): Error while
initializing module usrloc
Hi all,
I have downloaded the CVS version of ser 0.8.14 and I also got a
serweb-2004-07. But the 'perms' column is dropped in ser, hence when I login
using serweb it complains about the 'perms' field that's not there. I try to
tweak the ser_mysql.sh so that when I do a ser_mysql.sh reinstall it does
not drop the perms column. However then I am unable to start ser instead. Is
anyone out there kind enough to point me to which version of ser and serweb
will work together?
I even tried a later version of serweb (0.8.12), but complains about
"error in SQL query, line 30" when i try to login. Any pointers will be of
great help.
cheers
Chiang
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();
};
}