<div>Hi Miodrag.</div>
<div> </div>
<div>May be you could try using and specific prefix for the Regular Expression defining the User Part in From Uri:</div>
<div> </div>
<div>From the example you have pasted, you could use:</div>
<div> </div>
<div>lvs[0-9]</div>
<div> </div>
<div>Try that.</div>
<div> </div>
<div>Another thing you can try to improve your debugging is to start up your mysql with log enabled; use mysqld_safe --log at start up, and check the log files located at your data dir at calling time.</div>
<div> </div>
<div>As a tip, remember you do not need to restart Openser after performing changes on LCR tables; you just need to execute openserctl fifo lcr_reload command.</div>
<div> </div>
<div>Kind regards.</div>
<div> </div>
<div>Sergio Gutiérrez</div>
<div>EPM Telecomunicaciones S.A.</div>
<div>Medellín, Colombia<br><br> </div>
<div><span class="gmail_quote">On 7/21/07, <b class="gmail_sendername">Miodrag Radulovic</b> <<a href="mailto:mradulovic@comutel.co.yu">mradulovic@comutel.co.yu</a>> wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid"><br>Hello everyone! Please help...<br><br>I've started testing openser 1.2.1 few weeks ago (on freebsd
6.2, I've got it from freebsd port collection) and I simple can not make LCR work at all. I spent last few hours reading almost all the posts on this mailing list and I can see it is working but I can not figure it out why mine configuration is not...
<br><br>For simple start - I want all calls where destination number starts with 9 to be routed to PSTN GW.<br><br>So I made these entries in LCR tables:<br><br>[root@santos /var/log]# openserctl lcr show<br>lcr routes<br>
+----+--------+----------+--------+----------+<br>| id | prefix | from_uri | grp_id | priority |<br>+----+--------+----------+--------+----------+<br>| 10 | 9 | % | 1 | 1 |<br>+----+--------+----------+--------+----------+
<br>lcr gateway groups<br>+--------+----------+<br>| grp_id | grp_name |<br>+--------+----------+<br>| 1 | comutel |<br>+--------+----------+<br>lcr gateways<br>+---------+---------------+------+------------+-----------+--------+-------+--------+
<br>| gw_name | ip_addr | port | uri_scheme | transport | grp_id | strip | prefix |<br>+---------+---------------+------+------------+-----------+--------+-------+--------+<br>| c2811 | <a href="http://192.168.253.1">
192.168.253.1</a> | 5060 | 1 | 1 | 1 | 0 | |<br>+---------+---------------+------+------------+-----------+--------+-------+--------+<br><br>For openser.cfg itself I've started with sip:wizard configuration template (SIP Proxy/Registrar with Offnet-Termination and Accounting) then I made some necessary changes (I do not have Mediaproxy or RTPproxy and added domain and populated trusted table).
<br><br>But when I dial 93016576 I always have this error message in xlog output:<br><br>Jul 19 18:50:24 santos /usr/local/sbin/openser[1412]: No PSTN gateways available - M=INVITE RURI=sip:93016576@192.168.253.205:5060 F=
sip:lvs1@192.168.253.205:5060 T=sip:93016576@192.168.253.205:5060 IP=<a href="http://192.168.253.202">192.168.253.202</a> ID=<a href="mailto:676c7a05-4bcd2745@192.168.253.202">676c7a05-4bcd2745@192.168.253.202</a><br><br>
Here is part of openser.cfg where next_gw() fails:<br><br>route[10]<br>{<br> if(isflagset(20))<br> {<br><br> xlog("L_INFO", "Call to foreign domain - M=$rm RURI=$ru F=$fu T=$tu IP=$si ID=$ci\n");
<br> route(6);<br> exit;<br> }<br><br> route(12);<br> if(!isflagset(23))<br> {<br> # don't allow calls relaying from PSTN to PSTN, if not explicitely forwarded
<br> if(uri =~ "^sip:[0-9]+@")<br> {<br> # only route numeric users to PSTN<br> if(!load_gws())<br> {<br><br> xlog("L_ERR", "Error loading PSTN gateways - M=$rm RURI=$ru F=$fu T=$tu 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_ERR", "No PSTN gateways available - M=$rm RURI=$ru F=$fu T=$tu 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(6);<br> }
<br> }<br><br> xlog("L_INFO", "Call to unknown user - M=$rm RURI=$ru F=$fu T=$tu IP=$si ID=$ci\n");<br> route(3);<br> sl_send_reply("404", "User Not Found");
<br> exit;<br>}<br><br>I believe that I've made some errors in LCR routes entries, but documentation is really sparse on this issue...<br><br>Please note - I've tried replacing "%" with empty string in from_uri column in routes table but then openser was not able to startup:
<br><br>[root@santos /var/log]# openserctl lcr rmroute 9 % 1 1<br>MySql password for user 'openser@localhost':<br>200 OK<br><br>[root@santos /var/log]# openserctl lcr addroute 9 '' 1 1<br>MySql password for user '
openser@localhost':<br>200 OK<br><br>[root@santos /var/log]# openserctl lcr show<br>lcr routes<br>+----+--------+----------+--------+----------+<br>| id | prefix | from_uri | grp_id | priority |<br>+----+--------+----------+--------+----------+
<br>| 11 | 9 | | 1 | 1 |<br>+----+--------+----------+--------+----------+<br>lcr gateway groups<br>+--------+----------+<br>| grp_id | grp_name |<br>+--------+----------+<br>| 1 | comutel |
<br>+--------+----------+<br>lcr gateways<br>+---------+---------------+------+------------+-----------+--------+-------+--------+<br>| gw_name | ip_addr | port | uri_scheme | transport | grp_id | strip | prefix |<br>
+---------+---------------+------+------------+-----------+--------+-------+--------+<br>| c2811 | <a href="http://192.168.253.1">192.168.253.1</a> | 5060 | 1 | 1 | 1 | 0 | |<br>+---------+---------------+------+------------+-----------+--------+-------+--------+
<br><br>[root@santos /var/log]# openserctl restart<br><br>Stopping OpenSER : \E[37;33mINFO: stopped<br><br>Starting OpenSER :<br>\E[37;31mERROR: PID file /var/run/openser.pid does not exist -- OpenSER start failed<br><br>
And here is relevant part from openser log output:<br><br>Jul 21 21:30:26 santos /usr/local/sbin/openser[10216]: ERROR:lcr:load_regex: bad from_uri re<br>Jul 21 21:30:26 santos /usr/local/sbin/openser[10216]: ERROR: lcr:mod_init(): failed to reload gateways and routes
<br>Jul 21 21:30:26 santos /usr/local/sbin/openser[10216]: init_mod(): Error while initializing module lcr<br><br>Please can someone help and point me in the right direction?<br><br>BR,<br>Miodrag<br><br><br><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></blockquote></div>
<br>