<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri","sans-serif";
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri","sans-serif";
mso-fareast-language:EN-US;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=HR link="#0563C1" vlink="#954F72"><div class=WordSection1><p class=MsoNormal><span lang=EN-US>I’m unsuccessfully trying to find out how to read AOC messages from ARI.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>I can see that libpri is reading AOC via FACILITY messages and there is a code in Asterisk class ‘aoc.c’ which should create a AOC-S, AOC-D and AOC-E message for Stasis, but I don’t get any messages to ARI and don’t see anywhere that there is possibility to read it from channel variables. I’ve followed what is written here https://wiki.asterisk.org/wiki/display/AST/Advice+of+Charge and enabled flags ‘aoc_enable=s,d,e’ and ‘facilityenable = yes’ (I didn’t enable aoce_delayhangup=yes because I was not sure if this can make big delays on hangups). In debug log (below) it is obvious that AOC-D and AOC-E are received from remote side, but no messages are generated and sent to Stasis ARI app. Are AOC messages possible only with AMI or there is a way to read/get them from/into ARI or from channel variables?<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>Thank you.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>Marin Odrljin<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>maxcom d.o.o.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>---- debug log from Asterisk 13.11.2 ----<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>VERBOSE[41206] chan_dahdi.c: PRI Span: 1 < Message Type: FACILITY (98)<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>VERBOSE[41206] chan_dahdi.c: PRI Span: 1 < [1c 1e 91 a1 1b 02 02 62 72 02 01 21 30 12 a1 0d 81 03 46 52 2e a2 06 81 01 0a 82 01 01 82 01 00]<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>VERBOSE[41206] chan_dahdi.c: PRI Span: 1 < Facility (len=32, codeset=0) [ 0x91, 0xA1, 0x1B, 0x02, 0x02, 'br', 0x02, 0x01, '!0', 0x12, 0xA1, 0x0D, 0x81, 0x03, 'FR.', 0xA2, 0x06, 0x81, 0x01, 0x0A, 0x82, 0x01, 0x01, 0x82, 0x01, 0x00 ]<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>VERBOSE[41206] chan_dahdi.c: PRI Span: 1 -- Processing IE 28 (cs0, Facility)<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>VERBOSE[41206] chan_dahdi.c: PRI Span: 1 -- Delayed processing IE 28 (cs0, Facility)<o:p></o:p></span></p><p class=MsoNormal><span lang=DE-CH>VERBOSE[41206] chan_dahdi.c: PRI Span: 1 ASN.1 dump<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>VERBOSE[41206] chan_dahdi.c: PRI Span: 1 Context Specific/C [1 0x01] <A1> Len:27 <1B><o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>...<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>VERBOSE[41206] chan_dahdi.c: PRI Span: 1 INVOKE Component Context Specific/C [1 0x01]<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>VERBOSE[41206] chan_dahdi.c: PRI Span: 1 invokeId Integer(2 0x02) = 25202 0x6272<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>VERBOSE[41206] chan_dahdi.c: PRI Span: 1 operationValue Integer(2 0x02) = 33 0x0021<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>VERBOSE[41206] chan_dahdi.c: PRI Span: 1 operationValue = ROSE_ETSI_AOCDCurrency<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>VERBOSE[41206] chan_dahdi.c: PRI Span: 1 specificCurrency Sequence/C(48 0x30)<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>VERBOSE[41206] chan_dahdi.c: PRI Span: 1 recordedCurrency RecordedCurrency Context Specific/C [1 0x01]<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>VERBOSE[41206] chan_dahdi.c: PRI Span: 1 rCurrency Context Specific [1 0x01] = "FR."<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>VERBOSE[41206] chan_dahdi.c: PRI Span: 1 rAmount Amount Context Specific/C [2 0x02]<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>VERBOSE[41206] chan_dahdi.c: PRI Span: 1 currencyAmount Context Specific [1 0x01] = 10 0x000A<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>VERBOSE[41206] chan_dahdi.c: PRI Span: 1 multiplier Context Specific [2 0x02] = 1 0x0001<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>VERBOSE[41206] chan_dahdi.c: PRI Span: 1 typeOfChargingInfo Context Specific [2 0x02] = 0 0x0000<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>VERBOSE[41206] sig_pri.c: Span 1: Processing event PRI_EVENT_FACILITY(11)<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>VERBOSE[41206] chan_dahdi.c: PRI Span: 1 < Protocol Discriminator: Q.931 (8) len=50<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>VERBOSE[41206] chan_dahdi.c: PRI Span: 1 < TEI=0 Call Ref: len= 2 (reference 4/0x4) (Sent to originator)<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>VERBOSE[41206] chan_dahdi.c: PRI Span: 1 < Message Type: DISCONNECT (69)<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>VERBOSE[41206] chan_dahdi.c: PRI Span: 1 < [08 02 82 90]<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>VERBOSE[41206] chan_dahdi.c: PRI Span: 1 < Cause (len= 4) [ Ext: 1 Coding: CCITT (ITU) standard (0) Spare: 0 Location: Public network serving the local user (2)<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>VERBOSE[41206] chan_dahdi.c: PRI Span: 1 < Ext: 1 Cause: Normal Clearing (16), class = Normal Event (1) ]<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>VERBOSE[41206] chan_dahdi.c: PRI Span: 1 < [1c 1d 91 a1 1a 02 02 4f 68 02 01 23 30 11 30 0f a1 0d 81 03 46 52 2e a2 06 81 01 0a 82 01 01]<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>VERBOSE[41206] chan_dahdi.c: PRI Span: 1 < Facility (len=31, codeset=0) [ 0x91, 0xA1, 0x1A, 0x02, 0x02, 'Oh', 0x02, 0x01, '#0', 0x11, '0', 0x0F, 0xA1, 0x0D, 0x81, 0x03, 'FR.', 0xA2, 0x06, 0x81, 0x01, 0x0A, 0x82, 0x01, 0x01 ]<o:p></o:p></span></p><p class=MsoNormal><span lang=DE-CH>VERBOSE[41206] chan_dahdi.c: PRI Span: 1 < [28 08 46 52 2e 20 30 2e 31 30]<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>VERBOSE[41206] chan_dahdi.c: PRI Span: 1 < Display (len= 8) [ FR. 0.10 ]<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>VERBOSE[41206] chan_dahdi.c: PRI Span: 1 Received message for call 0x7f15c4001c90 on link 0x319f810 TEI/SAPI 0/0<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>VERBOSE[41206] chan_dahdi.c: PRI Span: 1 -- Processing IE 8 (cs0, Cause)<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>VERBOSE[41206] chan_dahdi.c: PRI Span: 1 -- Processing IE 28 (cs0, Facility)<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>VERBOSE[41206] chan_dahdi.c: PRI Span: 1 -- Processing IE 40 (cs0, Display)<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>VERBOSE[41206] chan_dahdi.c: PRI Span: 1 -- Delayed processing IE 28 (cs0, Facility)<o:p></o:p></span></p><p class=MsoNormal><span lang=DE-CH>VERBOSE[41206] chan_dahdi.c: PRI Span: 1 ASN.1 dump<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>VERBOSE[41206] chan_dahdi.c: PRI Span: 1 Context Specific/C [1 0x01] <A1> Len:26 <1A><o:p></o:p></span></p><p class=MsoNormal><span lang=DE-CH>VERBOSE[41206] chan_dahdi.c: PRI Span: 1 Integer(2 0x02) <02> Len:2 <02><o:p></o:p></span></p><p class=MsoNormal><span lang=DE-CH>VERBOSE[41206] chan_dahdi.c: PRI Span: 1 <4F 68> - "Oh"<o:p></o:p></span></p><p class=MsoNormal><span lang=DE-CH>VERBOSE[41206] chan_dahdi.c: PRI Span: 1 Integer(2 0x02) <02> Len:1 <01><o:p></o:p></span></p><p class=MsoNormal><span lang=DE-CH>VERBOSE[41206] chan_dahdi.c: PRI Span: 1 <23> - "#"<o:p></o:p></span></p><p class=MsoNormal><span lang=DE-CH>VERBOSE[41206] chan_dahdi.c: PRI Span: 1 Sequence/C(48 0x30) <30> Len:17 <11><o:p></o:p></span></p><p class=MsoNormal><span lang=DE-CH>VERBOSE[41206] chan_dahdi.c: PRI Span: 1 Sequence/C(48 0x30) <30> Len:15 <0F><o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>VERBOSE[41206] chan_dahdi.c: PRI Span: 1 Context Specific/C [1 0x01] <A1> Len:13 <0D><o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>VERBOSE[41206] chan_dahdi.c: PRI Span: 1 Context Specific [1 0x01] <81> Len:3 <03><o:p></o:p></span></p><p class=MsoNormal><span lang=DE-CH>VERBOSE[41206] chan_dahdi.c: PRI Span: 1 <46 52 2E> - "FR."<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>VERBOSE[41206] chan_dahdi.c: PRI Span: 1 Context Specific/C [2 0x02] <A2> Len:6 <06><o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>VERBOSE[41206] chan_dahdi.c: PRI Span: 1 Context Specific [1 0x01] <81> Len:1 <01><o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>VERBOSE[41206] chan_dahdi.c: PRI Span: 1 <0A> - "~"<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>VERBOSE[41206] chan_dahdi.c: PRI Span: 1 Context Specific [2 0x02] <82> Len:1 <01><o:p></o:p></span></p><p class=MsoNormal><span lang=DE-CH>VERBOSE[41206] chan_dahdi.c: PRI Span: 1 <01> - "~"<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>VERBOSE[41206] chan_dahdi.c: PRI Span: 1 ASN.1 end<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>VERBOSE[41206] chan_dahdi.c: PRI Span: 1 INVOKE Component Context Specific/C [1 0x01]<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>VERBOSE[41206] chan_dahdi.c: PRI Span: 1 invokeId Integer(2 0x02) = 20328 0x4F68<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>VERBOSE[41206] chan_dahdi.c: PRI Span: 1 operationValue Integer(2 0x02) = 35 0x0023<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>VERBOSE[41206] chan_dahdi.c: PRI Span: 1 operationValue = ROSE_ETSI_AOCECurrency<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>VERBOSE[41206] chan_dahdi.c: PRI Span: 1 currencyInfo AOCECurrencyInfo Sequence/C(48 0x30)<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>VERBOSE[41206] chan_dahdi.c: PRI Span: 1 specificCurrency Sequence/C(48 0x30)<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>VERBOSE[41206] chan_dahdi.c: PRI Span: 1 recordedCurrency RecordedCurrency Context Specific/C [1 0x01]<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>VERBOSE[41206] chan_dahdi.c: PRI Span: 1 rCurrency Context Specific [1 0x01] = "FR."<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>VERBOSE[41206] chan_dahdi.c: PRI Span: 1 rAmount Amount Context Specific/C [2 0x02]<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>VERBOSE[41206] chan_dahdi.c: PRI Span: 1 currencyAmount Context Specific [1 0x01] = 10 0x000A<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>VERBOSE[41206] chan_dahdi.c: PRI Span: 1 multiplier Context Specific [2 0x02] = 1 0x0001<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>VERBOSE[41206] chan_dahdi.c: PRI Span: 1 -- Found active call: 0x7f15c4001c90 cref:32772<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>VERBOSE[41206] chan_dahdi.c: PRI Span: 1 q931.c:9370 post_handle_q931_message: Call 32772 enters state 12 (Disconnect Indication). Hold state: Idle<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>VERBOSE[41206] sig_pri.c: Span 1: Processing event PRI_EVENT_HANGUP_REQ(15)<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>VERBOSE[41206][C-00000008] sig_pri.c: Span 1: Channel 0/4 got hangup request, cause 16<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>VERBOSE[41414] bridge_channel.c: Channel DAHDI/i1/990786144341-9 left 'native_dahdi' stasis-bridge <C-1-14-171024120446><o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>VERBOSE[41414] bridge.c: Bridge C-1-14-171024120446: switching from native_dahdi technology to simple_bridge<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>VERBOSE[41407][C-00000007] bridge_channel.c: Channel DAHDI/i1/0413691000:0413691000-8 left 'simple_bridge' stasis-bridge <C-1-14-171024120446><o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>VERBOSE[41402] chan_dahdi.c: PRI Span: 1 > TEI=0 Call Ref: len= 2 (reference 2/0x2) (Sent to originator)<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>VERBOSE[41402] chan_dahdi.c: PRI Span: 1 > Message Type: DISCONNECT (69)<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>VERBOSE[41402] chan_dahdi.c: PRI Span: 1 > [08 02 81 90]<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>VERBOSE[41402] chan_dahdi.c: PRI Span: 1 > Cause (len= 4) [ Ext: 1 Coding: CCITT (ITU) standard (0) Spare: 0 Location: Private network serving the local user (1)<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>VERBOSE[41402] chan_dahdi.c: PRI Span: 1 > Ext: 1 Cause: Normal Clearing (16), class = Normal Event (1) ]<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>VERBOSE[41410] chan_dahdi.c: Hungup 'DAHDI/i1/990786144341-9'<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>VERBOSE[41402][C-00000007] chan_dahdi.c: Hungup 'DAHDI/i1/0413691000:0413691000-8'<o:p></o:p></span></p></div></body></html>