You ask multiple questions, I can answer some, but not all of them.
why asterisk is running on loopback address and not on 192.168.32.181:5038
As far as I can tell from a few searches port 5038 is the asterisk management interface. So I assume it binds to 127.0.0.1:5038 for security reasons. You wouldn't want that to be accessible from everywhere.
I'm currently doing the same on my organization.
The first thing to know is that there is two ways to use Skype for Business as the phone system:
Using PBX Connector to join existing On Premises telephony system.
Using Cloud PBX and a PSTN Calling Plan.
We were using sip lines hosted directly on our provider by the past, so as we never had on premises ...
Yes we experienced an Asterisk issue years ago where DTMF received over a trunk would cause Asterisk to drop the call. It's been long enough that I don't recall the fix but it was hell troubleshooting to find why the calls were being dropped. Usually from an accidental keypress on a cell phone while driving.
You can try tSIP softphone. There are few event types like "on call state" to which Lua scripts can be assigned. From Lua script you can use ShellExecute + curl or other similar utility.
If you need SIP Call-ID or other usually obscure line then it can be extracted from initial INVITE text that Lua can access.
Like you I know nothing of the voip world but try the following in sip.conf:
If it works then great, but I cant offer an explanation as I haven't checked into it, start here though.