[asterisk-dev] AOC in chan_sip

Ibrar Ahmed ibrar.ahmad at gmail.com
Tue Aug 7 06:07:59 CDT 2007


Hi  Wolfgang,



>
> Here is my code which does generate the SIP INFO Message:
>
> static int sip_send_aocd_to_peer(struct sip_pvt *p)
> {
>         struct sip_request req;
>         char buf[2048];
>
>         reqprep(&req, p, SIP_INFO, 0, 1);
>         // Insert already generated ISDN binary for testing purpose
>         snprintf(buf, sizeof(buf), 
> "91a11a0201000201213012a10d810346522ea206810100820101820100");
> /*      add_header(&req, "AOC", buf);
>         add_header_contentLength(&req, 0);  */
>
>         add_header(&req, "Content-Type", "application/QSIG");
>         add_header_contentLength(&req, strlen(buf));
>         add_line(&req, buf);
>
>         return send_request(p, &req, 1, p->ocseq);
> }
>
> this does generate the following sip messages:
>
> INFO sip:101 at 90.146.5.134:5061 SIP/2.0
> Via: SIP/2.0/UDP 88.198.158.245:5060;branch=z9hG4bK2a0ddade;rport
> From: <sip:031620837999550 at vpbx.yosd.at>;tag=as5f87418c
> To: 101 <sip:101 at vpbx.yosd.at:5061>;tag=868274887
> Contact: <sip:031620837999550 at 88.198.158.245>
> Call-ID: 010D7008-214C-4D45-B75B-F8C6CA2EA09E at 10.200.0.22
> CSeq: 102 INFO
> User-Agent: Commoveo Cockpit
> Max-Forwards: 70
> Content-Type: application/QSIG
> Content-Length: 58
>
> 91a11a0201000201213012a10d810346522ea206810100820101820100
>
>
Why are you not using AOC as mentioned in site " 
http://wiki.snom.com/wiki/index.php/Advice_of_charge_%28AOC%29_in_SIP"

INFO sip:bla at snom.com SIP/2.0
From: <biller at snom.com>;tag=5354n3
To: <ua at snom.com>;tag=33rfh3
CSeq: 23423 INFO
Call-ID: 3452tw43dt354dm03
AOC: charging;state=active;
 charging-info=currency;
 currency=EUR;
 amount=2000;
 multiplier=0.001
Content-Length: 0


> Seems to be quit ok - but want work...
>
What do you mean it wont work(whats error reported)


Sorry if I understand your question wrong. -:(

  --ibrar
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-dev/attachments/20070807/b76d8f22/attachment.htm 


More information about the asterisk-dev mailing list