[prev in list] [next in list] [prev in thread] [next in thread] 

List:       serusers
Subject:    Re: [SR-Users] forwarding multiple times
From:       "hdssdsdsdsfsdf hdssdsdsdsfsdf" <hdssdsdsdsfsdf () mail ! com>
Date:       2017-04-26 16:38:15
Message-ID: trinity-aac66ff6-b912-4136-a5ba-c030c646da9f-1493224695672 () 3capp-mailcom-lxa11
[Download RAW message or body]

Perhaps someone knows the rationale behind behavior of forward() that I find odd.

For example:
ds_select_domain();
forward();
subst('/(To: .*)/To: bla\n/g');
forward();
subst('/(To: .*)/To: bla\n/g');
forward();
subst('/(To: .*)/To: bla\n/g');

This should result in just a substitution of the To-header. In stead, each time a \
to-header is added, resulting in the final forwarded sip-messages containing many \
to-headers.

Is this a bug? Or am I missing something that forward is supposed to do? It seems as \
if it keeps track of a separate sip-message, and adds modifications there, in stead \
of replacing them.

In any case, it's this behaviour that is causing troubles implementing the case as \
described before.


> Sent: Monday, April 24, 2017 at 3:35 PM
> From: "hdssdsdsdsfsdf hdssdsdsdsfsdf" <hdssdsdsdsfsdf@mail.com>
> To: sr-users@lists.kamailio.org
> Subject: [SR-Users] forwarding multiple times
> 
> Hi all,
> 
> I'm trying to transmit a CANCEL sip message from one server to multiple other \
> servers (using ds_select_domain and ds_next_domain). Ideally, I would simply use \
> forward() multiple times. The problem is however, that this would apply the changes \
> of forward() multiple times too, for example adding multiple via-headers. I tried \
> to use forward() for the first transmission and then send() for the next ones, but \
> it turns out send() uses the original message to send, and not the message as \
> crafted by forward. 
> As such, it seems I need exactly what's in the middle of these: Either a forward \
> that operates on the original message, or a send that operates on the message as \
> crafter by previous forward. Does anyone know how to achieve this? 
> The only other solution I see is to manually write some forwarding routing, but it \
> seems tedious to craft the via-headers and fix the domain to be forwarded to. 
> Thanks and cheers,
> 
> _______________________________________________
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
> 

_______________________________________________
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic