<div dir="ltr"><div dir="ltr">OK, that's changed something!<div><br></div><div>I'm now getting 'do_routing: No rules matching the URI' in my log - so I guess I need to review the rules.</div><div><br></div><div>Many thanks for the help so far!!</div><div><br></div><div><br></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, 25 Jan 2019 at 15:35, Jon Abrams <<a href="mailto:ffshoh@gmail.com">ffshoh@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>You have the t_relay() in the do_routing() failure code section. Move it afterwards:</div><div><br></div><div>
<div><br></div><div><span class="gmail-m_9055391680993952131gmail-im"><div> $avp(gw_whitelist) = "testpbx1";</div><div> if ( !do_routing("1","L","$avp(gw_whitelist)","$avp(rules_attributes)","$avp(gw_attributes)")) {</div></span><div> <br></div><span class="gmail-m_9055391680993952131gmail-im"><div> send_reply("404","DID not found");</div><div> xlog("do_routing: No rules matching the URI\n");</div><div> exit;</div><div> }</div><div><br></div><div>
t_relay(); <br></div><div><br></div><div>- Jon<br></div></span></div>
</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail-m_9055391680993952131gmail_attr">On Fri, Jan 25, 2019 at 9:27 AM Mark Farmer <<a href="mailto:farmorg@gmail.com" target="_blank">farmorg@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr">Thanks Jim.<div><br></div><div>I now have:</div><div><br></div><div><div> $avp(gw_whitelist) = "testpbx1";</div><div> if ( !do_routing("1","L","$avp(gw_whitelist)","$avp(rules_attributes)","$avp(gw_attributes)")) {</div><div> t_relay();</div><div> send_reply("404","DID not found");</div><div> xlog("do_routing: No rules matching the URI\n");</div><div> exit;</div></div><div><br></div><div>Sadly no change.</div><div><br></div><div>I'll head over to the docs again now.</div><div><br></div><div><br></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail-m_9055391680993952131gmail-m_-8528748807079226320gmail_attr">On Fri, 25 Jan 2019 at 15:08, Jim DeVito <jim@devito.cc> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr">Are you missing the actual relay part? I'm pretty sure do_routing just loads routing info from the database but you sill need to call the actual relay. Put a t_relay() after the IF statement and see what happens. Also look at the docs regarding capturing and displaying the return code from do_routing.</div><div dir="ltr"><br></div><div dir="ltr"><br></div></div><br><div class="gmail_quote"><div dir="ltr">On Fri, Jan 25, 2019 at 9:52 AM Mark Farmer <<a href="mailto:farmorg@gmail.com" target="_blank">farmorg@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">Hello all<div><br></div><div>Very new OpenSIPS user trying to build my first real server.</div><div><br></div><div>Using debug logging I can see that my alias/dialplan operations seem to be working but when it reaches the do_routing the call never actually gets routed.</div><div><br></div><div>I've been trying to get this working for nearly 2 weeks now and I'm at a loss now. Please can someone help me?</div><div><br></div><div>From my script:</div><div><br></div><div><div> $avp(gw_whitelist) = "testpbx1";</div><div> if ( !do_routing("1","L","$avp(gw_whitelist)","$avp(rules_attributes)","$avp(gw_attributes)")) {</div><div> send_reply("404","DID not found");</div><div> xlog("do_routing: No rules matching the URI\n");</div><div> exit;</div><div><br></div><div>Oddly, I never get the no rules log entry but it drops out of here & into the else if below which forces proxy auth. </div><div><br></div><div>My DB:</div><div><br></div><div><div>dr gateways</div><div>+----+--------------+------+---------------------+-------+------------+--------------+------------+-------+--------+-------------+</div><div>| id | gwid | type | address | strip | pri_prefix | attrs | probe_mode | state | socket | description |</div><div>+----+--------------+------+---------------------+-------+------------+--------------+------------+-------+--------+-------------+</div><div>| 2 | BT_SDIN_BCTE | 1 | sip:xxx.xxx.xxx.xxx | 0 | | BT_SDIN_BCTE | 2 | 0 | | Inbound |</div><div>| 3 | BT_SDIN_GDH | 1 | sip:xxx.xxx.xxx.xxx | 0 | | BT_SDIN_GDH | 2 | 0 | | Inbound |</div><div>| 1 | BT_SDIN_LFH | 1 | sip:xxx.xxx.xxx.xxx | 0 | | BT_SDIN_LFH | 2 | 0 | | Inbound |</div><div>| 4 | BT_SDIN_SEH | 1 | sip:xxx.xxx.xxx.xxx | 0 | | BT_SDIN_SEH | 2 | 0 | | Inbound |</div><div>| 5 | testpbx1 | 1 | sip:10.98.0.11 | 2 | 0 | testpbx1 | 2 | 0 | | Inbound |</div><div>+----+--------------+------+---------------------+-------+------------+--------------+------------+-------+--------+-------------+</div><div>dr groups</div><div>+----+--------------+----------------------------+---------+-------------+</div><div>| id | username | domain | groupid | description |</div><div>+----+--------------+----------------------------+---------+-------------+</div><div>| 7 | 441423369031 | 10.98.0.11 | 1 | |</div><div>| 6 | 441423369031 | my.domain | 2 | |</div><div>+----+--------------+----------------------------+---------+-------------+</div><div>dr carriers</div><div>+----+-----------+--------------------------------------------------+-------+-------+-------+-------------+</div><div>| id | carrierid | gwlist | flags | state | attrs | description |</div><div>+----+-----------+--------------------------------------------------+-------+-------+-------+-------------+</div><div>| 1 | BT | BT_SDIN_BCTE,BT_SDIN_GDH,BT_SDIN_LFH,BT_SDIN_SEH | 0 | 0 | | BT SDIN |</div><div>+----+-----------+--------------------------------------------------+-------+-------+-------+-------------+</div><div>dr rules</div><div>+--------+---------+--------------+---------+----------+---------+----------+-------------------+------------------+</div><div>| ruleid | groupid | prefix | timerec | priority | routeid | gwlist | attrs | description |</div><div>+--------+---------+--------------+---------+----------+---------+----------+-------------------+------------------+</div><div>| 13 | 1 | 441423369031 | | 0 | | testpbx1 | rule_441423369031 | Send to testpbx1 |</div><div>+--------+---------+--------------+---------+----------+---------+----------+-------------------+------------------+</div></div><div><br></div><div><br></div><div><br></div>-- <br><div dir="ltr" class="gmail-m_9055391680993952131gmail-m_-8528748807079226320gmail-m_8549340969137715975gmail-m_-2063528209488112719gmail_signature">Mark Farmer<br><a href="mailto:farmorg@gmail.com" target="_blank">farmorg@gmail.com</a></div></div></div></div></div></div></div></div></div></div></div></div>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail-m_9055391680993952131gmail-m_-8528748807079226320gmail-m_8549340969137715975gmail_signature"><div dir="ltr">-------------<div>Jim DeVito</div><div>Mobile 216.507.9497</div></div></div>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail-m_9055391680993952131gmail-m_-8528748807079226320gmail_signature">Mark Farmer<br><a href="mailto:farmorg@gmail.com" target="_blank">farmorg@gmail.com</a></div>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
</blockquote></div>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature">Mark Farmer<br><a href="mailto:farmorg@gmail.com" target="_blank">farmorg@gmail.com</a></div>