way to remove + from caller id

najeh

Member
Joined
Dec 9, 2016
Messages
37
Reaction score
1
hello for all i have problem when i dial from my pbx to number i see + before the number
i want to remove the +
i dialing as local call

do you have provider name alaw me to set caller id from my pbx with out +
now i am using provider
LES.NET
thank you for helping me
 

restamp

Member
Joined
Apr 24, 2016
Messages
97
Reaction score
53
What I did to address the problem of leading '+1','1', etc., ON NUMBERS PASSED TO ME, is to create a custom context called 'from-pstn-cidtweak' in /etc/asterisk/extensions_custom.conf:
Code:
;############################################################################;
; Converts 11 and 12 character CallerIDs to NA 10-digit values by
; stripping leading "1" or "+1" in order to make them consistent
; for inbound routing rules.  Ditto for EXTEN data.
;
[from-pstn-cidtweak]
exten => _X.,1,GotoIf($["${CALLERID(num):0:2}" != "+1"]?notplus)
exten => _X.,n,Set(CALLERID(num)=${CALLERID(num):1})
exten => _X.,n(notplus),GotoIf($["${CALLERID(num):0:1}" != "1"]?notone)
exten => _X.,n,Set(CALLERID(num)=${CALLERID(num):1})
exten => _X.,n(notone),GotoIf($["${EXTEN:0:2}" = "+1"]?from-pstn,${EXTEN:2},1)
exten => _X.,n,GotoIf($["${EXTEN:0:1}" = "1"]?from-pstn,${EXTEN:1},1)
exten => _X.,n,Goto(from-pstn,${EXTEN},1)
;############################################################################;
I then use 'from-pstn-cidtweak' as my context when adding a trunk instead of 'from-pstn'. Internal to my server, then, all NANP numbers are of the format NXXNXXXXXX, and I then explicitly prepend a '1' to them, if necessary, under "Dialed Number Manipulation Rules" when originating a call.

My calling pattern is fairly simple and this works for me. It might or might not work for you directly depending on how you have your server configured, but if not, perhaps it will serve as a starting point for crafting your own custom context. (And, even that may be as simple as removing the EXTEN mods):
Code:
[from-pstn-cidtweak]
exten => _X.,1,GotoIf($["${CALLERID(num):0:2}" != "+1"]?notplus)
exten => _X.,n,Set(CALLERID(num)=${CALLERID(num):1})
exten => _X.,n(notplus),GotoIf($["${CALLERID(num):0:1}" != "1"]?notone)
exten => _X.,n,Set(CALLERID(num)=${CALLERID(num):1})
exten => _X.,n(notone)Goto(from-pstn,${EXTEN},1)
Good luck with it!
 

najeh

Member
Joined
Dec 9, 2016
Messages
37
Reaction score
1
hello don't work for me i need for outbound not inbound for example my mobile number 0522494949 when i make outbound call it show +0522494949 i want to show as local call with out + 0522494949 thank for help
 

restamp

Member
Joined
Apr 24, 2016
Messages
97
Reaction score
53
So, you're calling a local number and passing "0522494949" as the caller-id, but the called party is seeing "+0522494949"? Are you sure that the '+' is being added by your PBX and not your ITSP? What do your Call Detail Records show? If it isn't there, I'd talk to your Service Provider.

(You don't say where you are located, but local numbers never start with zero in North America.)
 

najeh

Member
Joined
Dec 9, 2016
Messages
37
Reaction score
1
hello this is israel 0522 not usa what i need to do to show the number with out + before 052 thank for help
 

najeh

Member
Joined
Dec 9, 2016
Messages
37
Reaction score
1
i need to add +972 before the number for the caller id ow remove + thanks
 
Get 3CX - Absolutely Free!

Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.
Top