[asterisk-users] Asterisk not matching longest prefix with include

Doug Lytle support at drdos.info
Tue Jun 26 18:06:42 CDT 2018


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!--------- )



More information about the asterisk-users mailing list