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@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@cidmatch:1] Verbose("PJSIP/616-00000b2f", "1,name:
616 num: 616") in new stack
 name: 616 num: 616
    -- Executing [1@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.
-- 
_____________________________________________________________________
-- 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