Blank Field
2017-Aug-02 11:37 UTC
[asterisk-users] CallerID matching failure, possibly bug.
Hello everyone.
Seems like i've managed to isolate a troubling behaviour on my asterisk.
CallerID pattern matching does not work on the first try.
Technical info below:
asterisk*CLI> core show version
Asterisk 14.5.0 built by admin @ asterisk.domain on a x86_64 running
Linux on 2017-06-13 14:26:54 UTC
I have an endpoint 616 with CALLERID(name) set to '616' and
CALLERID(num) set to '616' at the user device. The endpoint is
registered at asterisk as 616. Contact is 616 at endpoint_ip.
[cidmatch]
exten => _.,1,NoOp()
exten => _./_6XX,1,SayDigits(1)
same => 2,SayDigits(2)
same => 3,SayDigits(3)
same => 4,SayDigits(4)
asterisk*CLI> dialplan show cidmatch
[ Context 'cidmatch' created by 'pbx_config' ]
'_.' (CID match '_6XX') => 1. SayDigits(1)
[pbx_config]
2. SayDigits(2)
[pbx_config]
3. SayDigits(3)
[pbx_config]
4. SayDigits(4)
[pbx_config]
'_.' => 1. NoOp()
[pbx_config]
-= 2 extensions (5 priorities) in 1 context. =-
Please note two pattern matching attempts.
That way, SayDigits app works, and the digits are played.
If I comment out the first like, matching _., the following situation
happens:
[cidmatch]
;exten => _.,1,NoOp()
exten => _./_6XX,1,SayDigits(1)
same => 2,SayDigits(2)
same => 3,SayDigits(3)
same => 4,SayDigits(4)
asterisk*CLI> dialplan show cidmatch
[ Context 'cidmatch' created by 'pbx_config' ]
'_.' (CID match '_6XX') => 1. SayDigits(1)
[pbx_config]
2. SayDigits(2)
[pbx_config]
3. SayDigits(3)
[pbx_config]
4. SayDigits(4)
[pbx_config]
-= 1 extension (4 priorities) in 1 context. =-
[2017-07-25 15:03:32.037] NOTICE[13524]: res_pjsip_session.c:2141
new_invite: Call from '616' (UDP:IP:PORT) to extension '1'
rejected
because extension not found in context 'cidmatch'.
To verify that CALLERID is correct:
[cidmatch]
exten => _.,1,Verbose(1,name: ${CALLERID(name)} num: ${CALLERID(num)})
;exten => _./_6XX,1,SayDigits(1)
same => 2,SayDigits(2)
same => 3,SayDigits(3)
same => 4,SayDigits(4)
asterisk*CLI> dialplan show cidmatch
[ Context 'cidmatch' created by 'pbx_config' ]
'_.' => 1. Verbose(1,name: ${CALLERID(name)} num:
${CALLERID(num)}) [pbx_config]
2. SayDigits(2)
[pbx_config]
3. SayDigits(3)
[pbx_config]
4. SayDigits(4)
[pbx_config]
-= 1 extension (4 priorities) in 1 context. =-
-- Executing [1 at cidmatch:1] Verbose("PJSIP/616-00000b2f",
"1,name:
616 num: 616") in new stack
name: 616 num: 616
-- Executing [1 at cidmatch:2] SayDigits("PJSIP/616-00000b2f",
"2")
in new stack
That seriously took me some time to investigate.
https://wiki.asterisk.org/wiki/display/AST/Pattern+Matching
The part on "Matching on Caller ID", aka "ex-girlfriend
logic" seems
to be broken on my build.
Any advice appreciated, but it works for now.
Regards, Duelist.
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.digium.com/pipermail/asterisk-users/attachments/20170802/2af309ca/attachment.html>
Joshua Colp
2017-Aug-02 13:53 UTC
[asterisk-users] CallerID matching failure, possibly bug.
On Wed, Aug 2, 2017, at 08:37 AM, Blank Field wrote:> Hello everyone. > > Seems like i've managed to isolate a troubling behaviour on my asterisk. > CallerID pattern matching does not work on the first try. > > Technical info below: > asterisk*CLI> core show version > Asterisk 14.5.0 built by admin @ asterisk.domain on a x86_64 running > Linux on 2017-06-13 14:26:54 UTC > > I have an endpoint 616 with CALLERID(name) set to '616' and > CALLERID(num) set to '616' at the user device. The endpoint is > registered at asterisk as 616. Contact is 616 at endpoint_ip.<snip> This is likely a result of the PJSIP channel driver and not any core things. It may not be applying the caller ID early enough. Since you have a case that reproduces it go ahead and file an issue[1]. Cheers, [1] https://issues.asterisk.org/jira -- Joshua Colp Digium, Inc. | Senior Software Developer 445 Jan Davis Drive NW - Huntsville, AL 35806 - US Check us out at: www.digium.com & www.asterisk.org