<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-9">
<META content="MSHTML 6.00.2800.1515" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Just add the DID's provided as alias of the
user:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>serctl alias add <DID 1st provider>
<customer's uri></FONT></DIV>
<DIV><FONT face=Arial size=2>serctl alias add <DID 2nd
provider> <customer's uri></FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>and calls made to bith DID's will be routed to the
same customer.</FONT></DIV>
<BLOCKQUOTE
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B>
<A title=cosmocid@ispro.net.tr href="mailto:cosmocid@ispro.net.tr">Ozan
Blotter</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A title=serusers@lists.iptel.org
href="mailto:serusers@lists.iptel.org">serusers@lists.iptel.org</A> </DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Saturday, August 27, 2005 4:04
AM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> [Serusers] 1 SER & 2
Providers</DIV>
<DIV><BR></DIV>
<DIV>
<DIV><FONT face=Arial size=2>Dear List,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Assume that there are two different service
providers and one SER in middle of them. A client needs
to use/connect SER but also he/she has accounts in both
providers and both supplied him/her DDIs (landline phone). Now again assume
that client registers both of phones into SER. But still he/she wants to
receive calls from both providers, is it possible to receive calls from
different providers to that client and/or how to i setup
?</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>In current SER.CFG below, i only setup one prefix
which is "0", but i can change it to any and/or add many prefixes, ex:
0049 (germany), 001 (usa), 0044 (uk), 0090 (turkey) to Provider 1
and 0033 (france), 0038 (italy) to Provider 2 and so
on.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV><FONT face=Arial size=2>
<DIV> </DIV>
<DIV>debug=3<BR>fork=yes<BR>log_stderror=no</DIV>
<DIV> </DIV>
<DIV>listen=212.XXX.104.XXX # This is
SER's Public IP<BR>port=5060<BR>children=4</DIV>
<DIV> </DIV>
<DIV>alias=212.XXX.104.XXX # This is
SER's Public IP</DIV>
<DIV> </DIV>
<DIV>dns=no<BR>rev_dns=no</DIV>
<DIV> </DIV>
<DIV>fifo="/tmp/openser_fifo"<BR>fifo_db_url="mysql://openser:openserrw@localhost/openser"</DIV>
<DIV> </DIV>
<DIV>loadmodule "/usr/local/lib/openser/modules/mysql.so"<BR>loadmodule
"/usr/local/lib/openser/modules/sl.so"<BR>loadmodule
"/usr/local/lib/openser/modules/tm.so"<BR>loadmodule
"/usr/local/lib/openser/modules/rr.so"<BR>loadmodule
"/usr/local/lib/openser/modules/maxfwd.so"<BR>loadmodule
"/usr/local/lib/openser/modules/usrloc.so"<BR>loadmodule
"/usr/local/lib/openser/modules/registrar.so"<BR>loadmodule
"/usr/local/lib/openser/modules/auth.so"<BR>loadmodule
"/usr/local/lib/openser/modules/auth_db.so"<BR>loadmodule
"/usr/local/lib/openser/modules/uri.so"<BR>loadmodule
"/usr/local/lib/openser/modules/uri_db.so"<BR>loadmodule
"/usr/local/lib/openser/modules/mediaproxy.so"<BR>loadmodule
"/usr/local/lib/openser/modules/nathelper.so"<BR>loadmodule
"/usr/local/lib/openser/modules/textops.so"<BR>loadmodule
"/usr/local/lib/openser/modules/domain.so"<BR>loadmodule
"/usr/local/lib/openser/modules/acc.so"</DIV>
<DIV> </DIV>
<DIV>modparam("auth_db", "calculate_ha1", 1)<BR>modparam("auth_db",
"password_column", "password")<BR>modparam("auth_db", "use_domain", 1)</DIV>
<DIV> </DIV>
<DIV>modparam("domain", "db_mode", 1)</DIV>
<DIV> </DIV>
<DIV>modparam("nathelper", "rtpproxy_disable", 1)<BR>modparam("nathelper",
"natping_interval", 180)</DIV>
<DIV> </DIV>
<DIV>modparam("mediaproxy","natping_interval",
30)<BR>modparam("mediaproxy","mediaproxy_socket",
"/var/run/mediaproxy.sock")<BR>modparam("mediaproxy","sip_asymmetrics","/usr/local/etc/openser/sip-asymmetric-clients")<BR>modparam("mediaproxy","rtp_asymmetrics","/usr/local/etc/openser/rtp-asymmetric-clients")</DIV>
<DIV> </DIV>
<DIV>modparam("usrloc", "db_mode", 2)<BR>modparam("usrloc", "use_domain",
1)</DIV>
<DIV> </DIV>
<DIV>modparam("registrar", "default_expires", 60)<BR>modparam("registrar",
"min_expires", 30)<BR>modparam("registrar", "nat_flag",
6)<BR>modparam("registrar", "use_domain", 1)</DIV>
<DIV> </DIV>
<DIV>modparam("rr", "enable_full_lr", 1)</DIV>
<DIV> </DIV>
<DIV>modparam("acc", "db_url",
"mysql://openser:openserrw@localhost/openser")<BR>modparam("acc",
"failed_transactions", 1)<BR>modparam("acc", "log_level",
1)<BR>modparam("acc", "log_flag", 1)<BR>modparam("acc", "db_flag", 1)</DIV>
<DIV> </DIV>
<DIV>route {</DIV>
<DIV> </DIV>
<DIV> #
-----------------------------------------------------------------<BR>
# Sanity Check Section<BR> #
-----------------------------------------------------------------<BR>
if (!mf_process_maxfwd_header("10"))
{<BR>
sl_send_reply("483", "Too Many
Hops");<BR>
break;<BR> };</DIV>
<DIV> </DIV>
<DIV> if (msg:len > max_len)
{<BR>
sl_send_reply("513", "Message
Overflow");<BR>
break;<BR> };</DIV>
<DIV> </DIV>
<DIV> #
-----------------------------------------------------------------<BR>
# Record Route Section and Acc
section<BR> #
-----------------------------------------------------------------<BR>
if (method=="INVITE" && client_nat_test("3"))
{<BR>
record_route_preset("212.XXX.104.XXX:5060;nat=yes");
# This is SER's Public
IP<BR> } else if
(method!="REGISTER") {<BR>
if!(uri=~"^sip:833[0-9]*@") { # I do not
want to make accounting if clients' prefix is beginning with
833<BR>
record_route();<BR>
setflag(1);<BR>
}<BR> };</DIV>
<DIV> </DIV>
<DIV> #
-----------------------------------------------------------------<BR>
# Call Tear Down Section<BR> #
-----------------------------------------------------------------<BR>
if (method=="BYE" || method=="CANCEL")
{<BR>
end_media_session();<BR> };</DIV>
<DIV> </DIV>
<DIV> #
-----------------------------------------------------------------<BR>
# Loose Route Section<BR> #
-----------------------------------------------------------------<BR>
if (loose_route()) {</DIV>
<DIV> </DIV>
<DIV>
if (has_totag() && (method=="INVITE" || method=="ACK")) {</DIV>
<DIV> </DIV>
<DIV>
if (client_nat_test("3") || search("^Route:.*;nat=yes"))
{<BR>
setflag(6);<BR>
use_media_proxy();<BR>
};<BR>
};</DIV>
<DIV> </DIV>
<DIV>
route(1);<BR>
break;<BR> };</DIV>
<DIV> </DIV>
<DIV> #
-----------------------------------------------------------------<BR>
# Call Type Processing Section<BR> #
-----------------------------------------------------------------</DIV>
<DIV> </DIV>
<DIV> if (uri!=myself)
{<BR>
route(1);<BR>
break;<BR> };</DIV>
<DIV> </DIV>
<DIV> if (uri==myself) {</DIV>
<DIV> </DIV>
<DIV>
if (method=="CANCEL")
{<BR>
route(3);<BR>
break;<BR>
} else if (method=="INVITE")
{<BR>
route(3);<BR>
break;<BR>
} else if (method=="REGISTER")
{<BR>
route(2);<BR>
break;<BR>
};</DIV>
<DIV> </DIV>
<DIV>
lookup("aliases");<BR>
if (uri!=myself)
{<BR>
route(1);<BR>
break;<BR>
};</DIV>
<DIV> </DIV>
<DIV>
if (!lookup("location"))
{<BR>
sl_send_reply("404", "User Not
Found");<BR>
break;<BR>
};<BR> };</DIV>
<DIV> </DIV>
<DIV> route(1);<BR>}</DIV>
<DIV> </DIV>
<DIV>route[1] {</DIV>
<DIV> </DIV>
<DIV> #
-----------------------------------------------------------------<BR>
# Default Message Handler<BR> #
-----------------------------------------------------------------</DIV>
<DIV> </DIV>
<DIV> t_on_reply("1");</DIV>
<DIV> </DIV>
<DIV> if (!t_relay()) {</DIV>
<DIV> </DIV>
<DIV>
if (method=="INVITE" || method=="ACK")
{<BR>
end_media_session();<BR>
};</DIV>
<DIV> </DIV>
<DIV>
sl_reply_error();<BR> };<BR>}</DIV>
<DIV> </DIV>
<DIV>route[2] {</DIV>
<DIV> </DIV>
<DIV> #
-----------------------------------------------------------------<BR>
# REGISTER Message Handler<BR> #
----------------------------------------------------------------</DIV>
<DIV> </DIV>
<DIV> if (!search("^Contact:\ +\*")
&& client_nat_test("7"))
{<BR>
setflag(6);<BR>
fix_nated_register();<BR>
force_rport();<BR> };</DIV>
<DIV> </DIV>
<DIV> sl_send_reply("100",
"Trying");</DIV>
<DIV> </DIV>
<DIV> if
(!www_authorize("","subscriber"))
{<BR>
www_challenge("","0");<BR>
break;<BR> };</DIV>
<DIV> </DIV>
<DIV> if (!check_to())
{<BR>
sl_send_reply("401",
"Unauthorized");<BR>
break;<BR> };</DIV>
<DIV> </DIV>
<DIV> consume_credentials();</DIV>
<DIV> </DIV>
<DIV> if (!save("location"))
{<BR>
sl_reply_error();<BR> };<BR>}</DIV>
<DIV> </DIV>
<DIV>route[3] {</DIV>
<DIV> </DIV>
<DIV> #
-----------------------------------------------------------------<BR>
# CANCEL and INVITE Message
Handler<BR> #
-----------------------------------------------------------------</DIV>
<DIV> </DIV>
<DIV> if (client_nat_test("3"))
{<BR>
setflag(7);<BR>
force_rport();<BR>
fix_nated_contact();<BR> };</DIV>
<DIV> </DIV>
<DIV>
lookup("aliases");<BR> if
(uri!=myself)
{<BR>
route(1);<BR>
break;<BR> };</DIV>
<DIV> </DIV>
<DIV> if (uri=~"^sip:0[0-9]*@*")
{ # If calling number is beginning with
prefix 0, route it to
PSTN<BR>
rewritehost("195.XXX.122.XXX"); # This is
PSTN Gateway's Public
IP<BR>
route(1);<BR>
break;<BR> };</DIV>
<DIV> </DIV>
<DIV> if (!lookup("location"))
{<BR>
sl_send_reply("404", "User Not
Found");<BR>
break;<BR> };</DIV>
<DIV> </DIV>
<DIV> if (method=="CANCEL")
{<BR>
route(1);<BR>
break;<BR> };</DIV>
<DIV> </DIV>
<DIV> if
(!proxy_authorize("","subscriber"))
{<BR>
proxy_challenge("","0");<BR>
break;<BR> } else if (!check_from())
{<BR>
sl_send_reply("403", "Use
From=ID");<BR>
break;<BR> };</DIV>
<DIV> </DIV>
<DIV> consume_credentials();</DIV>
<DIV> </DIV>
<DIV> if (isflagset(6) ||
isflagset(7))
{<BR>
use_media_proxy();<BR> };</DIV>
<DIV> </DIV>
<DIV> route(1);<BR>}</DIV>
<DIV> </DIV>
<DIV>onreply_route[1] {</DIV>
<DIV> </DIV>
<DIV> if ((isflagset(6) ||
isflagset(7)) && (status=~"(180)|(183)|2[0-9][0-9]")) {</DIV>
<DIV> </DIV>
<DIV>
if (!search("^Content-Length:\ +0"))
{<BR>
use_media_proxy();<BR>
};<BR> };</DIV>
<DIV> </DIV>
<DIV> if (client_nat_test("1"))
{<BR>
fix_nated_contact();<BR>
};<BR>}</FONT></DIV></DIV>
<P>
<HR>
<P></P>_______________________________________________<BR>Serusers mailing
list<BR>serusers@lists.iptel.org<BR>http://lists.iptel.org/mailman/listinfo/serusers<BR></BLOCKQUOTE></BODY></HTML>