wdoekes / asterisk-chan-dongle

chan_dongle channel driver for Huawei UMTS cards, works with Asterisk 14+
Other
298 stars 104 forks source link

PIN suppport for SIM cards #95

Open p-velasco opened 4 years ago

p-velasco commented 4 years ago

Hello,

Is there any reason why PIN functionality is not supported? I have seen a "hackish" patch at https://github.com/pld-linux/asterisk-chan_dongle/blob/master/chan_dongle-pin.patch, and wonder why it hasn't been implemented yet.

So I think I'm missing something preventing it, and would like to know what before starting the route of modifying sources to reach that dead end (if any).

Maybe is due to chan_dongle querying the IMSI (which needs the card to be unlocked)? If so, maybe the IMSI approach could be discarded and instead use the ICCID, which can be queried anytime via the AT^ICCID? command.

wdoekes commented 4 years ago

I know of no reason why it should not be implemented.

PRs are welcome ;-)

p-velasco commented 4 years ago

Ok, will try if I get some spare time. While I try to understand the code flow (any help with that?), maybe my PR for some code improvements can be accepted?