[OpenSIPS-Devel] Share SIP Messages between 2 processes

Olivier Détour chino540off+kamailio at gmail.com
Fri Jan 15 08:00:07 CET 2010


On Thu, Jan 14, 2010 at 6:55 PM, Bogdan-Andrei Iancu
<bogdan at voice-system.ro> wrote:
> Hi Olivier,
>
> Olivier Détour wrote:
>> Hi,
>>
>> I'm writing a B2B module for the B2B_entities module (like B2B_logic).
>> In my initialisation,
>> I create an extra process to poll on an extra FD to receive order to
>> create UAC part.
>>
> Why don't you use the MI stuff for this? you can trigger an action /
> event by sending an MI command to the server -> you module just has to
> export a new MI function.
>> I would like to know how to share a SIP message between the module and
>> the extra process
>> (I'm using OpenSIPs in fork mode ...) ? I tried to shm_malloc it but I
>> get an out of memory error
>> on the second Communication.
>>
>
> normally using shm_malloc is the trick, but depends of where you fork
> your process (if the shm is inherited) and who you use it for
> transferring data from from A to B.
>

Forks come from OpenSIPs itself (worker forks + my extra fork (extra
process in module declaration)).
I think I have to use shared memory to share data between different
processes. I tried to find the best and the most optimize way to use
it.

Do you know actually, how much percent of the 32 MB of shared memory,
is used by OpenSIPs ?

Regards

-- 
Olivier Détour



More information about the Devel mailing list