After some hassles I succesfully installed pdt module.
Now when I compose 22220 before a number the uri is rewritten with "iptel.org", here is a transcript:
11(14926) SIP Request: 11(14926) method: <INVITE> 11(14926) uri: sip:222220555555@sferica.net 11(14926) version: <SIP/2.0> 11(14926) parse_headers: flags=1 11(14926) Found param type 235, <rport> = <n/a>; state=6 11(14926) Found param type 232, <branch> = <z9hG4bK6D151D75538C4C19987ADC66F1B9505F>; state=16 11(14926) end of header reached, state=5 11(14926) parse_headers: Via found, flags=1 11(14926) parse_headers: this is the first via 11(14926) After parse_msg... 11(14926) preparing to run routing scripts... 11(14926) DEBUG : is_maxfwd_present: searching for max_forwards header 11(14926) parse_headers: flags=128 11(14926) end of header reached, state=9 11(14926) DEBUG: get_hdr_field: <To> [32]; uri=[sip:222220555555@sferica.net] 11(14926) DEBUG: to body [sip:222220555555@sferica.net ] 11(14926) get_hdr_field: cseq <CSeq>: <34431> <INVITE> 11(14926) DEBUG: is_maxfwd_present: value = 70 11(14926) PDT: update_new_uri: sip:555555@iptel.org
but, in the software client what I get is a "403 No relay" error.
I'cant understand if the error is coming from my server, or from iptel.org ....
Here is my config, any help will be appreciated, tnx !
debug=7 fork=yes log_stderror=yes alias=sferica.net
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 ----------------------------------
loadmodule "/usr/lib/ser/modules/mysql.so" loadmodule "/usr/lib/ser/modules/sl.so" loadmodule "/usr/lib/ser/modules/tm.so" loadmodule "/usr/lib/ser/modules/rr.so" loadmodule "/usr/lib/ser/modules/maxfwd.so" loadmodule "/usr/lib/ser/modules/usrloc.so" loadmodule "/usr/lib/ser/modules/registrar.so" loadmodule "/usr/lib/ser/modules/pdt.so" loadmodule "/usr/lib/ser/modules/auth.so" loadmodule "/usr/lib/ser/modules/auth_db.so"
modparam("usrloc", "db_mode", 2) modparam("auth_db", "calculate_ha1", yes) modparam("auth_db", "password_column", "password") modparam("rr", "enable_full_lr", 1) modparam("pdt", "db_url", "sql://ser:heslo@localhost/pdt") modparam("pdt", "db_table", "domains") modparam("pdt", "prefix", "2") modparam("pdt", "start_range", 2000) modparam("pdt", "hsize_2pow", 2)
# ------------------------- 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"); break; };
if (len_gt( max_len )) { sl_send_reply("513", "Message too big"); break; };
prefix2domain();
# 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("sferica.net", "subscriber")) { www_challenge("sferica.net", "0"); break; };
save("location"); break; };
# native SIP destinations are handled using our USRLOC DB
if (!lookup("location")) {
sl_send_reply("402", "Offline"); break;
# voicemail forward
#rewritehostport("interconnessioni.it:5090"); #t_relay_to_udp("interconnessioni.it", "5090"); #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(); };
}
Hello, comments inline.
On 11/13/2003 11:42 AM, Alessio Focardi wrote:
After some hassles I succesfully installed pdt module.
Now when I compose 22220 before a number the uri is rewritten with "iptel.org", here is a transcript:
What is your expectation here? Shouldn't it be like that? To which domain is mapped this prefix (22220)?
11(14926) SIP Request: 11(14926) method: <INVITE> 11(14926) uri: sip:222220555555@sferica.net 11(14926) version: <SIP/2.0> 11(14926) parse_headers: flags=1 11(14926) Found param type 235, <rport> = <n/a>; state=6 11(14926) Found param type 232, <branch> = <z9hG4bK6D151D75538C4C19987ADC66F1B9505F>; state=16 11(14926) end of header reached, state=5 11(14926) parse_headers: Via found, flags=1 11(14926) parse_headers: this is the first via 11(14926) After parse_msg... 11(14926) preparing to run routing scripts... 11(14926) DEBUG : is_maxfwd_present: searching for max_forwards header 11(14926) parse_headers: flags=128 11(14926) end of header reached, state=9 11(14926) DEBUG: get_hdr_field: <To> [32]; uri=[sip:222220555555@sferica.net] 11(14926) DEBUG: to body [sip:222220555555@sferica.net ] 11(14926) get_hdr_field: cseq <CSeq>: <34431> <INVITE> 11(14926) DEBUG: is_maxfwd_present: value = 70 11(14926) PDT: update_new_uri: sip:555555@iptel.org
but, in the software client what I get is a "403 No relay" error.
It might be from iptel.org if there is no '555555' user there.
I'cant understand if the error is coming from my server, or from iptel.org ....
You can use ngrep or ethereal on the same machine as ser to see if the traffic on the network.
Best regards, }Daniel
Here is my config, any help will be appreciated, tnx !
debug=7 fork=yes log_stderror=yes alias=sferica.net
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 ----------------------------------
loadmodule "/usr/lib/ser/modules/mysql.so" loadmodule "/usr/lib/ser/modules/sl.so" loadmodule "/usr/lib/ser/modules/tm.so" loadmodule "/usr/lib/ser/modules/rr.so" loadmodule "/usr/lib/ser/modules/maxfwd.so" loadmodule "/usr/lib/ser/modules/usrloc.so" loadmodule "/usr/lib/ser/modules/registrar.so" loadmodule "/usr/lib/ser/modules/pdt.so" loadmodule "/usr/lib/ser/modules/auth.so" loadmodule "/usr/lib/ser/modules/auth_db.so"
modparam("usrloc", "db_mode", 2) modparam("auth_db", "calculate_ha1", yes) modparam("auth_db", "password_column", "password") modparam("rr", "enable_full_lr", 1) modparam("pdt", "db_url", "sql://ser:heslo@localhost/pdt") modparam("pdt", "db_table", "domains") modparam("pdt", "prefix", "2") modparam("pdt", "start_range", 2000) modparam("pdt", "hsize_2pow", 2)
# ------------------------- 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"); break; }; if (len_gt( max_len )) { sl_send_reply("513", "Message too big"); break; }; prefix2domain(); # 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("sferica.net", "subscriber")) { www_challenge("sferica.net", "0"); break; }; save("location"); break; }; # native SIP destinations are handled using our USRLOC DB if (!lookup("location")) { sl_send_reply("402", "Offline"); break; # voicemail forward #rewritehostport("interconnessioni.it:5090"); #t_relay_to_udp("interconnessioni.it", "5090"); #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(); };
}
Hello Daniel-Constantin,
After some hassles I succesfully installed pdt module.
Now when I compose 22220 before a number the uri is rewritten with "iptel.org", here is a transcript:
DCM> What is your expectation here? Shouldn't it be like that? To which DCM> domain is mapped this prefix (22220)?
mapping works fine ... at least :)
but, in the software client what I get is a "403 No relay" error.
DCM> It might be from iptel.org if there is no '555555' user there.
well, I'm using a number that exists, here is a better explanation
if I dial number@iptel.org with xlite, the number rings.
if I dial prefix-number my server converts it to number@iptel.org addess, but I get a "No relay error".
Any idea ?
Hello, please double-check if the number you dial directly with xlite is the same with the one after the prefix. I can't see other issue yet. Is "403 No relay" the exactly reply you get from iptel? I will look into our config file to see when it occurs.
}Daniel
On 11/13/2003 12:06 PM, Alessio Focardi wrote:
Hello Daniel-Constantin,
After some hassles I succesfully installed pdt module.
Now when I compose 22220 before a number the uri is rewritten with "iptel.org", here is a transcript:
DCM> What is your expectation here? Shouldn't it be like that? To which DCM> domain is mapped this prefix (22220)?
mapping works fine ... at least :)
but, in the software client what I get is a "403 No relay" error.
DCM> It might be from iptel.org if there is no '555555' user there.
well, I'm using a number that exists, here is a better explanation
if I dial number@iptel.org with xlite, the number rings.
if I dial prefix-number my server converts it to number@iptel.org addess, but I get a "No relay error".
Any idea ?
Hello Daniel-Constantin,
Thursday, November 13, 2003, 12:25:45 PM, you wrote:
DCM> Hello, DCM> please double-check if the number you dial directly with xlite is the DCM> same with the one after the prefix. I can't see other issue yet. Is "403 DCM> No relay" the exactly reply you get from iptel? I will look into our DCM> config file to see when it occurs.
from the web page of pdt module
Domain Name iptel.org Domain Code 21120
from the cfg file
modparam("pdt", "prefix", "2") modparam("pdt", "start_range", 2000) modparam("pdt", "hsize_2pow", 2)
I dial
2-21120-89722016
transcript of ser actions, with comments
16(15421) SIP Request: 16(15421) method: <INVITE> 16(15421) uri: sip:22112089722016@sferica.net 16(15421) version: <SIP/2.0> 16(15421) parse_headers: flags=1 16(15421) Found param type 235, <rport> = <n/a>; state=6 16(15421) Found param type 232, <branch> = <z9hG4bK367F8660D3154A0286DE674B538E9ACB>; state=16 16(15421) end of header reached, state=5 16(15421) parse_headers: Via found, flags=1 16(15421) parse_headers: this is the first via 16(15421) After parse_msg... 16(15421) preparing to run routing scripts... 16(15421) DEBUG : is_maxfwd_present: searching for max_forwards header 16(15421) parse_headers: flags=128 16(15421) end of header reached, state=9 16(15421) DEBUG: get_hdr_field: <To> [34]; uri=[sip:22112089722016@sferica.net] 16(15421) DEBUG: to body [sip:22112089722016@sferica.net ] 16(15421) get_hdr_field: cseq <CSeq>: <59025> <INVITE> 16(15421) DEBUG: is_maxfwd_present: value = 70
sip address is converted
16(15421) PDT: update_new_uri: sip:89722016@iptel.org 16(15421) DEBUG: add_param: tag=4258718596 16(15421) end of header reached, state=29 16(15421) parse_headers: flags=256 16(15421) DEBUG: get_hdr_body : content_length=302 16(15421) found end of header 16(15421) find_first_route(): No Route headers found 16(15421) loose_route(): There is no Route HF 16(15421) check_self - checking if host==us: 10==9 && [iptel.org] == [127.0.0.1] 16(15421) check_self - checking if host==us: 10==14 && [iptel.org] == [212.141.166.70] 16(15421) check_self - checking if host==us: 10==12 && [iptel.org] == [192.168.0.70] 16(15421) check_self: host != me 16(15421) DEBUG: t_addifnew: msg id=12 , global msg id=11 , T on entrance=0xffffffff 16(15421) parse_headers: flags=-1 16(15421) parse_headers: flags=60 16(15421) t_lookup_request: start searching: hash=5702, isACK=0 16(15421) DEBUG: RFC3261 transaction matching failed 16(15421) DEBUG: t_lookup_request: no transaction found 16(15421) SER: new INVITE 16(15421) parse_headers: flags=-1 16(15421) check_via_address(212.141.166.162, 212.141.166.162, 0) 16(15421) WARNING:vqm_resize: resize(0) called 16(15421) DEBUG: reply sent out. buf=0x80b8508: SIP/2.0 1..., shmem=0x402f97e8: SIP/2.0 1 16(15421) DEBUG: t_reply: finished 16(15421) DEBUG: mk_proxy: doing DNS lookup...
sip server of iptel.org is found
16(15421) sip_resolvehost: SRV(_sip._udp.iptel.org) = sip.iptel.org:5060 16(15421) check_via_address(212.141.166.162, 212.141.166.162, 0) 16(15421) DEBUG: add_to_tail_of_timer[4]: 0x402f8c9c 16(15421) DEBUG: add_to_tail_of_timer[0]: 0x402f8cb4 16(15421) SER: new transaction fwd'ed 16(15421) receive_msg: cleaning up
response is received ???
11(15401) SIP Reply (status): 11(15401) version: <SIP/2.0> 11(15401) status: <403> 11(15401) reason: <No relaying> 11(15401) parse_headers: flags=1 11(15401) Found param type 232, <branch> = <z9hG4bK6461.1115f6c3.0>; state=16 11(15401) end of header reached, state=5 11(15401) parse_headers: Via found, flags=1 11(15401) parse_headers: this is the first via 11(15401) After parse_msg... 11(15401) forward_reply: found module tm, passing reply to it 11(15401) DEBUG: t_check: msg id=10 global id=9 T start=0xffffffff 11(15401) parse_headers: flags=17 11(15401) Found param type 235, <rport> = <5060>; state=6 11(15401) Found param type 232, <branch> = <z9hG4bK367F8660D3154A0286DE674B538E9ACB>; state=16 11(15401) end of header reached, state=5 11(15401) parse_headers: Via found, flags=17 11(15401) parse_headers: this is the second via 11(15401) DEBUG: add_param: tag=794fe65c16edfdf45da4fc39a5d2867c.f493 11(15401) end of header reached, state=29 11(15401) DEBUG: get_hdr_field: <To> [76]; uri=[sip:22112089722016@sferica.net] 11(15401) DEBUG: to body [sip:22112089722016@sferica.net] 11(15401) get_hdr_field: cseq <CSeq>: <59025> <INVITE> 11(15401) parse_headers: flags=4 11(15401) DEBUG: t_reply_matching: hash 5702 label 1013928209 branch 0 11(15401) DEBUG: t_reply_matching: reply matched (T=0x402f8b68)! 11(15401) DEBUG: t_check: msg id=10 global id=10 T end=0x402f8b68 11(15401) DEBUG: t_on_reply: org. status uas=100, uac[0]=0 local=0 is_invite=1) 11(15401) parse_headers: flags=4 11(15401) ->>>>>>>>> T_code=100, new_code=403 11(15401) DEBUG: relay_reply: branch=0, save=0, relay=0 11(15401) old size: 675, new size: 612 11(15401) build_res_from_sip_res: copied size: orig:88, new: 25, rest: 587 msg=