[Home]

Summary:ASTERISK-02521: extens with cidmatch no longer work on zap
Reporter:raburton (raburton)Labels:
Date Opened:2004-10-03 10:27:51Date Closed:2008-01-15 15:08:56.000-0600
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Core/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:The recent cid changes appear to have stopped cid match extens from matching incoming calls on zap (and maybe others). CID at the matching stage now has a '-' char between the area code and number (at least here in the UK).

In order to get these to match you have to have add a '-' to your match string, e.g.
exten => s/08005-875290,1,Answer

Annoying, but worse is the fact you can't put these in a _pattern type matches (they just wont match) e.g.
exten => s/_08005-8752[0-8]0,1,Answer

****** ADDITIONAL INFORMATION ******

Looking through all the recent cid stuff, I'm not really sure on the best place to fix this. I guessed at source, and so call ast_shrink_phone_number where cid.cid_num is populated.

I'm using patches on my chan_zap to get callerid to work in the UK, so a creating a patch would be a pain, plus it's a trivial fix. Just look for the code below in chan_zap.c (current file v1.351 is at line 5442), and add the line I have.

This may be completely the wrong way/place to fix this, but at least it is a temporary solution. Someone who knows the cid stuff better than me should probably have a go.

if (number && !ast_strlen_zero(number)) {
ast_shrink_phone_number(number);    // <-- this line added
chan->cid.cid_num = strdup(number);
chan->cid.cid_ani = strdup(number);
}
Comments:By: Mark Spencer (markster) 2004-10-03 10:50:53

Thanks for your research into the real root of the problem.  This should be fixed in CVS now.

By: Russell Bryant (russell) 2004-10-03 10:53:23

not included in the 1.0 branch - a dev branch issue

By: Digium Subversion (svnbot) 2008-01-15 15:08:56.000-0600

Repository: asterisk
Revision: 3894

U   trunk/channels/chan_zap.c

------------------------------------------------------------------------
r3894 | markster | 2008-01-15 15:08:55 -0600 (Tue, 15 Jan 2008) | 2 lines

shrink phone number for callerid matching (bug ASTERISK-2521)

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=3894