Re: [asterisk-users] PRI Called Party Number Info
Hi Grigoriy, I had the same problem, maybe. I have the number 1000 calling the number 2000, I need to know if the call is internal, national or international. To do this, Asterisk 1.8 sets the variable $ {CALLERID (TON)} that contains code ... if I remember correctly 33 is unknow (internal), 73 are national and international calls can not remember (maybe 43). Hope that helps. Danilo 2013/3/15 Richard Mudgett > > 14.03.2013 17:53, Gianluca Merlo wrote: > > > Hello Grigoriy, > > > > > > i think that you can access the information you need by using the > > > dialplan function CALLERID(num-plan). It should contain the lower 7 > > > bits of the Q.931 type-of-number/numbering-plan-identification > > > octet. > > > > > > Best regards > > > > > > Gianluca > > > > > > > > > > Nope. CALLERID(num-plan) shows numbering plan of caller's number, not > > the called one. In example, where A calls B, CALLERID(num-plan) shows > > numbering plan of A number. In my case I need to know numbering plan > > of > > B number. > > > > CALLERID(dnid-num-plan) is not set anywhere for PRI calls. > > > > Looks like CALLEDTON is the right answer, however it needs mangling > > (${MATH(${CALLEDTON}>>4&0x7,i)}) to get right values. > > I created the following issue to get CALLERID(dnid-num-plan) to have the > same value as CALLEDTON. > https://issues.asterisk.org/jira/browse/ASTERISK-21248 > > Richard > > -- > _ > -- Bandwidth and Colocation Provided by http://www.api-digital.com -- > New to Asterisk? Join us for a live introductory webinar every Thurs: >http://www.asterisk.org/hello > > asterisk-users mailing list > To UNSUBSCRIBE or update options visit: >http://lists.digium.com/mailman/listinfo/asterisk-users > -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] PRI Called Party Number Info
> 14.03.2013 17:53, Gianluca Merlo wrote: > > Hello Grigoriy, > > > > i think that you can access the information you need by using the > > dialplan function CALLERID(num-plan). It should contain the lower 7 > > bits of the Q.931 type-of-number/numbering-plan-identification > > octet. > > > > Best regards > > > > Gianluca > > > > > > Nope. CALLERID(num-plan) shows numbering plan of caller's number, not > the called one. In example, where A calls B, CALLERID(num-plan) shows > numbering plan of A number. In my case I need to know numbering plan > of > B number. > > CALLERID(dnid-num-plan) is not set anywhere for PRI calls. > > Looks like CALLEDTON is the right answer, however it needs mangling > (${MATH(${CALLEDTON}>>4&0x7,i)}) to get right values. I created the following issue to get CALLERID(dnid-num-plan) to have the same value as CALLEDTON. https://issues.asterisk.org/jira/browse/ASTERISK-21248 Richard -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] PRI Called Party Number Info
14.03.2013 17:53, Gianluca Merlo wrote: Hello Grigoriy, i think that you can access the information you need by using the dialplan function CALLERID(num-plan). It should contain the lower 7 bits of the Q.931 type-of-number/numbering-plan-identification octet. Best regards Gianluca Nope. CALLERID(num-plan) shows numbering plan of caller's number, not the called one. In example, where A calls B, CALLERID(num-plan) shows numbering plan of A number. In my case I need to know numbering plan of B number. CALLERID(dnid-num-plan) is not set anywhere for PRI calls. Looks like CALLEDTON is the right answer, however it needs mangling (${MATH(${CALLEDTON}>>4&0x7,i)}) to get right values. -- Best regards, Grigoriy -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] PRI Called Party Number Info
> I need to get type of called number (TON), which is displayed in pri > debug messages: > > Called Party Number (len=13) [ Ext: 1 TON: National Number (2) NPI: > ISDN/Telephony Numbering Plan (E.164/E.163) (1) 'xx' ] > > Does anyone know how to do it? > > According to documentation it is only possible for calling number. > But I > need to make decision in dialplan upon the value of type of called > number. > > BTW, I made a little research on source code and could not find > anything > related to my question. Perhaps, it's not implemented. You did not specify for which version of Asterisk. I am assuming at least v1.8. I think you are wanting the CALLEDTON channel variable. It is set for incoming ISDN calls to the lower 7 bits of the Q.931 type-of-number/numbering-plan octet. The CALLERID(dnid-num-plan) should have the same value but I cannot find any code setting the value. (Looks like I missed setting that value. :)) I could only find the value being set to the CALLEDTON channel variable. Richard -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] PRI Called Party Number Info
2013/3/14 Puzankin Grigoriy : > Hi, > > I need to get type of called number (TON), which is displayed in pri debug > messages: > > Called Party Number (len=13) [ Ext: 1 TON: National Number (2) NPI: > ISDN/Telephony Numbering Plan (E.164/E.163) (1) 'xx' ] > > Does anyone know how to do it? > > According to documentation it is only possible for calling number. But I > need to make decision in dialplan upon the value of type of called number. > > BTW, I made a little research on source code and could not find anything > related to my question. Perhaps, it's not implemented. > > Best regards, > Grigoriy > > -- > С уважением, > Григорий Пузанкин > > > -- > _ > -- Bandwidth and Colocation Provided by http://www.api-digital.com -- > New to Asterisk? Join us for a live introductory webinar every Thurs: > http://www.asterisk.org/hello > > asterisk-users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users Hello Grigoriy, i think that you can access the information you need by using the dialplan function CALLERID(num-plan). It should contain the lower 7 bits of the Q.931 type-of-number/numbering-plan-identification octet. Best regards Gianluca -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users