So I took your advice and decided to use * to identify sip 2 sip calls. However, theres something wrong with my routing. I added route(6) to get authorize. Because when I try to dial sip to sip I get 407 proxy authentication required. Still after adding route(6), I still get the 407 proxy authentication required message. What is wrong? Route (1) is just the default message handler This is what I have:
route[3] {
# ----------------------------------------------------------------- # INVITE Message Handler # -----------------------------------------------------------------
if (!proxy_authorize("","subscriber")) { proxy_challenge("","0"); return; } else if (!check_from()) { sl_send_reply("403", "Use From=ID"); return; };
consume_credentials();
if (nat_uac_test("19")) { setflag(6); }
lookup("aliases"); if (uri!=myself) { route(4); route(1); return; };
if (uri=~"^sip:*[0-9]*@"){ xlog("Sip 2 Sip\n"); strip(1); #strip the * because we dont need it route(4); route(6); route(1); return;
};
if (!lookup("location")){
if (uri=~"^sip:[0-9]*@") { # International PSTN xlog("PSTN Gateway\n"); route(4); route(5); return; };
sl_send_reply("404", "User Not Found"); return; };
route(4); route(1); }
route[4] {
# ----------------------------------------------------------------- # NAT Traversal Section # -----------------------------------------------------------------
if (isflagset(6)) { force_rport(); fix_nated_contact(); force_rtp_proxy(); } }
route[5] {
# ----------------------------------------------------------------- # PSTN Handler # ----------------------------------------------------------------- xlog("Routed to route 5\n"); rewritehostport("pstn.gateway:5060");
avp_write("i:45", "inv_timeout");
route(1); }
route[6] {
if (!proxy_authorize("","subscriber")) { proxy_challenge("","0"); return; } else if (!check_from()) { sl_send_reply("403", "Use From=ID"); return; }; }
onreply_route[1] {
if (isflagset(6) && status=~"(180)|(183)|2[0-9][0-9]") { if (!search("^Content-Length:[ ]*0")) { force_rtp_proxy(); }; };
if (nat_uac_test("1")) { fix_nated_contact(); }; }
Bogdan-Andrei Iancu bogdan@voice-system.ro wrote: Hi,
that's right. For example SIPURA ATAs with two lines but online one terminal use # for line selection.... you better use a digit that does not overlap with the PSTN dialling plan.
regards, bogdan
Glenn Dalgliesh wrote:
Well I would becarefull using # since some UA's use # to terminate digit input and dial..... Not positive but I think * would be a better choice.
Sent with ChatterEmail True push email for the Treo Smartphone www.chatteremail.com
-----Original Message----- From: Kenny Chua Date: Wednesday, Jun 28, 2006 10:56 pm Subject: [Users] Using # for Sip 2 Sip calls
Hello, I was wondering how to set my dialing plans to use # only for Sip 2 Sip calls. A user has to press the # sign if he wants to call another sip number, and just dial normally for PSTN calls?
I came up with something like this: lookup("aliases"); if (uri=~"^sip:#[0-9]*@"){ xlog("Sip 2 SIP\n"); route(4); route(1); return; };
Which of course don't work. So I'll need help. I know its possible to use 9 for PSTN calls, but I'm sure that you can use # for Sip 2 Sip. Please help me out here. Thank you.
Do you Yahoo!? Get on board. You're invited to try the new Yahoo! Mail Beta. --0-591390942-1151549737=:48905 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: 8bit
Hello, I was wondering how to set my dialing plans to use # only for Sip 2 Sip calls. A user has to press the # sign if he wants to call another sip number, and just dial normally for PSTN calls?
I came up with something like this: lookup("aliases"); if (uri=~"^sip:#[0-9]*@"){ xlog("Sip 2 SIP\n"); route(4); route(1); return; };
Which of course don't work. So I'll need help. I know its possible to use 9 for PSTN calls, but I'm sure that you can use # for Sip 2 Sip. Please help me out here. Thank you.
--------------------------------- Sneak preview the all-new Yahoo.com. It's not radically different. Just radically better.
Looks like you are doing proxy with 2 twice. You didn't include route[1] so not sure what you are doing in that but I would assume t_relay
if (uri=~"^sip:*[0-9]*@"){
strip(1); #strip the * because we dont need it if (lookup("location")) { xlog("Sip 2 Sip\n"); route(4); route(1); return; };
};
_____
From: users-bounces@openser.org [mailto:users-bounces@openser.org] On Behalf Of Kenny Chua Sent: Thursday, June 29, 2006 2:02 PM To: users@openser.org Subject: Re: [Users] Using # for Sip 2 Sip calls
So I took your advice and decided to use * to identify sip 2 sip calls. However, theres something wrong with my routing. I added route(6) to get authorize. Because when I try to dial sip to sip I get 407 proxy authentication required. Still after adding route(6), I still get the 407 proxy authentication required message. What is wrong? Route (1) is just the default message handler This is what I have:
route[3] {
# ----------------------------------------------------------------- # INVITE Message Handler # -----------------------------------------------------------------
if (!proxy_authorize("","subscriber")) { proxy_challenge("","0"); return; } else if (!check_from()) { sl_send_reply("403", "Use From=ID"); return; };
consume_credentials();
if (nat_uac_test("19")) { setflag(6); }
lookup("aliases"); if (uri!=myself) { route(4); route(1); return; };
if (uri=~"^sip:*[0-9]*@"){ xlog("Sip 2 Sip\n"); strip(1); #strip the * because we dont need it route(4); route(6); route(1); return;
};
if (!lookup("location")){
if (uri=~"^sip:[0-9]*@") { # International PSTN xlog("PSTN Gateway\n"); route(4); route(5); return; };
sl_send_reply("404", "User Not Found"); return; };
route(4); route(1); }
route[4] {
# ----------------------------------------------------------------- # NAT Traversal Section # -----------------------------------------------------------------
if (isflagset(6)) { force_rport(); fix_nated_contact(); force_rtp_proxy(); } }
route[5] {
# ----------------------------------------------------------------- # PSTN Handler # ----------------------------------------------------------------- xlog("Routed to route 5\n"); rewritehostport("pstn.gateway:5060");
avp_write("i:45", "inv_timeout");
route(1); }
route[6] {
if (!proxy_authorize("","subscriber")) { proxy_challenge("","0"); return; } else if (!check_from()) { sl_send_reply("403", "Use From=ID"); return; }; }
onreply_route[1] {
if (isflagset(6) && status=~"(180)|(183)|2[0-9][0-9]") { if (!search("^Content-Length:[ ]*0")) { force_rtp_proxy(); }; };
if (nat_uac_test("1")) { fix_nated_contact(); }; }
Bogdan-Andrei Iancu bogdan@voice-system.ro wrote: Hi,
that's right. For example SIPURA ATAs with two lines but online one terminal use # for line selection.... you better use a digit that does not overlap with the PSTN dialling plan.
regards, bogdan
Glenn Dalgliesh wrote:
Well I would becarefull using # since some UA's use # to terminate digit
input and dial..... Not positive but I think * would be a better choice.
Sent with ChatterEmail True push email for the Treo Smartphone www.chatteremail.com
-----Original Message----- From: Kenny Chua Date: Wednesday, Jun 28, 2006 10:56 pm Subject: [Users] Using # for Sip 2 Sip calls
Hello, I was wondering how to set my dialing plans to use # only for Sip 2
Sip calls. A user has to press the # sign if he wants to call another sip number, and just dial normally for PSTN calls?
I came up with something like this: lookup("aliases"); if (uri=~"^sip:#[0-9]*@"){ xlog("Sip 2 SIP\n"); route(4); route(1); return; };
Which of course don't work. So I'll need help. I know its possible to use
9 for PSTN calls, but I'm sure that you can use # for Sip 2 Sip. Please help me out here. Thank you.
Do you Yahoo!? Get on board. You're invited to try the new Yahoo! Mail Beta. --0-591390942-1151549737=:48905 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: 8bit
Hello, I was wondering how to set my dialing plans to use # only for Sip 2
Sip calls. A user has to press the # sign if he wants to call another sip number, and just dial normally for PSTN calls?
I came up with something like this: lookup("aliases"); if (uri=~"^sip:#[0-9]*@"){ xlog("Sip 2 SIP\n"); route(4); route(1); return; };
Which of course don't work. So I'll need help. I know its possible to use 9 for PSTN calls, but I'm sure that you can use # for Sip 2 Sip. Please help me out here. Thank you.
_____
Sneak preview the all-new http://us.rd.yahoo.com/evt=40762/*http:/www.yahoo.com/preview Yahoo.com. It's not radically different. Just radically better.