partysip-dev
[Top][All Lists]
Advanced

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

Re: [Partysip-dev] filter plugin split?


From: Aymeric Moizard
Subject: Re: [Partysip-dev] filter plugin split?
Date: Fri, 25 Apr 2003 15:42:52 +0200 (CEST)


On Fri, 25 Apr 2003, Marian Durkovic wrote:

> Hi all,
>
>    I'm trying to implement forwarding to local PBX gateways using the filter
> plugin. I'd like to have it working like this:
>
>    user dials    2xxx        => call is forwarded to PBX gateway.
>
> I've set up the following filter rule:
>
> forward   ^sip:2([0-9][0-9][0-9])@|sip:address@hidden


> However, the above rule also matches when user calls e.g.
> address@hidden and incorrectly forwards the call to the local
> PBX gateway.

>   In principle I'd need the forwarding to be performed only when the host
> part of the URL matches serverip or servername, but not otherwise.

If you have only static IPs, then it's easy to write each rules
including the domains and ips. But I guess you don't?

>   One possible approach would be to split filter plugin into two -
> filter_local and filter_external and use the former only for requests
> matching serverip or servername and the later for anything else.
> This will allow to perform separate actions for local numbers - e.g.
> forwarding them to predefined gateways and different for external URLs
> (e.g. expand address@hidden into address@hidden)
>
>      What do you think?

That's a great idea!

The ideal way would be to add a new variable in the filter plugin
configuration:

 dialingplan  internal
 #dialingplan external
 #dialingplan both

This would need a very few change in the filter plugin.

I just tried to modify partysip to make it possible to
load several instance of the same plugin. With the above
fix, this would be enough.

The idea is to use this config:

plugins = udp syntax rgstrar filter filter ls_localdb ls_sfull
plugins_config = udp syntax rgstrar filter_internal filter_external ls_localdb 
ls_sfull

so that you can specify the same plugin several times with different
configuration in partysip.conf for each filter plugin Aymeric

But.... It does not work!
When a new request is received it is processed by both filter plugin
but the configuration used by both instance is the second one!

The global pointer 'filter_context' of both plugins points to the same
memory... I don't know yet the best way to resolv this...

Aymeric

>       Thanks,
>
>
>
>
> --------------------------------------------------------------------------
> ----                                                                  ----
> ----   Marian Durkovic                       network  manager         ----
> ----                                                                  ----
> ----   Slovak Technical University           Tel: +421 2 524 51 301   ----
> ----   Computer Centre, Nam. Slobody 17      Fax: +421 2 524 94 351   ----
> ----   812 43 Bratislava, Slovak Republic    E-mail: address@hidden        
> ----
> ----                                                                  ----
> --------------------------------------------------------------------------
>
>
> _______________________________________________
> Partysip-dev mailing list
> address@hidden
> http://mail.nongnu.org/mailman/listinfo/partysip-dev
>





reply via email to

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