Hi, I'm doing a few tests to try SER. I use a simple configuration: -two Cisco ip phones -one Cisco 1760 Voice gateway with ISDN interfaces.
Calling between the ip phones works, but going through the Voice Gateway is something else... I don't really understand how to edit the config file, and I suppose their's a simple way. Here's how I tried.
I added these lines to the default config: if (uri=~"^sip:452564@10.1.1.22") { t_relay_to("10.1.1.240","5060"); break; }; And I call always teh same number 452564. 10.1.1.240 being my gateway, and 10.1.1.22 the SIP proxy server. An extract of the debbuging info: ... 6(13970) SIP Request: 6(13970) method: <ACK> 6(13970) uri: sip:452564@10.1.1.22 6(13970) version: <SIP/2.0> 6(13970) parse_headers: flags=1 ... 6(13970) DEBUG: add_param: tag=d907c037823644515dfe0ede38ca9976.1dfc 6(13970) end of header reached, state=29 6(13970) DEBUG: get_hdr_field: <To> [66]; uri=[sip:452564@10.1.1.22] 6(13970) DEBUG: to body [sip:452564@10.1.1.22] 6(13970) DEBUG: sl_filter_ACK : local ACK found -> dropping it! 6(13970) error:... ..
If you see something big, please let me know. THanks.
Sebastien Peterson Luxembourg.
route{ # initial sanity checks -- messages with # max_forwars==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; };
# Do strict routing if pre-loaded route headers present rewriteFromRoute();
# 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; }; };
if (uri=~"^sip:452564@10.1.1.22") { t_relay_to("10.1.1.240","5060"); break; };
# forward to current uri now if (!t_relay()) { sl_reply_error(); };
}
On Tue, 13 May 2003 seb.peterson@internet.lu wrote:
Hi, I'm doing a few tests to try SER. I use a simple configuration: -two Cisco ip phones -one Cisco 1760 Voice gateway with ISDN interfaces.
Calling between the ip phones works, but going through the Voice Gateway is something else... I don't really understand how to edit the config file, and I suppose their's a simple way. Here's how I tried.
I added these lines to the default config: if (uri=~"^sip:452564@10.1.1.22") { t_relay_to("10.1.1.240","5060"); break; }; And I call always teh same number 452564. 10.1.1.240 being my gateway, and 10.1.1.22 the SIP proxy server. An extract of the debbuging info: ... 6(13970) SIP Request: 6(13970) method: <ACK> 6(13970) uri: sip:452564@10.1.1.22 6(13970) version: <SIP/2.0> 6(13970) parse_headers: flags=1 ... 6(13970) DEBUG: add_param: tag=d907c037823644515dfe0ede38ca9976.1dfc 6(13970) end of header reached, state=29 6(13970) DEBUG: get_hdr_field: <To> [66]; uri=[sip:452564@10.1.1.22] 6(13970) DEBUG: to body [sip:452564@10.1.1.22] 6(13970) DEBUG: sl_filter_ACK : local ACK found -> dropping it! 6(13970) error:... ..
If you see something big, please let me know. THanks.
Sebastien Peterson Luxembourg.
See http://lists.iptel.org/pipermail/serusers/2003-May/001315.html I had this same problem but Jan solved this
Try it:
if (uri=~"sip:452564@10.1.1.22") { if (!t_relay_to("10.1.1.240", "5060")) { sl_reply_error(); }; break; t_relay(); };
If you have VoIP gateway configure properly the PSTN phone 452564 will ring on your desk.
Andrzej Radke
Hello,
first, write a proper regular expression. The expression should match hostname AND IP address of your server in the domain. Also don't forget to put backslashes before dots because dots are substitution characters in regular expressions. You can use for example something like this:
if (uri=~"sip:[0-9]+@(your.domain|10.1.1.22)") { t_relay_udp("10.1.1.240", "5060"); break; };
This will forward messages containing a number in the username part to your PSTN gateway.
Jan.
On 13-05 10:45, seb.peterson@internet.lu wrote:
Hi, I'm doing a few tests to try SER. I use a simple configuration: -two Cisco ip phones -one Cisco 1760 Voice gateway with ISDN interfaces.
Calling between the ip phones works, but going through the Voice Gateway is something else... I don't really understand how to edit the config file, and I suppose their's a simple way. Here's how I tried.
I added these lines to the default config: if (uri=~"^sip:452564@10.1.1.22") { t_relay_to("10.1.1.240","5060"); break; }; And I call always teh same number 452564. 10.1.1.240 being my gateway, and 10.1.1.22 the SIP proxy server. An extract of the debbuging info: ... 6(13970) SIP Request: 6(13970) method: <ACK> 6(13970) uri: sip:452564@10.1.1.22 6(13970) version: <SIP/2.0> 6(13970) parse_headers: flags=1 ... 6(13970) DEBUG: add_param: tag=d907c037823644515dfe0ede38ca9976.1dfc 6(13970) end of header reached, state=29 6(13970) DEBUG: get_hdr_field: <To> [66]; uri=[sip:452564@10.1.1.22] 6(13970) DEBUG: to body [sip:452564@10.1.1.22] 6(13970) DEBUG: sl_filter_ACK : local ACK found -> dropping it! 6(13970) error:... ..
If you see something big, please let me know. THanks.
Sebastien Peterson Luxembourg.
route{ # initial sanity checks -- messages with # max_forwars==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; };
# Do strict routing if pre-loaded route headers present rewriteFromRoute(); # 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; }; }; if (uri=~"^sip:452564@10.1.1.22") { t_relay_to("10.1.1.240","5060"); break; }; # forward to current uri now if (!t_relay()) { sl_reply_error(); };
}
Serusers mailing list serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
On 13-05 11:27, Jan Janak wrote:
Hello,
first, write a proper regular expression. The expression should match hostname AND IP address of your server in the domain. Also don't forget to put backslashes before dots because dots are substitution characters in regular expressions. You can use for example something like this:
if (uri=~"sip:[0-9]+@(your.domain|10.1.1.22)") { t_relay_udp("10.1.1.240", "5060");
Sorry, I made a mistake, the function name should be t_relay_to_udp
Jan.