How to Change Incoming CallerID in TE

Introduction

In this guide, we give examples to describe how to change Caller ID for calls from E1 to SIP.

  • When 4XXX calls in, change the caller ID to 1234XXX.
  • When 6XXXX calls in, change the caller ID to 9876XXXX.
  • For other numbers, change the caller ID to 123456789.

Steps to Change Caller ID

  1. Go to your TE to set three Routes for these three rules:


  2. Login Yeastar TE gateway via SSH
  3. Edit the configuration file extensions.conf.
  4. Search route 4XXX by typing “/4XXX” on your keyboard. If the first result is not the one you want, type "n" to find the next one until you find it. 
  5. You will find the three rules as below. 
  6. Copy the 3 rules to your notepad and add the following contents in red.
    [macro-Routein_4XXX]
    exten = s,1,Set(CDR(userfield)=Inbound)
    exten = s,n,Set(CALLERID(num)=123${CALLERID(num)})
    exten = s,n,GotoIf(${DB_EXISTS(blacklist/${CALLERID(num)})}?Blacklist-Handle,s,1)
    exten = s,n,Set(TRUNKDID=${IF($[${ARG2}=s]?${CALLERID(name)}:${ARG2})})
    exten = s,n,Goto(Routeout_4XXX,${ARG2},1)
    exten = s,102,Goto(Blacklist-Handle,s,1)
    
    [macro-Routein_6XXXX]
    exten = s,1,Set(CDR(userfield)=Inbound)
    exten = s,n,Set(CALLERID(num)=987${CALLERID(num)})
    exten = s,n,GotoIf(${DB_EXISTS(blacklist/${CALLERID(num)})}?Blacklist-Handle,s,1)
    exten = s,n,Set(TRUNKDID=${IF($[${ARG2}=s]?${CALLERID(name)}:${ARG2})})
    exten = s,n,Goto(Routeout_6XXXX,${ARG2},1)
    exten = s,102,Goto(Blacklist-Handle,s,1)
    
    [macro-Routein_Others]
    exten = s,1,Set(CDR(userfield)=Inbound)
    exten = s,n,Set(CALLERID(num)=123456789)
    exten = s,n,GotoIf(${DB_EXISTS(blacklist/${CALLERID(num)})}?Blacklist-Handle,s,1)
    exten = s,n,Set(TRUNKDID=${IF($[${ARG2}=s]?${CALLERID(name)}:${ARG2})})
    exten = s,n,Goto(Routeout_Others,${ARG2},1)
    exten = s,102,Goto(Blacklist-Handle,s,1)
    
  7. Press the Esc key to exit the modified mode. Type ":q!" to quit and not save this configuration file.
  8. Create a custom configuration file under path: /persistent/custom-cfg/ 
    Enter command ” vi /persistent/custom-cfg/extensions_custom.conf ” to creat a new custom file.
  9. Paste the contents in the configuration file. If you can’t edit or input any word, you could enter “ i ” to swap to Modified mode.
  10. Press to Esc key to exit and swap to Command mode. Enter “:wq” to save and quit the custom file.
  11. Then enter command “ mypbxconf ”&” asterisk –rx ”module reload” ” to reload all configuration files.
Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.