On Tue, Jun 26, 2018 at 7:06 PM, Doug Lytle <[email protected]> wrote:

> On 06/26/2018 06:57 PM, Dovid Bender wrote:
>
>> Hi,
>>
>> My dialplan looks like this:
>> [from-external]
>>
>> Exten => _X.,1,Noop(CALL IS COMING INTO FROM EXTERNAL CONTEXT)
>> Exten => _X.,n,Noop(IP: ${CHANNEL(recvip)})
>> Exten => _X.,n,Noop(CALLED NUMBER: ${EXTEN})
>> Exten => _X.,n,Ringing
>> Exten => _X.,n,WaitExten(15)
>> Exten => _X.,n,Congestion()
>> Exten => _X.,n,Hangup()
>>
>>
>> include => test
>>
>> [test]
>>
>> Exten => 8282,1,Noop(--- WE GOT TO CONTEXT TEST!--------- )
>>
>>
>
> Dovid,
>
> This has to do with sort order, try this:
>
>
> [from-external]
>
> ; Order DOES count
>
> include => test
> include => match_all
>
>
> [match_all]
>
> Exten => _X.,1,Noop(CALL IS COMING INTO FROM EXTERNAL CONTEXT)
> Exten => _X.,n,Noop(IP: ${CHANNEL(recvip)})
> Exten => _X.,n,Noop(CALLED NUMBER: ${EXTEN})
> Exten => _X.,n,Ringing
> Exten => _X.,n,WaitExten(15)
> Exten => _X.,n,Congestion()
> Exten => _X.,n,Hangup()
>
> [test]
>
> Exten => 8282,1,Noop(--- WE GOT TO CONTEXT TEST!--------- )
>
> --
>
>
Doug,

I tried that as well. Even with my dialplan looking like this:

[from-external]
Exten => 1234,1,Noop()

include => test

Exten => _X.,1,Noop(CALL IS COMING INTO FROM EXTERNAL CONTEXT)
Exten => _X.,n,Noop(IP: ${CHANNEL(recvip)})
Exten => _X.,n,Noop(CALLED NUMBER: ${EXTEN})
Exten => _X.,n,Ringing
Exten => _X.,n,WaitExten(15)
Exten => _X.,n,Congestion()
Exten => _X.,n,Hangup()

[test]

Exten => 8282,1,Noop(--- WE GOT TO CONTEXT TEST!--------- )


It still didnt work. Now if I did:

[from-external]
Exten => 1234,1,Noop()

include => test


Exten => _X.,1,Noop(CALL IS COMING INTO FROM EXTERNAL CONTEXT)
Exten => _X.,n,Noop(IP: ${CHANNEL(recvip)})
Exten => _X.,n,Noop(CALLED NUMBER: ${EXTEN})
Exten => _X.,n,Ringing
Exten => _X.,n,WaitExten(15)
Exten => _X.,n,Congestion()
Exten => _X.,n,Hangup()

Exten => 8282,1,Noop(--- WE GOT TO CONTEXT TEST!--------- )




OR if I did:
[from-external]
Exten => 1234,1,Noop()

include => test


Exten => _X.,1,Noop(CALL IS COMING INTO FROM EXTERNAL CONTEXT)
Exten => _X.,n,Noop(IP: ${CHANNEL(recvip)})
Exten => _X.,n,Noop(CALLED NUMBER: ${EXTEN})
Exten => _X.,n,Ringing
Exten => _X.,n,WaitExten(15)
Exten => _X.,n,Congestion()
Exten => _X.,n,Hangup()

Exten => 8282,1,Noop(--- WE GOT TO CONTEXT TEST!--------- )



Either way it worked. It seems that when there is an include so long as
there is something else that matches in the context you are in, even if
it's shorter that takes preference to a longer match which seems like a bug.
-- 
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
      https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to