[Home]

Summary:ASTERISK-15577: [patch] Unrecognized prilocaldialplan NPI modifier
Reporter:Maciej Krajewski (jamicque)Labels:
Date Opened:2010-02-04 07:40:25.000-0600Date Closed:2010-08-18 02:50:07
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Channels/chan_dahdi
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) 20100413__issue16770.diff.txt
( 1) 20100811__issue16770.diff.txt
( 2) res_agi-issue16770.patch
( 3) wanpipe_db.txt
Description:Hi,
when I'm making calls through dahdi in asterisk console shows errors about "Unrecognized prilocaldialplan NPI modifier:"
during the call I'm not adding any modifier.
My dahdi configuration is attached (it's written in db)

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

 == Using SIP RTP TOS bits 136
 == Using SIP RTP CoS mark 4
 == Using SIP VRTP TOS bits 136
 == Using SIP VRTP CoS mark 4
 == Using UDPTL TOS bits 136
 == Using UDPTL CoS mark 4
   -- Executing [0586204003@lalalala:1] GotoIf("SIP/test002-00000002", "0?3") in new stack
   -- Executing [0586204003@lalalala:2] Set("SIP/test002-00000002", "__ORGDEST=0586204003") in new stack
   -- Executing [0586204003@lalalala:3] AGI("SIP/test002-00000002", "agi://127.0.0.1/call-processor") in new stack
   -- AGI Script Executing Application: (Set) Options: (CHANNEL(language)=pl)
   -- AGI Script Executing Application: (Set) Options: (CALLERID(all)=test002 test002<Unknown>)
   -- AGI Script Executing Application: (Set) Options: (GROUP(in)=user3)
   -- AGI Script Executing Application: (Set) Options: (GROUP(out)=hdw1)
   -- AGI Script Executing Application: (Set) Options: (_NUMBER_A=12)
   -- AGI Script Executing Application: (Set) Options: (_NUMBER_B=48586204003)
   -- AGI Script Executing Application: (Dial) Options: (DAHDI/g1/0586204003,45,tTr)
   -- Requested transfer capability: 0x00 - SPEECH
[Feb  4 14:35:58] WARNING[18803]: chan_dahdi.c:3096 dahdi_call: Unrecognized prilocaldialplan NPI modifier: k
[Feb  4 14:35:58] WARNING[18803]: chan_dahdi.c:3096 dahdi_call: Unrecognized prilocaldialplan NPI modifier: o
[Feb  4 14:35:58] WARNING[18803]: chan_dahdi.c:3096 dahdi_call: Unrecognized prilocaldialplan NPI modifier: w
Comments:By: Leif Madsen (lmadsen) 2010-02-08 09:30:14.000-0600

What database are you using? How is this configuration being pulled from the database? Please provide enough information to reproduce this issue on a test machine.

By: Maciej Krajewski (jamicque) 2010-02-08 09:47:17.000-0600

postgres.
in my extconfig.conf I have a statement:
chan_dahdi.conf => pgsql,asterisk,ast_config


However the same thing happens if I have my configuration in chan_dahdi.conf.
I'm using Sangoma card if this does matter.

By: Jens von Bülow (jensvb) 2010-02-11 14:07:06.000-0600

Hi All,

I traced this down, in our installation, to the callerid being used when dialling out via the PRI...

In other words, an incoming SIP call with a "" (blank) callerid is set to "Unknown". This callerid is then used on the outgoing PRI channel and you get this error message.

I solved this in the dialplan by checking for a callerid(number) of "Unknown" and setting it back to "" (blank) before forwarding the call out over the PRI.

Notice how the "k-o-w" are part of "U-n-k-n-o-w-n"

i hope this helps.

Regards
Jens

By: Leif Madsen (lmadsen) 2010-02-22 15:30:11.000-0600

I'm slightly confused by this. Is this a bug in Asterisk, and if so, where is it? Or is this a configuration issue that can be solved by the dialplan change you mentioned?

By: Maciej Krajewski (jamicque) 2010-02-22 15:57:18.000-0600

In my opinion it's not a bug.
I think the ticket can be closed.

By: Jens von Bülow (jensvb) 2010-02-23 02:24:02.000-0600

>> In my opinion it's not a bug.
Why do you say that?

>> I think the ticket can be closed.
I don't think so, it's not a life threatening bug, but a bug none the less.... I don't see how one could justify a callerid making it into dialplan modifier by accident?

By: Birger "WIMPy" Harzenetter (wimpy) 2010-02-23 09:12:28.000-0600

Where is the empty caller ID replaced byt the word "Unknown"?

By: Jens von Bülow (jensvb) 2010-02-23 13:02:32.000-0600

>> Where is the empty caller ID replaced by the word "Unknown"?

Incoming on the sip channel (chan_sip)....

(i.e. a call coming into the server via chan_sip with callerid(number)="" is changed to callerid(number)="Unknown")

By: Birger "WIMPy" Harzenetter (wimpy) 2010-02-23 13:24:31.000-0600

Is there any reason why chan_sip does so?

IMHO it shouldn't be necessary to correct changes done by a channel driver in the dialplan.

Just imagine we'd have to find the source and destination channel types to make correct calls.

So I vote for bug.

By: Leif Madsen (lmadsen) 2010-02-24 09:25:14.000-0600

OK thanks for the discussion! If someone can point out which line number in chan_sip.c performs that operation, that'd probably be useful. Thanks!

By: Håkon Nessjøen (haakon) 2010-02-24 10:31:24.000-0600

I also had this problem. But I have found the root of it.

When using AGI, you usually fetch the callerid from the environment sent by asterisk when the agi is connected.

If you look around line 737 in res/res_agi.c, you will see the following:

       ast_agi_send(fd, chan, "agi_callerid: %s\n", S_OR(chan->cid.cid_num, "unknown"));
       ast_agi_send(fd, chan, "agi_calleridname: %s\n", S_OR(chan->cid.cid_name, "unknown"));

The problem is when your agi script is washing callerid and setting it to the value fetched by agi_callerid.

I think it's kinda hard to figure if this is a "undocumented feature" or a bug. In my oppinion, I think its kind of bad by asterisk to say "unknown" in this caller_id field when all other caller id functions in asterisk returns an empty string.

By: Leif Madsen (lmadsen) 2010-02-24 10:37:36.000-0600

I agree. I don't think Asterisk should be changing callerID information all willy-nilly! :)

By: Håkon Nessjøen (haakon) 2010-02-24 11:42:28.000-0600

Uploaded a proposed patch.

It sets the callerid, calleridname, rdnid and rdnis to "" instead of "unknown" in case there is a NULL value in the channel for that variable.

By: Tilghman Lesher (tilghman) 2010-04-13 14:45:49

Patch uploaded; ready for testing!

By: Maciej Krajewski (jamicque) 2010-04-20 04:28:53

didn't help.
Still the same info.

By: Tilghman Lesher (tilghman) 2010-05-24 21:22:50

jamicque:  for which patch is your feedback?

By: Maciej Krajewski (jamicque) 2010-05-25 03:50:46

After applying res agi patch:
I can't patch Asterisk 1.6.1.20 with the second one, changing sig_pri.c on chan_dahdi.c doesn't help

   -- Executing [11@CALLEX:1] GotoIf("SIP/test004-00000000", "0?3") in new stack
   -- Executing [11@CALLEX:2] Set("SIP/test004-00000000", "__ORGDEST=11") in new stack
   -- Executing [11@CALLEX:3] AGI("SIP/test004-00000000", "agi://127.0.0.1/call-processor") in new stack
   -- AGI Script Executing Application: (Set) Options: (CHANNEL(language)=pl)
   -- AGI Script Executing Application: (Set) Options: (CALLERID(all)=test004 test004<Unknown>)
   -- AGI Script Executing Application: (Set) Options: (GROUP(in)=user5)
   -- AGI Script Executing Application: (Set) Options: (GROUP(out)=hdw1)
   -- AGI Script Executing Application: (Set) Options: (_NUMBER_A=14)
   -- AGI Script Executing Application: (Set) Options: (_NUMBER_B=11)
   -- AGI Script Executing Application: (Dial) Options: (DAHDI/g1/-11,45,tTr)
   -- Requested transfer capability: 0x00 - SPEECH
[2010-05-25 10:43:13] WARNING[22694]: chan_dahdi.c:3093 dahdi_call: Unrecognized prilocaldialplan NPI modifier: k
[2010-05-25 10:43:13] WARNING[22694]: chan_dahdi.c:3093 dahdi_call: Unrecognized prilocaldialplan NPI modifier: o
[2010-05-25 10:43:13] WARNING[22694]: chan_dahdi.c:3093 dahdi_call: Unrecognized prilocaldialplan NPI modifier: w

By: Maciej Krajewski (jamicque) 2010-06-19 16:15:16

channels/sig_pri.c doesn't exist in Asterisk 1.6.2.8
So I guess that 20100413__issue16770.diff.txt patch is wrong.

By: Tilghman Lesher (tilghman) 2010-08-11 11:02:21

Patch updated to version 1.6.2.  Be aware that when you report an issue against SVN with no branch specified, it is assumed that you are reporting the issue against TRUNK.

By: Maciej Krajewski (jamicque) 2010-08-17 11:27:39

I've tested it against 1.6.2.11. Everything is ok.

By: Digium Subversion (svnbot) 2010-08-18 02:43:13

Repository: asterisk
Revision: 282607

U   branches/1.6.2/channels/chan_dahdi.c

------------------------------------------------------------------------
r282607 | tilghman | 2010-08-18 02:43:13 -0500 (Wed, 18 Aug 2010) | 9 lines

Don't warn on callerid when completely text, instead of numeric with localdialplan prefixes.

(closes issue ASTERISK-15577)
Reported by: jamicque
Patches:
      20100413__issue16770.diff.txt uploaded by tilghman (license 14)
      20100811__issue16770.diff.txt uploaded by tilghman (license 14)
Tested by: jamicque

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

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

By: Digium Subversion (svnbot) 2010-08-18 02:49:03

Repository: asterisk
Revision: 282608

_U  branches/1.8/
U   branches/1.8/channels/sig_pri.c

------------------------------------------------------------------------
r282608 | tilghman | 2010-08-18 02:49:02 -0500 (Wed, 18 Aug 2010) | 16 lines

Merged revisions 282607 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2

........
 r282607 | tilghman | 2010-08-18 02:43:14 -0500 (Wed, 18 Aug 2010) | 9 lines
 
 Don't warn on callerid when completely text, instead of numeric with localdialplan prefixes.
 
 (closes issue ASTERISK-15577)
  Reported by: jamicque
  Patches:
        20100413__issue16770.diff.txt uploaded by tilghman (license 14)
        20100811__issue16770.diff.txt uploaded by tilghman (license 14)
  Tested by: jamicque
........

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

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

By: Digium Subversion (svnbot) 2010-08-18 02:50:05

Repository: asterisk
Revision: 282609

_U  trunk/
U   trunk/channels/sig_pri.c

------------------------------------------------------------------------
r282609 | tilghman | 2010-08-18 02:50:05 -0500 (Wed, 18 Aug 2010) | 23 lines

Merged revisions 282608 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
 r282608 | tilghman | 2010-08-18 02:49:04 -0500 (Wed, 18 Aug 2010) | 16 lines
 
 Merged revisions 282607 via svnmerge from
 https://origsvn.digium.com/svn/asterisk/branches/1.6.2
 
 ........
   r282607 | tilghman | 2010-08-18 02:43:14 -0500 (Wed, 18 Aug 2010) | 9 lines
   
   Don't warn on callerid when completely text, instead of numeric with localdialplan prefixes.
   
   (closes issue ASTERISK-15577)
    Reported by: jamicque
    Patches:
          20100413__issue16770.diff.txt uploaded by tilghman (license 14)
          20100811__issue16770.diff.txt uploaded by tilghman (license 14)
    Tested by: jamicque
 ........
................

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

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