LtAP SIM change ... and APN change ?!?!?

Hi
I use this script for failover and change beetween the two SIM Cards:

https://github.com/strobil/ltap-mini-dualsim-failover/blob/master/failoverScript.rsc

But now i have two SIM cards with differnet APNs … how i can change the APN after SIM change ?
this comand works basically…

/interface lte set [find] apn-profiles=profile1

But only when the LTE Modem is “up” after SIM change … takes about 30 seconds…
How can i do this within the script `?

thx for help
Richard

Hey,

I just added this on your code, and works…

:if ($simSlot=“down”) do={
:log info message=“Switching to "up" sim slot (Operator1)”
/interface lte set [find] apn-profile=apn1
/system routerboard sim set sim-slot=up

} else={
:log info message=“Switching to "down" sim slot (Operator2)”
/interface lte set [find] apn-profile=apn2
/system routerboard sim set sim-slot=down

thx !

You can check the two other good cases with LTE stuff:
The LTAP can switch the Dual SIM when the RSSI was weakness?
Script to get RSRP and then do...