partysip-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Partysip-dev] sfp plugin or imp plugin?


From: Aymeric Moizard
Subject: Re: [Partysip-dev] sfp plugin or imp plugin?
Date: Wed, 12 Feb 2003 13:13:46 +0100 (CET)


On Tue, 11 Feb 2003, Roland Zheng wrote:

> Hi,
>   Here is my case. please help me to figure out.

>  I need an plugin which will track a call and change something in
>  requests whithin the call.

>   I need first determine if a request is associated with an existing call,

If you want to be on the path of request within call, you MUST enable
record-route. Then, a request within a call will a some Route headers.
You MUST check for the presence of the "psp" parameter in Route request
because this indicates that the route header is not a "pre route-set"
(see the spec for the definition of a pre route set). If no route
header is found or a route without a psp parameter is found, then
the request is within an existing call. (So there is no need to maintain
any state to detect this)

You can pick the code in partysip/plugin/filter.c which actually detect
this at the begining of the method for incoming request.

>   then change the request according to the first INVITE for the call.

If you wish to modify an outgoing request from plugins, you have to
finish the support for plugins that rewrite outgoing requests.
No plugins is able to do that actually.

> So I have to mantain all the information about the call until it
> released.

>  My question is what kind of plugin I should build , imp or sfp?

If you have to make decisions (accept/reject) when a new
request is received, your new plugin must registrer as an
imp plugin.

To modify outgoing request, you have to registrer callback as
an sfp plugin, but as I said, this is not fully finished in
partysip. (you can load/register it, but I'm not sure it will
be actually called!!)

>  if it's sfp, there is no sample, can you give me any ideas?

This only thing you may need to finish to implement is to
call the plugins callback related to sfp in sfp.c.

Aymeric

>  Can you give me any advice how to handle this case?
>
> Thanks,
>
> Roland
>
>





reply via email to

[Prev in Thread] Current Thread [Next in Thread]