Problem understanding how extensions work

I’m just starting with Asterisk and I seem to have some trouble understanding how extensions should work.
I’m currently have set up a SIP softphone in Asterisk and an ISDN card that is able to call all phones in the house and should be able to call external numbers.

Setting up things directly seems to work without problems. I can call a real phone with kphone for example and vice versa, with everything set up directly.

I also want to be able to use extensions though. I’m now trying to get it to work so that when dialing ‘99+extra-stuff’ from a SIP phone, would be the same as dialing ‘extra-stuff’ from a plain phone.
I’ve added this to my extensions.conf in the context of my SIP phone:
exten => _99.,1,Dial(Modem/g1:${EXTEN:2})
exten => _99.,2,Hangup

This causes a phone to ring when I dial for 9928 for example, but when I then pick up the phone, kphone gives me a forbidden error. Asterisk prints 'Everyone is busy/congested at this time (1:1/0/0)´.

I’ve read several configs and sites, but it seems I am still doing something wrong. Could anybody give me hint on how to configure this?
Thanks in advance.

Hmm, this is weird.
I just tried it again, and it worked immediatly. Both external and internal called worked from kphone.

Would that error mean that both ISDN channels on the card were in use at the time I tried it? Nobody was calling at the time, so that would be weird.

Clicking ‘Hang up’ in kphone, didn’t stop my cell-phone from ringing though. Is this a bug in kphone (that it doesn’t ‘Hang up’ properly), or is there something I still need to configure to detect a hang up correctly when the phono hasn’t been picked up yet?