[asterisk-dev] AOC
Philipp Kempgen
philipp.kempgen at amooma.de
Fri Apr 6 09:21:33 MST 2007
JFYI:
I tried something similar to:
reqprep(&req, p, SIP_INFO, 0, 1);
sprintf(buf,
"%s;type=%s;charging-info=%s;currency=%s;amount=%lu;multiplier=%s",
"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 192.168.1.202:2682;line=ydg4eu9f SIP/2.0
Via: SIP/2.0/UDP 192.168.1.110:5060;branch=z9hG4bK0d67ff58;rport
Max-Forwards: 70
From: "Homer Simpson" <sip:2002 at 192.168.1.110>;tag=as4e3ae4ad
To: <sip:2001 at 192.168.1.202:2682;line=ydg4eu9f>;tag=b8h7gwtz76
Contact: <sip:2002 at 192.168.1.110>
Call-ID: 3ca6b28a0bb6d5603c70b707166e3301 at 192.168.1.110
CSeq: 103 INFO
User-Agent: Asterisk PBX SVN-trunk-r60269M
AOC:
charging;type=active;charging-info=currency;currency=EUR;amount=2130;multiplier=0.001
Content-Length: 0
Didn't expect it to work but the Snom (360) displays "EUR 2.13".
http://www.snom.com/wiki/index.php/Advice_of_charge_(AOC)_in_SIP
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).
Regards,
Philipp
--
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