[Kamailio-Devel] [Kamailio-Users] New module : PURPLE - IM/Presence multi-protocol gateway

Daniel-Constantin Mierla miconda at gmail.com
Tue Feb 3 14:14:08 CET 2009


Hello,

On 02/03/2009 11:46 AM, Eric PTAK wrote:
> Hello everyone,
> and thank you for your welcome !
>
> 2009/2/3 Daniel-Constantin Mierla <miconda at gmail.com 
> <mailto:miconda at gmail.com>>
>
>     Hello,
>
>      
>     code will be unfrozen in few weeks. As personal preference,
>     returning code is a more flexible way, as the config writer can
>     chose what to send.
>
>     Changing the return code for a function is not a new feature IMO.
>     However, I mean by that to do it with the current design. If I am
>     not wrong there is a pipe communication between sip worker
>     processes and purple worker processes.
>
>  
> Yes you're right, purple has it's own process.
>  
>  
>
>     You cannot get the error in purple processes and return it in the
>     sip process. What you can do is to have a different reply code if
>     you had an error while building the packet for purple process
>     (e.g., no more memory) and once you send it to purple process
>     return true and the code writer should reply with 202 Message
>     accepted.
>
>  
> My problem is that I currently don't know how to return synchronously 
> a reply code from the pipe's other side.
> Can I use the pipe to write back from the purple process to the "main" 
> process ?
However you cannot wait until the final destination sends back a reply 
and makes no sense to wait for a reply from purple process. 202 Accepted 
is the code intended for such cases (gateway).

So, if you don't get any internal error until you put the message on the 
pipe, return true. If some errors, then you can differentiate via 
negative reply codes.

Cheers,
Daniel

-- 
Daniel-Constantin Mierla
http://www.asipto.com




More information about the Devel mailing list