Posted: Mon Aug 06, 2007 7:09 pm Post subject: [asterisk-dev] AOC in chan_sip
Hi all,
as far as i know there is no standard way (no RFC...) to implement AOC (AOC-S, AOC-D and AOC-E) within sip. But there are already some devices out there which does support SIP AOC Messages. I am currently playing with 2 of them.
Basicaly the patton gateway does encapsulate the ISDN binary code into a sip info message with Content Type application/QSIG
Now i do want to implement the patton AOC support within the sip channel.
The big question now is - where and how to start...
I have taken a look at the code in chan_sip.c, and i do have some questions about it.
- The iflist linked list - is this a list with all currently open sip dialogs ?
- The do_monitor thread in chan_sip does monitor all currently open dialogs (iflist) and loaded sip peers. It will check if a dialog needs to get destroyed, and so on. So this thread seems to me to be the best starting point.
What i have tried to do is the following - i have added some extra vars to the iflist struct - so that i can remember when i has sent the last SIP INFO aoc Message. In do_monitor i do check the last time against the current time - and if 1 second is over - then the next SIP INFO AOC message will get generated and send. This does already work - but the generated SIP INFO Messages does not seem to be correct.
Here is my code which does generate the SIP INFO Message:
INFO [url=sip:bla@snom.com]sip:bla@snom.com[/url] SIP/2.0
From: <biller@snom.com> (biller@snom.com);tag=5354n3
To: <ua@snom.com> (ua@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: 0Seems to be quit ok - but want work...
What do you mean it wont work(whats error reported)
as far as i know there is no standard way (no RFC...) to implement AOC
(AOC-S, AOC-D and AOC-E) within sip. But there are already some devices
out there which does support SIP AOC Messages. I am currently playing
with 2 of them.
Basicaly the patton gateway does encapsulate the ISDN binary code into a
sip info message with Content Type application/QSIG
Now i do want to implement the patton AOC support within the sip channel.
The big question now is - where and how to start...
I have taken a look at the code in chan_sip.c, and i do have some
questions about it.
- The iflist linked list - is this a list with all currently open sip
dialogs ?
- The do_monitor thread in chan_sip does monitor all currently open
dialogs (iflist) and loaded sip peers. It will check if a dialog needs
to get destroyed, and so on. So this thread seems to me to be the best
starting point.
What i have tried to do is the following - i have added some extra vars
to the iflist struct - so that i can remember when i has sent the last
SIP INFO aoc Message. In do_monitor i do check the last time against the
current time - and if 1 second is over - then the next SIP INFO AOC
message will get generated and send. This does already work - but the
generated SIP INFO Messages does not seem to be correct.
Here is my code which does generate the SIP INFO Message:
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum