SMS Integration with New SMS Provider

Note : Below Example screen shot has been taken with reference of Togo implementation (fast2sms) 

 

  1. Mirror mosip-ref-impl repository into particular country organization and create new branch

     

  2. Copy the existing Source code and create new package for implementation



  3. Provide the Implementation for SMS Provider in SMSServiceProviderImpl.java by modifying method

     

    public SMSResponseDto sendSms(String contactNumber, String message) {  // Implement SMS Implementation 

     

  4. Modify the following parameters from kernel-mz.properties for SMS Configuration (Below parameter key & values will be change based on the sms implementation)

    #-------------sms notification service---------------------  mosip.kernel.sms.enabled=true  mosip.kernel.sms.country.code=91  mosip.kernel.sms.number.length=10  mosip.kernel.sms.language=english  #mosip.kernel.sms.gateway : "infobip" or "msg91" or "fast2sms"  mosip.kernel.sms.gateway=gateway  #--fast2sms gateway--  mosip.kernel.sms.api=https://www.fast2sms.com/dev/bulk  mosip.kernel.sms.authkey= <Auth key provided by SMS Service provider>  mosip.kernel.sms.route=p  mosip.kernel.sms.sender=FSTSMS  mosip.kernel.sms.unicode=unicode 

     

  5. Update the following parameters in application-mz.properties to enable SMS Triggering with SMS provider

    mosip.kernel.sms.proxy-sms=false  mosip.kernel.auth.proxy-otp=false 

     

  6. Use mvn clean and build jar for Customized sms implementation (kernel-smsserviceprovider-fast2sms.jar)

     

  7. Mirror artifactory-ref-impl repository into particular country organization and create new branch



  8. Place the customized jar (kernel-smsserviceprovider-fast2sms.jar) into artifactory src path

     

  9. Update Docker file to Copy the kernel-smsserviceprovider-fast2sms.jar into kernel libray.

     

     

  10. Mirror commons repository into particular country organization and create new branch



  11. Update Docker file for the customized jar in kernel-notification-service



     

  12. Build the docker image and restart the kernel-notification-service pod in MZ dashboard 

 

Note : Incase if jar file present in maven or other online repository then skip the step 8 and use the below changes in Step 9.