Regarding dialplan files, I'm going to explain here call flow:
Default.xml
1.call hits extension call_local, lua script is run and channel vasr cType=SRV, service_type=IVR
2. extension apps in xml services is execute
Services.xml
lua script is run to retrieve ivr name
3. on selection (2 in the logs) call is transfer to 8910 XML calls
Calls.xml
4. extension: call_inside is execute and call is hangup after
<action application="limit" data="db ${domain_name} MAX_${cCalled} ${maxcallsB} !USER_BUSY"/>
As you can see from the logs mod sofia hangup with user busy and then send a bye to external or internal channel:
2016-03-14 11:37:40.266607 [DEBUG] mod_sofia.c:506 Channel sofia/external/
00403737752@10.200.24.10 hanging up, cause: USER_BUSY
2016-03-14 11:37:40.266607 [DEBUG] mod_sofia.c:558 Sending BYE to sofia/external/
00403737752@10.200.24.102016-03-14 11:38:54.166606 [DEBUG] mod_sofia.c:506 Channel sofia/internal/
5532@insiel.fvgvoipcoll.it hanging up, cause: USER_BUSY
2016-03-14 11:38:54.166606 [DEBUG] mod_sofia.c:558 Sending BYE to sofia/internal/
5532@insiel.fvgvoipcoll.itI tried to removed the limit app and the calls then hint limit_exceeded extension in calls.xml but behaviour is the same.