Re: [OpenSIPS-Users] event routing and rtpengine

2018-10-09 Thread Tito Cumpen
Bogdan,

Re awakening this question I have tried the following

route[fork_call]  {
xlog("user $avp(aor) registered the a new contact $avp(uri), "
"injecting it in transaction with transport   $avp(transport)\n");
xlog("destination protocol $var(transport) upstream ts
$var(upstreamtransport) ");
# take the contact described by the E_UL_CONTACT_INSERT
# event and inject it as a new branch into the original transaction
t_on_reply("handle_nat");
  if($avp(uri)=~"sip:(.+)@(.+);transport=tls"){
   xlog("destination tls\n");
$var(rtpengine_flags) = "RTP/AVPF replace-session-connection replace-origin
ICE=remove rtcp-mux-demux via-branch=1";
rtpengine_offer("$var(rtpengine_flags)");
}
t_inject_branches("event");


The issue I have is grabbing the value of the remote request  transport
flag along with sending the offer to rtpengine which fails to acquire the
call-id

ERROR:rtpengine:rtpe_function_call: can't get Call-Id field

On Thu, Jun 14, 2018 at 12:59 AM Bogdan-Andrei Iancu 
wrote:

> Hi Tito,
>
> The resume route has no context of the transaction, nor message -> so the
> bflags are not available. Still, the event carries all the information
> about the new branch to be injected, so you can reach to the flags via the
> $avp(bflags) variables - this will keep the bitmask with all the bflags.
> Unfortunately it will be more or less useless as you do not know the index
> of the "DST_WS" flag :(...
>
> Nevertheless, the consistent approach on the matter will be to have the
> all the needed bflags already saved in the user location.
>
> Regards,
>
> Bogdan-Andrei Iancu
>
> OpenSIPS Founder and Developer
>   http://www.opensips-solutions.com
> OpenSIPS Summit 2018
>   http://www.opensips.org/events/Summit-2018Amsterdam
>
> On 05/02/2018 01:08 AM, Tito Cumpen wrote:
>
> Any idea why the branch flags wouldn't be passed on to the branch route?
>
> Thanks,
> Tito
>
> On Thu, Apr 19, 2018 at 2:02 PM, Tito Cumpen  wrote:
>
>> Bogdan,
>>
>>
>> Once I declared the branch route it looks like it is going through the
>> branch route logic.  The issue I have is parsing the exported $avp(uri) for
>> transport=ws and then setting a branch flag that is kept from the event
>> route
>>
>> route[fork_call]  {
>> xlog("user $avp(aor) registered the a new contact $avp(uri), "
>> "injecting it in transaction \n");
>>
>> $var(uri) = $avp(uri);
>>#if transport is ws then ;
>> setbflag(DST_WS); #this branch flag is not kept nor considered when
>> branch route is executed
>>
>> t_inject_branches("event");
>>
>> }
>>
>> Thanks,
>> Tito
>>
>> On Thu, Apr 19, 2018 at 3:23 AM, Bogdan-Andrei Iancu > > wrote:
>>
>>> Tito,
>>>
>>> Arming the branch route once, in the request route, before the initial
>>> t_relay() should be fine. Now, if you use any xlog() to check , is the
>>> branch route triggered for the injected branch ?
>>>
>>> Regards,
>>>
>>> Bogdan-Andrei Iancu
>>>
>>> OpenSIPS Founder and Developer
>>>   http://www.opensips-solutions.com
>>> OpenSIPS Summit 2018
>>>   http://www.opensips.org/events/Summit-2018Amsterdam
>>>
>>> On 04/18/2018 08:35 PM, Tito Cumpen wrote:
>>>
>>> Bogdan,
>>>
>>> The branch route is defined in my my relay route.
>>> https://pastebin.com/MFcLxcDv Should it be defined in the event route I
>>> figured since the original transaction used the relay route it would use
>>> the route defined there ?
>>>
>>> Thanks,
>>> Tito
>>>
>>>
>>>
>>>
>>>
>>> On Wed, Apr 18, 2018 at 9:32 AM, Bogdan-Andrei Iancu <
>>> bog...@opensips.org> wrote:
>>>
 Hi Tito,

 I see no branch route in your script sample.

 Regards,

 Bogdan-Andrei Iancu

 OpenSIPS Founder and Developer
   http://www.opensips-solutions.com
 OpenSIPS Summit 2018
   http://www.opensips.org/events/Summit-2018Amsterdam

 On 04/16/2018 09:37 PM, Tito Cumpen wrote:

 Group,

 I am having issues when injecting a new branch with rtpengine flags to
 a call request using the event routing module. It seems like when the
 branch is injected it either does not use any of the flags to aid with
 rtpengine media translation or does not run through the branch route block
 defined in my relay route at all.

 https://pastebin.com/u1EYzDe0

 above is the route that prepares injection and transport priorities
 along with the route that gets called upon a new registration.

 Thanks,
 Tito


 ___
 Users mailing 
 listUsers@lists.opensips.orghttp://lists.opensips.org/cgi-bin/mailman/listinfo/users



>>>
>>>
>>
>
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] event routing and rtpengine

2018-06-14 Thread Bogdan-Andrei Iancu

Hi Tito,

The resume route has no context of the transaction, nor message -> so 
the bflags are not available. Still, the event carries all the 
information about the new branch to be injected, so you can reach to the 
flags via the $avp(bflags) variables - this will keep the bitmask with 
all the bflags. Unfortunately it will be more or less useless as you do 
not know the index of the "DST_WS" flag :(...


Nevertheless, the consistent approach on the matter will be to have the 
all the needed bflags already saved in the user location.


Regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  http://www.opensips-solutions.com
OpenSIPS Summit 2018
  http://www.opensips.org/events/Summit-2018Amsterdam

On 05/02/2018 01:08 AM, Tito Cumpen wrote:

Any idea why the branch flags wouldn't be passed on to the branch route?

Thanks,
Tito

On Thu, Apr 19, 2018 at 2:02 PM, Tito Cumpen > wrote:


Bogdan,


Once I declared the branch route it looks like it is going through
the branch route logic.  The issue I have is parsing the exported
$avp(uri) for transport=ws and then setting a branch flag that is
kept from the event route

route[fork_call]  {
xlog("user $avp(aor) registered the a new contact $avp(uri), "
"injecting it in transaction \n");
$var(uri) = $avp(uri);
   #if transport is ws then ;
setbflag(DST_WS); #this branch flag is not kept nor considered
when branch route is executed

t_inject_branches("event");
}

Thanks,
Tito

On Thu, Apr 19, 2018 at 3:23 AM, Bogdan-Andrei Iancu
mailto:bog...@opensips.org>> wrote:

Tito,

Arming the branch route once, in the request route, before the
initial t_relay() should be fine. Now, if you use any xlog()
to check , is the branch route triggered for the injected branch ?

Regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
   http://www.opensips-solutions.com

OpenSIPS Summit 2018
   http://www.opensips.org/events/Summit-2018Amsterdam


On 04/18/2018 08:35 PM, Tito Cumpen wrote:

Bogdan,

The branch route is defined in my my relay route.
https://pastebin.com/MFcLxcDv 
Should it be defined in the event route I figured since the
original transaction used the relay route it would use the
route defined there ?

Thanks,
Tito





On Wed, Apr 18, 2018 at 9:32 AM, Bogdan-Andrei Iancu
mailto:bog...@opensips.org>> wrote:

Hi Tito,

I see no branch route in your script sample.

Regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
   http://www.opensips-solutions.com

OpenSIPS Summit 2018
   http://www.opensips.org/events/Summit-2018Amsterdam


On 04/16/2018 09:37 PM, Tito Cumpen wrote:

Group,

I am having issues when injecting a new branch with
rtpengine flags to a call request using the event
routing module. It seems like when the branch is
injected it either does not use any of the flags to aid
with rtpengine media translation or does not run through
the branch route block defined in my relay route at all.

https://pastebin.com/u1EYzDe0

above is the route that prepares injection and transport
priorities along with the route that gets called upon a
new registration.

Thanks,
Tito


___
Users mailing list
Users@lists.opensips.org 
http://lists.opensips.org/cgi-bin/mailman/listinfo/users










___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] event routing and rtpengine

2018-04-19 Thread Tito Cumpen
Bogdan,


Once I declared the branch route it looks like it is going through the
branch route logic.  The issue I have is parsing the exported $avp(uri) for
transport=ws and then setting a branch flag that is kept from the event
route

route[fork_call]  {
xlog("user $avp(aor) registered the a new contact $avp(uri), "
"injecting it in transaction \n");

$var(uri) = $avp(uri);
   #if transport is ws then ;
setbflag(DST_WS); #this branch flag is not kept nor considered when
branch route is executed

t_inject_branches("event");

}

Thanks,
Tito

On Thu, Apr 19, 2018 at 3:23 AM, Bogdan-Andrei Iancu 
wrote:

> Tito,
>
> Arming the branch route once, in the request route, before the initial
> t_relay() should be fine. Now, if you use any xlog() to check , is the
> branch route triggered for the injected branch ?
>
> Regards,
>
> Bogdan-Andrei Iancu
>
> OpenSIPS Founder and Developer
>   http://www.opensips-solutions.com
> OpenSIPS Summit 2018
>   http://www.opensips.org/events/Summit-2018Amsterdam
>
> On 04/18/2018 08:35 PM, Tito Cumpen wrote:
>
> Bogdan,
>
> The branch route is defined in my my relay route. https://pastebin.com/
> MFcLxcDv Should it be defined in the event route I figured since the
> original transaction used the relay route it would use the route defined
> there ?
>
> Thanks,
> Tito
>
>
>
>
>
> On Wed, Apr 18, 2018 at 9:32 AM, Bogdan-Andrei Iancu 
> wrote:
>
>> Hi Tito,
>>
>> I see no branch route in your script sample.
>>
>> Regards,
>>
>> Bogdan-Andrei Iancu
>>
>> OpenSIPS Founder and Developer
>>   http://www.opensips-solutions.com
>> OpenSIPS Summit 2018
>>   http://www.opensips.org/events/Summit-2018Amsterdam
>>
>> On 04/16/2018 09:37 PM, Tito Cumpen wrote:
>>
>> Group,
>>
>> I am having issues when injecting a new branch with rtpengine flags to a
>> call request using the event routing module. It seems like when the branch
>> is injected it either does not use any of the flags to aid with rtpengine
>> media translation or does not run through the branch route block defined in
>> my relay route at all.
>>
>> https://pastebin.com/u1EYzDe0
>>
>> above is the route that prepares injection and transport priorities along
>> with the route that gets called upon a new registration.
>>
>> Thanks,
>> Tito
>>
>>
>> ___
>> Users mailing 
>> listUsers@lists.opensips.orghttp://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>>
>>
>
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] event routing and rtpengine

2018-04-19 Thread Bogdan-Andrei Iancu

Tito,

Arming the branch route once, in the request route, before the initial 
t_relay() should be fine. Now, if you use any xlog() to check , is the 
branch route triggered for the injected branch ?


Regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  http://www.opensips-solutions.com
OpenSIPS Summit 2018
  http://www.opensips.org/events/Summit-2018Amsterdam

On 04/18/2018 08:35 PM, Tito Cumpen wrote:

Bogdan,

The branch route is defined in my my relay route. 
https://pastebin.com/MFcLxcDv Should it be defined in the event route 
I figured since the original transaction used the relay route it would 
use the route defined there ?


Thanks,
Tito





On Wed, Apr 18, 2018 at 9:32 AM, Bogdan-Andrei Iancu 
mailto:bog...@opensips.org>> wrote:


Hi Tito,

I see no branch route in your script sample.

Regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
   http://www.opensips-solutions.com 
OpenSIPS Summit 2018
   http://www.opensips.org/events/Summit-2018Amsterdam


On 04/16/2018 09:37 PM, Tito Cumpen wrote:

Group,

I am having issues when injecting a new branch with rtpengine
flags to a call request using the event routing module. It seems
like when the branch is injected it either does not use any of
the flags to aid with rtpengine media translation or does not run
through the branch route block defined in my relay route at all.

https://pastebin.com/u1EYzDe0

above is the route that prepares injection and transport
priorities along with the route that gets called upon a new
registration.

Thanks,
Tito


___
Users mailing list
Users@lists.opensips.org 
http://lists.opensips.org/cgi-bin/mailman/listinfo/users






___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] event routing and rtpengine

