Page 1 of 1

Inbound CID Phone Digit Removal

PostPosted: Sun Jan 17, 2021 12:22 pm
by rasel
Hello,

Inbound CID is 1<10digits> when checking zopier voip client and logs.
Ive tried L1 and R10 clean CID settings in did settings... restarted asterisk however the 1 is still there.
How can i remove the leading 1 and just have 10 digits?



Cent OS 7
asterisk 13.x
VERSION: 2.14-772a
BUILD: 201004-1045
© 2020 ViciDial Group


Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 4
On-line CPU(s) list: 0-3
Thread(s) per core: 1
Core(s) per socket: 4
Socket(s): 1
NUMA node(s): 1
Vendor ID: GenuineIntel
CPU family: 6
Model: 79
Model name: Intel(R) Xeon(R) CPU E5-2630 v4 @ 2.20GHz
Stepping: 1
CPU MHz: 2199.998
BogoMIPS: 4399.99
Hypervisor vendor: KVM
Virtualization type: full
L1d cache: 32K
L1i cache: 32K
L2 cache: 4096K
L3 cache: 16384K
NUMA node0 CPU(s): 0-3

Re: Inbound CID Phone Digit Removal

PostPosted: Mon Jan 18, 2021 7:30 am
by carpenox
you need to do that in your dialplan after {EXTEN} put a 1 like {EXTEN:1} so in the end it should look something like:

exten => _1NXXNXXXXXX,n,Dial(SIP/SIP-Provider/${EXTEN:1},,tTo)

Re: Inbound CID Phone Digit Removal

PostPosted: Mon Jan 18, 2021 9:37 am
by rasel
Thank for the reply but your solution seems outbound cid removal... correct me if am wrong but I am talking about inbound cid coming into crm.

Was there a solution to this?

Ive tried Clean CID Number:
aswell as
editing the trunkinbound extension and resetting the server with different changes tryng to troubleshoot.
Clean CID Number: R10 also L1 and nothing

also tried changing extensions.conf of trunkinbound

exten => _+1X.,1,Goto(trunkinbound,${EXTEN:2},1)
and exten => _1X.,1,Goto(trunkinbound,${EXTEN:1},1)
and nothing


centos7

VERSION: 2.14-772a
BUILD: 201004-1045
© 2020 ViciDial Group

Re: Inbound CID Phone Digit Removal

PostPosted: Mon Jan 18, 2021 11:15 am
by striker
L1 should work ,not sure why didnt work for you.

best way to do this via dialplan.

set from-pstn as context for your trunk ie context=from-pstn in your carrier settings.

then go to extensions.conf and add the below dialplan in the last line of extensions.conf file.

[from-pstn]
exten => _X.,1,NoOp(my callerid ${CALLERID(num)})
exten => _X.,n,GotoIf($[${LEN(${CALLERID(num)})} = 10]?10digit:11digit)
exten => _X.,n(10digit),Goto(trunkinbound,${EXTEN},1)
exten => _X.,n(11digit),Set(CALLERID(num)=${CALLERID(num):1})
exten => _X.,n,NoOp(my callerid ${CALLERID(num)})
exten => _X.,n,Goto(trunkinbound,${EXTEN},1)


in the above dialplan i wrote, if the callerid is 10 digit send to trunkinbound without removing first digit.
if the callerid is 11 digit then discard first digit and set it as callerid and send to trunkinbound.

Re: Inbound CID Phone Digit Removal

PostPosted: Mon Jan 18, 2021 1:22 pm
by carpenox
sweet solution striker