Introduction
By default, you cannot remove prefix + for incoming caller ID on Yeastar U-Series and Yeastar N-Series analog phone system. This article introduces how to remove prefix + for incoming caller ID via SSH.
This article is tested on Yeastar U-series 14.19.0.48 and Yeastar N-Series version 42.14.0.23.
We demonstrate how to remove prefix + for the incoming caller ID here.
Yeastar U-series 14.19.0.48
Step 1. Create an inbound route, choose the desired trunks and set the destination. Here we name the inbound route as "SPSincoming".
Step 2. Navigate to System > Network Preference >LAN settings > Service, Enable SSH.
Step 3. Log in Yeastar U-Series via SSH using Putty software.
- Username: root
- Password: ys123456
Step 4. Enter the extensions.conf file by the command:
vi /etc/asterisk/extensions.conf
Step 5. Find the context of the new created inbound route "SPSincoming".
Step 6. Add the following sentence behind the sentence
"exten = s,n,GotoIf(${DB_EXISTS(blacklist/${CALLERID(num)})}?Blacklist-Handle,s,1)”
exten = s,n,Set(CALLERID(num)=${CALLERID(num):1})
Step 7. Copy the new [macro-incoming_SPSincoming] context.
[macro-incoming_SPSincoming]
exten = s,1,Set(CDR(userfield)=Inbound)
exten = s,n,GotoIf(${DB_EXISTS(blacklist/${CALLERID(num)})}?Blacklist-Handle,s,1)
exten = s,n,Set(CALLERID(num)=${CALLERID(num):1})
exten = s,n,FindForMobile(${CALLERID(num)})
exten = s,n,GotoIf($[${LEN(${MobileToExten})}>1]?mobile-exten-match,${MobileToExten},1)
exten = s,n,Set(TRUNKDID=${IF($[${ARG2}=s]?${CALLERID(name)}:${ARG2})})
exten = s,n,GotoByTimeCondition(default,voicemenu-custom-welcome,660,1,,Always-Hangup,s,1,,Always-Hangup,s,1)
exten = s,102,Goto(Blacklist-Handle,s,1)
Step 8. Quit the extensions.conf file, create a custom file by the following command:
vi /persistent/customcfg/extensions_custom.conf
Step 9. Paste the [macro-incoming_froms100] context into the custom file, like the figure below shows.
Step 10. Save and quit the custom configuration file.
Step 11. Execute the two commands to make the custom configuration take effect.
mypbxconf
asterisk -rx 'module reload'
Step 12. Make an inbound call to the selected SIP trunk in the inbound route "SPSincoming" and such as the Former Caller ID is +18650121333, then you can see the incoming caller ID become 18650121333.
Step 1. Create an inbound route, choose the desired trunks and set the destination. Here we name the inbound route as "froms100".
Step 2. Navigate to System > Network Preference >LAN settings > Service, Enable SSH.
Step 3. Log in Yeastar N-Series via SSH using Putty software.
- Username: root
- Password: ys123456
Step 4. Enter the extensions.conf file by the command:
vi /etc/asterisk/extensions.conf
Step 5. Find the context of the new created inbound route "froms100".
Step 6. Add the following sentence behind the sentence "exten = s,n,Set(CALLERID(num)=$ {IF($ {LEN($ {CALLERID(num)})>0}?${CALLERID(num)}:Unknown)})".
exten = s,n,Set(CALLERID(num)=${CALLERID(num):1})
Step 7. Copy the new [macro-incoming_froms100] context.
[macro-incoming_froms100]
exten = s,1,Set(CDR(userfield)=Inbound)
exten = s,n,Set(FAXOPT(faxdetect)=no)
exten = s,n,Set(CALLERID(num)=${IF(${LEN(${CALLERID(num)})>0}?${CALLERID(num)}:Unknown)})
exten = s,n,Set(CALLERID(num)=${CALLERID(num):1})
exten = s,n,GotoIf(${DB_EXISTS(blacklist/${CALLERID(num)})}?Blacklist-Handle,s,1)
exten = s,n,Gotoif($[${ENABLECLIP}=1]?s,get:s,clip)
exten = s,n(get),AGI(/bin/autoclip,get,${CALLERID(num)})
exten = s,n(clip),GotoIf($[${LEN(${CLIPEXTENSION})}>1]?from-outside,${CLIPEXTENSION},1)
exten = s,n,Set(TRUNKDID=${IF($[${ARG2}=s]?${CALLERID(name)}:${ARG2})})
exten = s,n,GotoByTimeCondition(default,from-outside,601,1,,from-outside,601,1,,from-outside,601,1,)
exten = s,102,Goto(Blacklist-Handle,s,1)
Step 8. Quit the extensions.conf file, create a custom file by the following command:
vi /persistent/custom_cfg/extensions_custom.conf
Step 9. Paste the [macro-incoming_froms100] context into the custom file, like the figure below shows.
Step 10. Save and quit the custom configuration file.
Step 11. Execute the two commands to make the custom configuration take effect.
mypbxconf
asterisk -rx 'module reload'
Step 12. Make an inbound call to the selected SIP trunk in the inbound route "froms100" and such as the Former Caller ID is +18650121333, then you can see the incoming caller ID become 18650121333.
0 Comments