2018-04-18 Thread Tito Cumpen
Bogdan,

The branch route is defined in my my relay route.
https://pastebin.com/MFcLxcDv Should it be defined in the event route I
figured since the original transaction used the relay route it would use
the route defined there ?

Thanks,
Tito





On Wed, Apr 18, 2018 at 9:32 AM, Bogdan-Andrei Iancu 
wrote:

> Hi Tito,
>
> I see no branch route in your script sample.
>
> Regards,
>
> Bogdan-Andrei Iancu
>
> OpenSIPS Founder and Developer
>   http://www.opensips-solutions.com
> OpenSIPS Summit 2018
>   http://www.opensips.org/events/Summit-2018Amsterdam
>
> On 04/16/2018 09:37 PM, Tito Cumpen wrote:
>
> Group,
>
> I am having issues when injecting a new branch with rtpengine flags to a
> call request using the event routing module. It seems like when the branch
> is injected it either does not use any of the flags to aid with rtpengine
> media translation or does not run through the branch route block defined in
> my relay route at all.
>
> https://pastebin.com/u1EYzDe0
>
> above is the route that prepares injection and transport priorities along
> with the route that gets called upon a new registration.
>
> Thanks,
> Tito
>
>
> ___
> Users mailing 
> listUsers@lists.opensips.orghttp://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] event routing and rtpengine

2018-04-18 Thread Bogdan-Andrei Iancu

Hi Tito,

I see no branch route in your script sample.

Regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  http://www.opensips-solutions.com
OpenSIPS Summit 2018
  http://www.opensips.org/events/Summit-2018Amsterdam

On 04/16/2018 09:37 PM, Tito Cumpen wrote:

Group,

I am having issues when injecting a new branch with rtpengine flags to 
a call request using the event routing module. It seems like when the 
branch is injected it either does not use any of the flags to aid with 
rtpengine media translation or does not run through the branch route 
block defined in my relay route at all.


https://pastebin.com/u1EYzDe0

above is the route that prepares injection and transport priorities 
along with the route that gets called upon a new registration.


Thanks,
Tito


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] event routing and rtpengine

2018-04-16 Thread Tito Cumpen
Group,

I am having issues when injecting a new branch with rtpengine flags to a
call request using the event routing module. It seems like when the branch
is injected it either does not use any of the flags to aid with rtpengine
media translation or does not run through the branch route block defined in
my relay route at all.

https://pastebin.com/u1EYzDe0

above is the route that prepares injection and transport priorities along
with the route that gets called upon a new registration.

Thanks,
Tito
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users