[Home]

Summary:ASTERISK-22183: [patch]Fake acceptance of AOC MESSAGEs
Reporter:Birger "WIMPy" Harzenetter (wimpy)Labels:patch
Date Opened:2013-07-22 17:50:05Date Closed:
Priority:MinorRegression?
Status:Open/NewComponents:Channels/chan_sip/Interoperability
Versions:SVN 11.5.0 13.18.4 Frequency of
Occurrence
Related
Issues:
Environment:Using a telco with MESSSAGE type ASN1/aoc style AOC support.Attachments:( 0) sip-asn1-aoc.patch
Description:Reception of AOC via MESSSAGE with content type ASN1/aoc makes Asterisk reply with "415 Unsupported Media Type" which again makes the ITSP (telco) drop the call.

This patch "fakes" an accepted response.
Would be nice if the message would actually get processed, but at least the calls are no longer dropped.
Comments:By: Matt Jordan (mjordan) 2013-07-22 22:16:21.001-0500

Well, this isn't really a bug.

We don't support receiving AOC messages. The only support for AOC in {{chan_sip}} is the sending of AOC MESSAGE requests specifically for SNOM phones - we don't support inbound AOC MESSAGE requests.

From the [Asterisk wiki|https://wiki.asterisk.org/wiki/display/AST/Advice+of+Charge]:

{quote}
AOC in chan_sip
Asterisk supports a very basic way of sending AOC on a SIP channel to Snom phones using an AOC specification designed by Snom. This support is limited to the sending of AOC-D and AOC-E pass-through messages.
{quote}

Since we don't support the content in the MESSAGE request sent to us, a 415 is an appropriate response. The fact that the Huawei switch then tears down the call seems sub-optimal, given how 415 responses should typically be handled.

I'm curious, why is the Huawei switch sending AOC messages in the first place?

By: Birger "WIMPy" Harzenetter (wimpy) 2013-07-22 23:00:08.650-0500

Yes, it probably shouldn't kill that call because of that response, but unfortunately it does.
Someone with the same issue with another provider suggested just to modify the sent string, which seems to be a very bad idea, so I came up with this less bad version to at least make outbound calls possible.

The Huawei stuff is usually used by the classic telcos replacing their PSTN gear. So the normal use case would be with the supplied IAD (SIP<>ISDN/POTS gateway) as replacement for PSTN lines.
Connecting Asterisk to the SIP account by converting from SIP to ISDN and back to SIP will off course not give you the issue (and working AOC) but seems just wrong.

BTW: How much brainfuck do you expect trying to use libpri functions from chan_sip?

By: Rusty Newton (rnewton) 2013-07-26 17:01:28.815-0500

Keeping this open since a patch is provided and it may be useful for some with specific equipment (like the Huawei stuff here that drops the calls upon getting the 415). This functionality would likely need to be made optional to be considered for inclusion since the 415 may be considered more appropriate, as AOC reception is not supported. Discussion with the community on the dev list is probably due.

By: Birger "WIMPy" Harzenetter (wimpy) 2013-08-05 22:50:54.940-0500

I actually have some doubts they still use the same soft switch I assumed.

Anyway: I had the issue with Telefonica / O2 ("Alice") and according to google, others experienced the same with Vodafone.