did translation before CHECK_DID

43 views
Skip to first unread message

SycoLTH

unread,
Jan 9, 2019, 10:26:19 AM1/9/19
to ASTPP
Hi,
I'm having this issue where calls gets detected as outbound when it should actually be inbound.

The did in the DB is 353100000000
it is assigned to a customer, and it is setup to go to his ip address directly.
I don't use registrations anywhere.

I've the number translation in the customer, in the provider and in the trunk set to "0/353,3530/"
This translation works for me, here's a few examples of what it does:
00353100000000 -> 3530353100000000 -> 353100000000
0100000000 -> 353100000000
0044203000000 -> 353044203000000 -> 44203000000

when the provides dials 353100000000 the call is recognized as inbound and routed to the client as expected (see "inbound E164.log")
but when the provider dials 0100000000 instead, the call is first recognized as outbound and then the number is translated to 353100000000 (see "inbound NAT.log")
shouldn't the number translation be done before looking in the DB for the did?

I tried using "DID Global Translation" in Configuration -> Settings, and it fixes this issue for this provider, but it is not a solution for me because it breaks my second provider that sends calls in uk national format.
So provider1 needs to translate 0xxx to 353xxx and then search astpp.dids
and provider2 needs to translate 0xxx to 44xxx and then search astpp.dids

Please let me know if this needs clarifications
Thanks
inbound E164.log
inbound NAT.log

bakko

unread,
Jan 9, 2019, 4:14:38 PM1/9/19
to ASTPP
Hello,

maybe you can use multiples translations on:

"0/353,3530/,0/44"

Regards

like:

SycoLTH

unread,
Jan 10, 2019, 4:07:49 AM1/10/19
to ASTPP
I thought of that, but I can't come up with any combination that would work for both providers:
starting from your example: "0/353,3530/,0/44"
ie 01xxx -> 3531xxx (ok)
ie 3531xxx -> doesn't change (ok)
ie 003531xxx -> 35303531xxx -> 3531xxx (ok)

uk 02xxx -> 3532xxx (wrong)
uk 442xxx -> doesn't change (ok)
uk 00442xxx -> 3530442xxx -> 442xxx (ok)

as you can see international numbers would be fine, but anything that starts with only one 0 would be matching the ie prefix breaking the number translation.

bakko

unread,
Jan 10, 2019, 8:48:09 AM1/10/19
to ASTPP
Maybe is it a BUG?

Samir Doshi

unread,
Jan 12, 2019, 2:05:22 AM1/12/19
to ASTPP
Can you not use 0+initial common prefix of DID for translation?

like 0100/353100, 0203/44203? 


Thanks,

Samir Doshi

iNextrix Technologies Pvt. Ltd.

https://www.inextrix.com

https://www.astppbilling.org


Disclaimer:

The information contained in this communication is confidential and may be legally privileged. It is intended solely for the use of the individual or entity to whom it is addressed and others authorized to receive it. If you are not the intended recipient you are hereby notified that any disclosure, copying, distribution or taking action in reliance on the contents of this information is strictly prohibited and may be unlawful. Please notify the sender immediately and destroy all copies of this message and any attachments contained in it.



Mailtrack Sender notified by
Mailtrack 01/12/19, 12:34:51 PM

--
=====================================================================
Please motivate us by contributing little here: https://www.indiegogo.com/projects/astpp-open-source-voip-billing-solution
 
Documentation: https://astpp.readthedocs.io/
Please contact at sa...@inextrix.com for commercial support.
---
You received this message because you are subscribed to the Google Groups "ASTPP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to astpp+un...@googlegroups.com.
To post to this group, send email to as...@googlegroups.com.
Visit this group at https://groups.google.com/group/astpp.
To view this discussion on the web visit https://groups.google.com/d/msgid/astpp/b803bbb2-dd54-4006-af5c-d481211a56ea%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

SycoLTH

unread,
Jan 14, 2019, 4:33:27 AM1/14/19
to ASTPP
That would make the translation string very long and difficult to read/maintain.
Also, for number ranges where the start of the number overlap (Glasgow UK and Dublin IE (0141xxx), or Wien AT and Dublin IE (012530xxxx)) I'd have to put multiple translation rules to correctly translate the number.

Thanks
Reply all
Reply to author
Forward
0 new messages