Resolving extension not found in the context trunkinbound Error
Vicidial is a powerful open-source call center suite, widely used for inbound and outbound call management. However, users may encounter the "extension not found in the context trunkinbound" error when dealing with incoming Direct Inward Dialing (DID) numbers containing the '+' sign infront of the DID number. This issue can be frustrating, but with the right solutions, you can ensure a smooth call flow. In this article, we'll explore the root cause of the problem and provide step-by-step instructions to resolve it.
Understanding the Issue:
The error message "handle_request_invite: Call from 'siptrunk' to extension '+1234567890' rejected because extension not found in the context trunkinbound" typically occurs when Vicidial encounters incoming DIDs with a '+' sign. The system fails to match the incoming number with a valid dialplan extension in the specified context, leading to the error. To address this vicidial have provided the solution but its not activate by default.
Here is the default dialplan under trunkinbound context in vicidial
[trunkinbound]if you have noticed the line no 2 where vicidial have provided the dialplan to match the incoming number which starts with '+' but it is commented means not active.
exten => _X.,1,AGI(agi-DID_route.agi)
;exten => _+1X.,1,Goto(trunkinbound,${EXTEN:2},1)
Steps to Resolve the Issue:
vi /etc/asterisk/extensions.conf
[trunkinbound]
exten => _X.,1,AGI(agi-DID_route.agi)
exten => _+1X.,1,Goto(trunkinbound,${EXTEN:2},1)
exten => _+91X.,1,Goto(trunkinbound,${EXTEN:1},1)
exten => _+91X.,1,Goto(trunkinbound,${EXTEN:3},1)
asterisk -rx "dialplan reload"