[asterisk-dev] AOC

Philipp Kempgen philipp.kempgen at amooma.de
Fri Apr 6 09:21:33 MST 2007


I tried something similar to:

reqprep(&req, p, SIP_INFO, 0, 1);
"charging", "active", "currency", "EUR", amount, "0.001");
add_header(&req, "AOC", buf);
add_header_contentLength(&req, 0);
return send_request(p, &req, XMIT_RELIABLE, p->ocseq);

in a cb_aoc() callback in chan_sip which would send out a SIP INFO
like this:

INFO sip:2001 at;line=ydg4eu9f SIP/2.0
Via: SIP/2.0/UDP;branch=z9hG4bK0d67ff58;rport
Max-Forwards: 70
From: "Homer Simpson" <sip:2002 at>;tag=as4e3ae4ad
To: <sip:2001 at;line=ydg4eu9f>;tag=b8h7gwtz76
Contact: <sip:2002 at>
Call-ID: 3ca6b28a0bb6d5603c70b707166e3301 at
CSeq: 103 INFO
User-Agent: Asterisk PBX SVN-trunk-r60269M
Content-Length: 0

Didn't expect it to work but the Snom (360) displays "EUR 2.13".

My idea was that AOC(-D) could be done similar to the devicestate
thread: go through the list of changes changes (reported by
incoming channels or artificially created) and forwarding them to
the registered callbacks (for outgoing channels).


amooma GmbH - Bachstr. 126 - 56566 Neuwied - http://www.amooma.de
     Let's use IT to solve problems and not to create new ones.
           Asterisk? -> http://www.das-asterisk-buch.de

Geschäftsführer: Stefan Wintermeyer
Handelsregister: Neuwied B 14998

More information about the asterisk-dev mailing list