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:[EMAIL PROTECTED]: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:[EMAIL PROTECTED]>;tag=as4e3ae4ad
To: <sip:[EMAIL PROTECTED]:2682;line=ydg4eu9f>;tag=b8h7gwtz76
Contact: <sip:[EMAIL PROTECTED]>
Call-ID: [EMAIL PROTECTED]
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
_______________________________________________
--Bandwidth and Colocation provided by Easynews.com --

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-dev

Reply via email to