[Spce-user] "implicit" extensions
Andrew Pogrebennyk
apogrebennyk at sipwise.com
Tue Apr 14 12:05:06 EDT 2020
Florent,
I got it, now it’s clear that the system can not match dialed number with a subscriber, the reason being that subscriber number is too short.
In the log we see messages "Callee is not local” and “No PSTN gateways available”, so it was a mis-routed attempt, this is due to SQL query in /etc/kamailio/proxy/proxy.cfg which does INSTR with min number length 7 digits. Your subscriber’s numbers are shorter than that.
The solution is to use base number of at least 7 digits, or as a work-around (non upgrade-safe and only if you are understand kamailio config file syntax) create a customtt file inside /etc/ngcp-config/templates (according to manual) that permits shorter base numbers, the exact line looking something like this, varying from one to another version:
sql_pvquery("local", "select username,domain,alias_username,is_primary,is_devid,devid_alias from dbaliases where alias_username like concat(left('$(var(callee_user){s.escape.common})', 7), '%') and instr('$(var(callee_user){s.escape.common})', alias_username)=1 order by length(alias_username) desc limit 1", "$avp(s:callee_user);$avp(s:callee_domain);$avp(s:callee_base_user);$avp(s:is_primary);$avp(s:callee_is_devid);$avp(s:callee_devid_alias)");
Hope this helps.
Andrew
> On 14.04.2020, at 17:29, florent goue <florentgoue at gmail.com> wrote:
>
> Hi Andrew
> Did you read my last mail.
> Thx
>
> Le lun. 13 avr. 2020 à 19:59, florent goue <florentgoue at gmail.com <mailto:florentgoue at gmail.com>> a écrit :
> hi Andrew
> thanks for your mail.
>
> information about your setup :
> Sipwise CE 8.3.3
> I had this problem with 7.5.3 CE
> In my lab, I setup:
> 2 domain
> 3 customers
> 9 subscribers ( numbers: 200280, 20012, 200150, 200330, 200338, 200320, 200340)
> In my test:
> A subscriber call the 200120 number, the call fail (We would have liked the call to reach the number 20012)
> A subscriber call the 2001500 number, the call fail (We would have liked the call to reach the number 200150)
> The
>
> extended_dialing_mode : Extension matching, send dialed number with extension
>
> Log1:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sipwise.com/pipermail/spce-user_lists.sipwise.com/attachments/20200414/06bb9e44/attachment-0002.html>
More information about the Spce-user
mailing list