[Spce-user] rewrite rules

Barry Flanagan barry at flanagan.ie
Wed Apr 24 11:20:04 EDT 2013


On 24 April 2013 15:55, Jon Bonilla <jbonilla at sipwise.com> wrote:

> El Wed, 24 Apr 2013 15:29:26 +0100
> Barry Flanagan <barry at flanagan.ie> escribió:
>
> > On 24 April 2013 15:17, Jon Bonilla <jbonilla at sipwise.com> wrote:
> >
> > > El Wed, 24 Apr 2013 13:16:31 +0100
> > > Barry Flanagan <barry at flanagan.ie> escribió:
> > >
> > > >
> > > > Would it not make sense to have a setting to force an account or
> > > subscriber
> > > > to a particular Peer Group?
> > >
> > >
> > > Did you try to use caller_pattern in the peering rules? If you set
> thse,
> > > only
> > > the matching callers will be allowed to use that peering rule i
> particular
> > > and
> > > you can match domains if you need to.
> > >
> >
> > Yes, that was my "Method 2" and it is working. Problem is that this
> > requires manipulating the Caller CLI which I have to be careful then to
> > change back before sending the call on. Not a big problem I suppose and
> it
> > all works as I need for now. However I can't help thing that it would get
> > hard to maintain with more domains and peers, and that a setting to
> always
> > send a particular sub/domain to a particular peer group would be useful.
> >
>
> but why manipulation of caller_cli?  You can match entire domains with it.
> It
> matches "number at domain"
>
>
I need to route different subscribers within the same domain to different
peers in this case.

My steering digits are 3872

If I set an inbound caller rewrite to prepend these steering digits, they
change the user-provided CLI. This user-provided CLI is then checked
against the allowed CLI and it is rejected, and replaced with the
network-provided  CLI. This removes the steering digits. See the logs below.

The only way I can see of getting around that is to set the
network-provided CLI to include my steering digits and then discard them
before the call is terminated.

Apr 24 16:08:30 sipwise /usr/sbin/kamailio[5013]: INFO: <script>:
User-Provided CLI 'XXXXXXXXX' taken from From-User - R=
sip:XXXXXXX at 10.10.10.10 ID=7sTs.hql-qN20.zEwvhCcLHw2x5xoU7x
Apr 24 16:08:30 sipwise /usr/sbin/kamailio[5013]: INFO: <script>: Applying
caller-in domain rewrite rules on user-provided CLI using dpid '1' - R=
sip:XXXXXXX at 10.10.10.10 ID=7sTs.hql-qN20.zEwvhCcLHw2x5xoU7x
Apr 24 16:08:30 sipwise /usr/sbin/kamailio[5013]: INFO: <script>: Rewriting
user-provided CLI 'XXXXXXXXX' to '3872XXXXXXXXX' -
R=sip:XXXXXXX at 10.10.10.10ID=7sTs.hql-qN20.zEwvhCcLHw2x5xoU7x
Apr 24 16:08:30 sipwise /usr/sbin/kamailio[5013]: INFO: <script>: Checking
User-provided CLI against allowed CLIs -
R=sip:XXXXXXX at 10.10.10.10ID=7sTs.hql-qN20.zEwvhCcLHw2x5xoU7x
Apr 24 16:08:30 sipwise /usr/sbin/kamailio[5013]: INFO: <script>:
User-provided CLI '3872XXXXXXXXX' rejected, using network-provided CLI
'YYYYYYYYYY' - R=sip:XXXXXXX at 10.10.10.10 ID=7sTs.hql-qN20.zEwvhCcLHw2x5xoU7x


Regards,

-Barry
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sipwise.com/pipermail/spce-user_lists.sipwise.com/attachments/20130424/24f1ae36/attachment-0001.html>


More information about the Spce-user mailing list