[Top][All Lists]

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

[Partysip-announce] Christmas plugin for partysip :)

From: Aymeric Moizard
Subject: [Partysip-announce] Christmas plugin for partysip :)
Date: Wed, 18 Dec 2002 17:37:20 +0100 (CET)

A new highly wanted GPL plugin is now available in the
CVS repository: the filter "plugin".

This plugin is not really a filter by now (only the 'forward'
rule is implemented so it can't be used yet to reject some
calls). Anyway, this gives you the capability to rewrite request-uri
-destination of SIP messages- so you can modify the called number,
rewrite a "tel" url into a sip one and finally give static routes
to proxy or special users for some calls.

All this stuff is made through regex.h posix interface. I hope this
won't break any ports -I did a few test on linux only-.

Let me explain you the configuration capability:

  mode          statefull

  # mode        redirect
  # record-route  on

This is the simplest form:
 url that match: ^tel:1([0-9]+)
   like tel:0000, tel:0111 tel:01223445
 will be send to a static url for support:
 Isn't it usefull? :)

  forward    ^tel:1([0-9]+)|sip:address@hidden

The following rule show that when a rule match, you can get
the string that matched and rewrite it in "%1" so that:
 tel:011111 will become sip:address@hidden;user=phone

You can see that you can automatically rewrite the user part of
the url! and give a static route for all internationnal call (wich
are know to start with 08 or 09 from the company. It's your choice
to append 0033 yourself or let the user type it of course.

This can also be usefull if you want to route internationnal call
to US via a US sip gateway and internationnal call to spain via
a spanish SIP gateway...

  forward    ^tel:0[89]([0-9]+)|sip:address@hidden;user=phone

One more feature is that you can rewrite up to 2 element in the url as
shown in the following. Of course, it worth to say that you can match sip

  forward    ^tel:(1[01])([0-9]+)|sip:address@hidden
  forward    ^sip:2([0-9]+)@([a-zA-Z0-9]+)|sip:address@hidden

Note that "%3" is not implemented... So you can only put between "(" and
")" two expressions.


Enjoy and give feedback.

reply via email to

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