<div>Dear Ovidiu,</div>
<div> </div>
<div>Thank you for your kind, and I solved it. You are right, it is cached mode.</div>
<div>Is it possible to always be loaded it from DB not in cache?</div>
<div> </div>
<div>Thank you again.</div>
<div> </div>
<div>Best regards,</div>
<div>Charles<br><br> </div>
<div><span class="gmail_quote">2007/5/17, Ovidiu Sas <<a href="mailto:sip.nslu@gmail.com">sip.nslu@gmail.com</a>>:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Hi Charles,<br><br>Starting with 1.2 lcr is operating in cached mode and therefore there<br>will be no SQL queries during a call.
<br>You can use `openserctl fifo lcr_dump' to check the content of your tables.<br><br><br>Regards,<br>Ovidiu Sas<br><br>On 5/16/07, Charles Wang <<a href="mailto:lazy.charles@gmail.com">lazy.charles@gmail.com</a>> wrote:
<br>> Hi, Ovidiu,<br>><br>> I update the from_uri field from '%' to Empty string.<br>> But the result is the same as before.<br>><br>> No any SQL command related to lcr or gw or gw_grp in my mysql.log
during I<br>> make an offnet call.<br>><br>> Best regards,<br>> Charles<br>><br>><br>> 2007/5/16, Ovidiu Sas <<a href="mailto:sip.nslu@gmail.com">sip.nslu@gmail.com</a>>:<br>> > Hi Charles,
<br>> ><br>> ><br>> > In the lcr table you should have an empty string, not '%'.<br>> ><br>> ><br>> > Regards,<br>> > Ovidiu Sas<br>> ><br>> > On 5/16/07, Charles Wang <
<a href="mailto:lazy.charles@gmail.com">lazy.charles@gmail.com</a>> wrote:<br>> > > Hi all,<br>> > ><br>> > > I got this openser.cfg from <a href="http://www.sipwise.com/wizard">http://www.sipwise.com/wizard
</a> .<br>> > > I tried to make a offnet call prefix with 00.<br>> > ><br>> > > I try to load_gws and next_gw for lcr.<br>> > > But I can't find out such as "select xxx from lcr" or "select xxx from
<br>> gw"<br>> > > during these steps in my mysql.log ( I opened the log file myself ). And<br>> > > also it will not redirect to the voice gateway.<br>> > ><br>> > > Is it the error of my schemas ? Any idea for it please.
<br>> > ><br>> > ><br>> > > #################### /var/log/message ####################<br>> > > May 16 22:52:05 XXX /usr/local/sbin/openser[29112]: New request -<br>> M=INVITE<br>> > > RURI=
<a href="mailto:sip:00862123456789@XXX.XXX.XXX">sip:00862123456789@XXX.XXX.XXX</a> F=<a href="mailto:sip:101@XXX.XXX.XXX">sip:101@XXX.XXX.XXX</a><br>> > > T=<a href="mailto:sip:00862123456789@XXX.XXX.XXX">sip:00862123456789@XXX.XXX.XXX
</a> IP=61.217.XXX.XXX<br>> > > ID= <a href="mailto:C8F50846-1452-4EDC-9726-5A3AFECDF533@192.168.11.9">C8F50846-1452-4EDC-9726-5A3AFECDF533@192.168.11.9</a><br>> > > May 16 22:52:05 XXX /usr/local/sbin/openser[29112]: Proxy authentication
<br>> > > failed - M=INVITE RURI=<a href="mailto:sip:00862123456789@XXX.XXX.XXX">sip:00862123456789@XXX.XXX.XXX</a> F=<br>> <a href="mailto:sip:101@XXX.XXX.XXX">sip:101@XXX.XXX.XXX</a><br>> > > T=<a href="mailto:sip:00862123456789@XXX.XXX.XXX">
sip:00862123456789@XXX.XXX.XXX</a> IP=61.217.XXX.XXX<br>> > > ID= <a href="mailto:C8F50846-1452-4EDC-9726-5A3AFECDF533@192.168.11.9">C8F50846-1452-4EDC-9726-5A3AFECDF533@192.168.11.9</a><br>> > > May 16 22:52:05 XXX /usr/local/sbin/openser[29117]: New request -
<br>> M=INVITE<br>> > > RURI=<a href="mailto:sip:00862123456789@XXX.XXX.XXX">sip:00862123456789@XXX.XXX.XXX</a> F=<a href="mailto:sip:101@XXX.XXX.XXX">sip:101@XXX.XXX.XXX</a><br>> > > T=<a href="mailto:sip:00862123456789@XXX.XXX.XXX">
sip:00862123456789@XXX.XXX.XXX</a> IP=61.217.XXX.XXX<br>> > > ID= <a href="mailto:C8F50846-1452-4EDC-9726-5A3AFECDF533@192.168.11.9">C8F50846-1452-4EDC-9726-5A3AFECDF533@192.168.11.9</a><br>> > > May 16 22:52:05 XXX /usr/local/sbin/openser[29117]: Clear caller
<br>> preferences<br>> > > - M=INVITE RURI=<a href="mailto:sip:00862123456789@XXX.XXX.XXX">sip:00862123456789@XXX.XXX.XXX</a> F= <a href="mailto:sip:101@XXX.XXX.XXX">sip:101@XXX.XXX.XXX</a><br>> > > T=
<a href="mailto:sip:00862123456789@XXX.XXX.XXX">sip:00862123456789@XXX.XXX.XXX</a> IP=61.217.XXX.XXX<br>> > > ID= <a href="mailto:C8F50846-1452-4EDC-9726-5A3AFECDF533@192.168.11.9">C8F50846-1452-4EDC-9726-5A3AFECDF533@192.168.11.9
</a><br>> > > May 16 22:52:05 XXX /usr/local/sbin/openser[29117]: Load caller<br>> preferences<br>> > > for uuid '1' - M=INVITE RURI= <a href="mailto:sip:00862123456789@XXX.XXX.XXX">sip:00862123456789@XXX.XXX.XXX
</a> F=<br>> > > <a href="mailto:sip:101@XXX.XXX.XXX">sip:101@XXX.XXX.XXX</a> T=<a href="mailto:sip:00862123456789@XXX.XXX.XXX">sip:00862123456789@XXX.XXX.XXX</a> IP=61.217.XXX.XXX<br>> > > ID= <a href="mailto:C8F50846-1452-4EDC-9726-5A3AFECDF533@192.168.11.9">
C8F50846-1452-4EDC-9726-5A3AFECDF533@192.168.11.9</a><br>> > > May 16 22:52:05 XXX /usr/local/sbin/openser[29117]: Clear callee<br>> preferences<br>> > > - M=INVITE RURI= <a href="mailto:sip:00862123456789@XXX.XXX.XXX">
sip:00862123456789@XXX.XXX.XXX</a> F= <a href="mailto:sip:101@XXX.XXX.XXX">sip:101@XXX.XXX.XXX</a><br>> > > T=<a href="mailto:sip:00862123456789@XXX.XXX.XXX">sip:00862123456789@XXX.XXX.XXX</a> IP=61.217.XXX.XXX<br>
> > > ID=<a href="mailto:C8F50846-1452-4EDC-9726-5A3AFECDF533@192.168.11.9">C8F50846-1452-4EDC-9726-5A3AFECDF533@192.168.11.9</a><br>> > > May 16 22:52:05 XXX /usr/local/sbin/openser[29117]: Callee is not local
<br>> -<br>> > > M=INVITE RURI=<a href="mailto:sip:00862123456789@XXX.XXX.XXX">sip:00862123456789@XXX.XXX.XXX</a> F=<a href="mailto:sip:101@XXX.XXX.XXX">sip:101@XXX.XXX.XXX</a><br>> > > T= <a href="mailto:sip:00862123456789@XXX.XXX.XXX">
sip:00862123456789@XXX.XXX.XXX</a> IP=61.217.XXX.XXX<br>> > > ID=<a href="mailto:C8F50846-1452-4EDC-9726-5A3AFECDF533@192.168.11.9">C8F50846-1452-4EDC-9726-5A3AFECDF533@192.168.11.9</a><br>> > > May 16 22:52:05 XXX /usr/local/sbin/openser[29117]: Ready to Invite To
<br>> > > External - M=INVITE RURI=<a href="mailto:sip:00862123456789@XXX.XXX.XXX">sip:00862123456789@XXX.XXX.XXX</a> F=<br>> > > <a href="mailto:sip:101@XXX.XXX.XXX">sip:101@XXX.XXX.XXX</a> T= <a href="mailto:sip:00862123456789@XXX.XXX.XXX">
sip:00862123456789@XXX.XXX.XXX</a> IP=61.217.XXX.XXX<br>> > > ID=<a href="mailto:C8F50846-1452-4EDC-9726-5A3AFECDF533@192.168.11.9">C8F50846-1452-4EDC-9726-5A3AFECDF533@192.168.11.9</a><br>> > > May 16 22:52:05 XXX /usr/local/sbin/openser[29117]: Ready to 00 -
<br>> M=INVITE<br>> > > RURI=<a href="mailto:sip:00862123456789@XXX.XXX.XXX">sip:00862123456789@XXX.XXX.XXX</a> F=<a href="mailto:sip:101@XXX.XXX.XXX">sip:101@XXX.XXX.XXX</a><br>> > > T=<a href="mailto:sip:00862123456789@XXX.XXX.XXX">
sip:00862123456789@XXX.XXX.XXX</a> IP=61.217.XXX.XXX<br>> > > ID=<a href="mailto:C8F50846-1452-4EDC-9726-5A3AFECDF533@192.168.11.9">C8F50846-1452-4EDC-9726-5A3AFECDF533@192.168.11.9</a><br>> > > May 16 22:52:05 XXX /usr/local/sbin/openser[29117]: Ready to Load PSTN
<br>> > > gateways - M=INVITE RURI=<a href="mailto:sip:00862123456789@XXX.XXX.XXX">sip:00862123456789@XXX.XXX.XXX</a> F=<br>> > > <a href="mailto:sip:101@XXX.XXX.XXX">sip:101@XXX.XXX.XXX</a> T= <a href="mailto:sip:00862123456789@XXX.XXX.XXX">
sip:00862123456789@XXX.XXX.XXX</a> IP=61.217.XXX.XXX<br>> > > ID=<a href="mailto:C8F50846-1452-4EDC-9726-5A3AFECDF533@192.168.11.9">C8F50846-1452-4EDC-9726-5A3AFECDF533@192.168.11.9</a><br>> > > May 16 22:52:05 XXX /usr/local/sbin/openser[29117]: Ready to NextGW -
<br>> > > M=INVITE RURI=<a href="mailto:sip:00862123456789@XXX.XXX.XXX">sip:00862123456789@XXX.XXX.XXX</a> F=<a href="mailto:sip:101@XXX.XXX.XXX">sip:101@XXX.XXX.XXX</a><br>> > > T= <a href="mailto:sip:00862123456789@XXX.XXX.XXX">
sip:00862123456789@XXX.XXX.XXX</a> IP=61.217.XXX.XXX<br>> > > ID=<a href="mailto:C8F50846-1452-4EDC-9726-5A3AFECDF533@192.168.11.9">C8F50846-1452-4EDC-9726-5A3AFECDF533@192.168.11.9</a><br>> > > May 16 22:52:05 XXX /usr/local/sbin/openser[29117]: No PSTN gateways
<br>> > > available - M=INVITE RURI=<a href="mailto:sip:00862123456789@XXX.XXX.XXX">sip:00862123456789@XXX.XXX.XXX</a> F=<br>> > > <a href="mailto:sip:101@XXX.XXX.XXX">sip:101@XXX.XXX.XXX</a> T= <a href="mailto:sip:00862123456789@XXX.XXX.XXX">
sip:00862123456789@XXX.XXX.XXX</a> IP=61.217.XXX.XXX<br>> > > ID=<a href="mailto:C8F50846-1452-4EDC-9726-5A3AFECDF533@192.168.11.9">C8F50846-1452-4EDC-9726-5A3AFECDF533@192.168.11.9</a><br>> > ><br>> > >
<br>> > ><br>> > > #################### /tmp/mysql.log ####################<br>> > > 070516 22:52:05 755 Query select password,uuid from subscriber<br>> > > where username='101' AND domain='
xxx.xxx.xxx'<br>> > > 755 Query select value,attribute,type from<br>> > > usr_preferences where uuid='1'<br>> > > 755 Query select uuid from subscriber where
<br>> > > username = '00862123456789'<br>> > ><br>> > ><br>> > > ===> gw table<br>> > > | id | gw_name | grp_id | ip_addr | port | uri_scheme<br>> |
<br>> > > transport | strip | prefix |<br>> > > | 1 | my-test-gw | 1 | XXX.XXX.XXX.XXX | 5060 | 1<br>> |<br>> > > 1 | 0 | NULL |<br>> > ><br>> > > ===> gw schema
<br>> > > | Field | Type | Null | Key | Default<br>> |<br>> > > Extra |<br>> > > | id | int(10) | NO | PRI | NULL
<br>> |<br>> > > auto_increment |<br>> > > | gw_name | varchar(128) | NO | UNI | NULL |<br>> > > |<br>> > > | grp_id | int(10) unsigned | NO | MUL | NULL |
<br>> > > |<br>> > > | ip_addr | varchar(15) | NO | | NULL |<br>> > > |<br>> > > | port | smallint(5) unsigned | YES | | NULL |
<br>> > > |<br>> > > | uri_scheme | tinyint(3) unsigned | YES | | NULL |<br>> > > |<br>> > > | transport | tinyint(3) unsigned | YES | | NULL |
<br>> > > |<br>> > > | strip | tinyint(3) unsigned | YES | | NULL |<br>> > > | <=== it should be varchar ?<br>> > > | prefix | varchar(16) | YES | | NULL |
<br>> > > | <=== default value should be Empty or NULL ?<br>> > ><br>> > > ===> gw_grp table<br>> > > | grp_id | grp_name |<br>> > > | 1 | my-test-gw |
<br>> > ><br>> > > ===> gw_grp schema<br>> > > | Field | Type | Null | Key | Default | Extra<br>> > > |<br>> > > | grp_id | int(10) unsigned | NO | PRI | NULL | auto_increment
<br>> |<br>> > > | grp_name | varchar(64) | NO | | NULL |<br>> > > |<br>> > ><br>> > > ===> lcr table<br>> > > | id | prefix | from_uri | grp_id | priority |
<br>> > > | 1 | 00862123456789 | % | 1 | 10 |<br>> > ><br>> > > ===> lcr schema<br>> > > | Field | Type | Null | Key | Default |
<br>> Extra<br>> > > |<br>> > > | id | int(10) | NO | PRI | NULL |<br>> > > auto_increment |<br>> > > | prefix | varchar(16) | NO | MUL | NULL |
<br>> > > |<br>> > > | from_uri | varchar(128) | YES | MUL | NULL |<br>> > > |<br>> > > | grp_id | int(10) unsigned | NO | MUL | NULL |<br>> > > |
<br>> > > | priority | tinyint(3) unsigned | NO | | NULL |<br>> > > |<br>> > ><br>> > ><br>> > ><br>> > > ################ parts of my openser.cfg
<br>> > > #######################################<br>> > > loadmodule "lcr.so"<br>> > > modparam("lcr", "db_url",<br>> > > "mysql://openser:openserrw@localhost
/openser")<br>> > > modparam("lcr", "gw_table", "gw")<br>> > > modparam("lcr", "gw_name_column", "gw_name")<br>> > > modparam("lcr", "ip_addr_column", "ip_addr")
<br>> > > modparam("lcr", "port_column", "port")<br>> > > modparam("lcr", "uri_scheme_column", "uri_scheme")<br>> > > modparam("lcr", "transport_column", "transport")
<br>> > > modparam("lcr", "grp_id_column", "grp_id")<br>> > > modparam("lcr", "lcr_table", "lcr")<br>> > > modparam("lcr", "strip_column", "strip")
<br>> > > modparam("lcr", "prefix_column", "prefix")<br>> > > modparam("lcr", "from_uri_column", "from_uri")<br>> > > modparam("lcr", "priority_column", "priority")
<br>> > > modparam("lcr", "gw_uri_avp", "1400")<br>> > > modparam("lcr", "ruri_user_avp", "1402")<br>> > > modparam("lcr", "contact_avp", "1401")
<br>> > > modparam("lcr", "fr_inv_timer_avp", "s:fr_inv_timer_avp")<br>> > > modparam("lcr", "fr_inv_timer", 90)<br>> > > modparam("lcr", "fr_inv_timer_next", 30)
<br>> > > modparam("lcr", "rpid_avp", "s:rpid")<br>> > ><br>> > ><br>> ########################################################################<br>> > > # Request route 'invite-to-external'
<br>> > ><br>> ########################################################################<br>> > > route[15]<br>> > > {<br>> > > xlog("L_INFO", "Ready to Invite To External - M=$rm RURI=$ru F=$fu
<br>> T=$tu<br>> > > IP=$si ID=$ci\n");<br>> > ><br>> > > if(isflagset(20))<br>> > > {<br>> > ><br>> > > xlog("L_INFO", "Call to foreign domain - M=$rm RURI=$ru F=$fu T=$tu
<br>> IP=$si<br>> > > ID=$ci\n");<br>> > > route(11);<br>> > > exit;<br>> > > }<br>> > > if(!isflagset(23))<br>> > > {<br>> > > # don't allow calls relaying from PSTN to PSTN, if not explicitely
<br>> > > forwarded<br>> > > xlog("L_INFO", "Ready to 00 - M=$rm RURI=$ru F=$fu T=$tu IP=$si<br>> > > ID=$ci\n");<br>> > > if(uri =~ "^sip:00[0-9]+@")<br>
> > > {<br>> > > xlog("L_INFO", "Ready to Load PSTN gateways - M=$rm RURI=$ru F=$fu<br>> T=$tu<br>> > > IP=$si ID=$ci\n");<br>> > > # only route numeric users to PSTN
<br>> > > if(!load_gws())<br>> > > {<br>> > > xlog("L_INFO", "Ready to LoadGW - M=$rm RURI=$ru F=$fu T=$tu IP=$si<br>> > > ID=$ci\n");<br>> > > xlog("L_ERR", "Error loading PSTN gateways - M=$rm RURI=$ru F=$fu
<br>> T=$tu<br>> > > IP=$si ID=$ci\n");<br>> > > sl_send_reply("503", "PSTN Termination Currently Unavailable");<br>> > > exit;<br>> > > }<br>> > > if(!next_gw())
<br>> > > {<br>> > ><br>> > > xlog("L_INFO", "Ready to NextGW - M=$rm RURI=$ru F=$fu T=$tu IP=$si<br>> > > ID=$ci\n");<br>> > > xlog("L_ERR", "No PSTN gateways available - M=$rm RURI=$ru F=$fu
<br>> T=$tu<br>> > > IP=$si ID=$ci\n");<br>> > > sl_send_reply("503", "PSTN Termination Currently Unavailable");<br>> > > exit;<br>> > > }<br>> > > setflag(21);
<br>> > ><br>> > > t_on_failure("1");<br>> > > route(11);<br>> > > }<br>> > > }<br>> > ><br>> > > xlog("L_INFO", "Call to unknown user - M=$rm RURI=$ru F=$fu T=$tu
<br>> IP=$si<br>> > > ID=$ci\n");<br>> > > route(7);<br>> > > sl_send_reply("404", "User Not Found");<br>> > > exit;<br>> > ><br>> > > }
<br>> > ><br>> > ><br>> > > --<br>> > ><br>> > > Best Regards<br>> > > Charles<br>> > > _______________________________________________<br>> > > Users mailing list
<br>> > > <a href="mailto:Users@openser.org">Users@openser.org</a><br>> > > <a href="http://openser.org/cgi-bin/mailman/listinfo/users">http://openser.org/cgi-bin/mailman/listinfo/users</a><br>> > >
<br>> > ><br>> ><br>><br>><br>><br>> --<br>><br>> Best Regards<br>> Charles<br></blockquote></div><br><br clear="all"><br>-- <br><br>Best Regards<br>Charles