Re: [SR-Users] Trouble with nat_uac_test()

2016-08-18 Thread Daniel-Constantin Mierla


On 17/08/16 20:26, Noah Mehl wrote:
> I discussed this with Alex Balashov off-line, and he answered my
> questions:
>
>>
>>  1. A flag of 3, I don’t understand.  I read the documentation
>> 
>> ,
>> and there is a 1,2,4,8,etc…  So, I’m guessing that a flag of 3,
>> means 1+2?
>>
>
> Yes, apparently this is a bit
> array: https://en.wikipedia.org/wiki/Bit_array and a value of 3 = 1+2.
>
>>  2. If #1 is true, then "the "received" test is used: address in
>> the “Via” header is compared against source IP address of signaling”
>>  1. I don’t understand this test, as I’m pretty sure that the
>> 200OK that’s getting re-written is properly constructed.  I
>> guess I’m trying to understand when one would want to use
>> this test?
>>
>
> Although we weren’t able to come up with an example for this test, it
> does not seem to apply to my environment.  Updating the flag to 1
> solves my issue.
This is when the sip message was sent from a.b.c.d and the Via header
has x.y.z.w. if you get a pcap with the request, we can check and see if
the test is true for it.

On the other hand, you should use
set_contact_alias()/handle_ruri_alias() instead of fix_nated_contact()
(see how default kamailio.cfg does it) -- it is safer for such cases and
avoids getting in troubles with devices that are strict in checking if
the r-uri is the contact they set previously.

Cheers,
Daniel

-- 
Daniel-Constantin Mierla
http://www.asipto.com - http://www.kamailio.org
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Trouble with nat_uac_test()

2016-08-18 Thread Alex Balashov

On 08/18/2016 03:02 AM, Daniel-Constantin Mierla wrote:


This is when the sip message was sent from a.b.c.d and the Via header
has x.y.z.w. if you get a pcap with the request, we can check and see if
the test is true for it.


In Noah's case, this posed an issue because the request was being 
received from a proxy. The proxy strips off its Via, and the topmost 
exposed Via has the network & transport-layer reachability information 
of the UAS that received the reinvite (originated on Noah's end). Both 
proxy and UAS are public, but different entities.



On the other hand, you should use
set_contact_alias()/handle_ruri_alias() instead of fix_nated_contact()
(see how default kamailio.cfg does it) -- it is safer for such cases and
avoids getting in troubles with devices that are strict in checking if
the r-uri is the contact they set previously.


Agree. I have moved to this nowadays for all cases that were handled 
with fix_nated_contact() in the past for just this reason.


-- Alex

--
Alex Balashov | Principal | Evariste Systems LLC
1447 Peachtree Street NE, Suite 700
Atlanta, GA 30309
United States

Tel: +1-800-250-5920 (toll-free) / +1-678-954-0671 (direct)
Web: http://www.evaristesys.com/, http://www.csrpswitch.com/

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] To/From tags in uac_req()

2016-08-18 Thread Julia Boudniatsky
Hello,

Is it possible to set To/From tags in uac_req() ?
We want to implement service like "color ring back tone".

*Kamailio  uac* *Asterisk*

INVITE SDP -->
<-200 SDP--
-BYE  -->
<--- 200   ---

I need to send in BYE the same tags.
Kamailio 4.4.2.

Thanks,

Julia
___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] To/From tags in uac_req()

2016-08-18 Thread Alex Balashov

Hi Julia,

The only attributes that can be set on a request formed with uac_req() 
are listed here:


http://www.kamailio.org/wiki/cookbooks/4.4.x/pseudovariables#uac_req_key

Tags are not among them.

However, it might be possible to generate a completely synthetic SIP 
message yourself using an alternate facility:


http://kamailio.org/docs/modules/4.4.x/modules/corex.html#corex.f.send_data

-- Alex

On 08/18/2016 03:27 AM, Julia Boudniatsky wrote:


Hello,

Is it possible to set To/From tags in uac_req() ?
We want to implement service like "color ring back tone".

_Kamailio  uac_ _Asterisk_

INVITE SDP -->
<-200 SDP--
-BYE  -->
<--- 200   ---

I need to send in BYE the same tags.
Kamailio 4.4.2.

Thanks,

Julia



___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users




--
Alex Balashov | Principal | Evariste Systems LLC
1447 Peachtree Street NE, Suite 700
Atlanta, GA 30309
United States

Tel: +1-800-250-5920 (toll-free) / +1-678-954-0671 (direct)
Web: http://www.evaristesys.com/, http://www.csrpswitch.com/

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] To/From tags in uac_req()

2016-08-18 Thread Julia Boudniatsky
Thank you Alex!
I'll try it.
Best regards,
Julia

On Thu, Aug 18, 2016 at 10:32 AM, Alex Balashov 
wrote:

> Hi Julia,
>
> The only attributes that can be set on a request formed with uac_req() are
> listed here:
>
> http://www.kamailio.org/wiki/cookbooks/4.4.x/pseudovariables#uac_req_key
>
> Tags are not among them.
>
> However, it might be possible to generate a completely synthetic SIP
> message yourself using an alternate facility:
>
> http://kamailio.org/docs/modules/4.4.x/modules/corex.html#
> corex.f.send_data
>
> -- Alex
>
> On 08/18/2016 03:27 AM, Julia Boudniatsky wrote:
>
> Hello,
>>
>> Is it possible to set To/From tags in uac_req() ?
>> We want to implement service like "color ring back tone".
>>
>> _Kamailio  uac_ _Asterisk_
>>
>> INVITE SDP -->
>> <-200 SDP--
>> -BYE  -->
>> <--- 200   ---
>>
>> I need to send in BYE the same tags.
>> Kamailio 4.4.2.
>>
>> Thanks,
>>
>> Julia
>>
>>
>>
>> ___
>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
>> sr-users@lists.sip-router.org
>> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>>
>>
>
> --
> Alex Balashov | Principal | Evariste Systems LLC
> 1447 Peachtree Street NE, Suite 700
> Atlanta, GA 30309
> United States
>
> Tel: +1-800-250-5920 (toll-free) / +1-678-954-0671 (direct)
> Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
>
> ___
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users@lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>
___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] To/From tags in uac_req()

2016-08-18 Thread Daniel-Constantin Mierla
Hello,

an alternative is to track the call with dialog module and then trigger
the end of the dialog via config or mi/rpc:

  -
https://www.kamailio.org/docs/modules/stable/modules/dialog.html#idp47915332

  -
https://www.kamailio.org/docs/modules/stable/modules/dialog.html#idp47967692

Cheers,
Daniel


On 18/08/16 09:40, Julia Boudniatsky wrote:
> Thank you Alex!
> I'll try it.
> Best regards,
> Julia
>
> On Thu, Aug 18, 2016 at 10:32 AM, Alex Balashov
> mailto:abalas...@evaristesys.com>> wrote:
>
> Hi Julia,
>
> The only attributes that can be set on a request formed with
> uac_req() are listed here:
>
> http://www.kamailio.org/wiki/cookbooks/4.4.x/pseudovariables#uac_req_key
> 
>
> Tags are not among them.
>
> However, it might be possible to generate a completely synthetic
> SIP message yourself using an alternate facility:
>
> 
> http://kamailio.org/docs/modules/4.4.x/modules/corex.html#corex.f.send_data
> 
> 
>
> -- Alex
>
> On 08/18/2016 03:27 AM, Julia Boudniatsky wrote:
>
> Hello,
>
> Is it possible to set To/From tags in uac_req() ?
> We want to implement service like "color ring back tone".
>
> _Kamailio  uac_ _Asterisk_
>
> INVITE SDP -->
> <-200 SDP--
> -BYE  -->
> <--- 200   ---
>
> I need to send in BYE the same tags.
> Kamailio 4.4.2.
>
> Thanks,
>
> Julia
>
>
>
> ___
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users
> mailing list
> sr-users@lists.sip-router.org
> 
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
> 
>
>
>
> -- 
> Alex Balashov | Principal | Evariste Systems LLC
> 1447 Peachtree Street NE, Suite 700
> Atlanta, GA 30309
> United States
>
> Tel: +1-800-250-5920  (toll-free) /
> +1-678-954-0671  (direct)
> Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
>
> ___
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing
> list
> sr-users@lists.sip-router.org 
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
> 
>
>
>
>
> ___
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users@lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

-- 
Daniel-Constantin Mierla
http://www.asipto.com - http://www.kamailio.org
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] To/From tags in uac_req()

2016-08-18 Thread Julia Boudniatsky
Hello Daniel,

How to track with dialog the call initiated by Kamailio ?
Simple dlg_manage(), after uac_req_send()?

Thank you,

Julia.


On Thu, Aug 18, 2016 at 10:53 AM, Daniel-Constantin Mierla <
mico...@gmail.com> wrote:

> Hello,
>
> an alternative is to track the call with dialog module and then trigger
> the end of the dialog via config or mi/rpc:
>
>   - https://www.kamailio.org/docs/modules/stable/modules/dialog.
> html#idp47915332
>
>   - https://www.kamailio.org/docs/modules/stable/modules/dialog.
> html#idp47967692
>
> Cheers,
> Daniel
>
> On 18/08/16 09:40, Julia Boudniatsky wrote:
>
> Thank you Alex!
> I'll try it.
> Best regards,
> Julia
>
> On Thu, Aug 18, 2016 at 10:32 AM, Alex Balashov  > wrote:
>
>> Hi Julia,
>>
>> The only attributes that can be set on a request formed with uac_req()
>> are listed here:
>>
>> http://www.kamailio.org/wiki/cookbooks/4.4.x/pseudovariables#uac_req_key
>>
>> Tags are not among them.
>>
>> However, it might be possible to generate a completely synthetic SIP
>> message yourself using an alternate facility:
>>
>> http://kamailio.org/docs/modules/4.4.x/modules/corex.html#co
>> rex.f.send_data
>>
>> -- Alex
>>
>> On 08/18/2016 03:27 AM, Julia Boudniatsky wrote:
>>
>> Hello,
>>>
>>> Is it possible to set To/From tags in uac_req() ?
>>> We want to implement service like "color ring back tone".
>>>
>>> _Kamailio  uac_ _Asterisk_
>>>
>>> INVITE SDP -->
>>> <-200 SDP--
>>> -BYE  -->
>>> <--- 200   ---
>>>
>>> I need to send in BYE the same tags.
>>> Kamailio 4.4.2.
>>>
>>> Thanks,
>>>
>>> Julia
>>>
>>>
>>>
>>> ___
>>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
>>> sr-users@lists.sip-router.org
>>> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>>>
>>>
>>
>> --
>> Alex Balashov | Principal | Evariste Systems LLC
>> 1447 Peachtree Street NE, Suite 700
>> Atlanta, GA 30309
>> United States
>>
>> Tel: +1-800-250-5920 (toll-free) / +1-678-954-0671 (direct)
>> Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
>>
>> ___
>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
>> sr-users@lists.sip-router.org
>> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>>
>
>
>
> ___
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing 
> listsr-us...@lists.sip-router.orghttp://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>
>
> --
> Daniel-Constantin Mierlahttp://www.asipto.com - 
> http://www.kamailio.orghttp://twitter.com/#!/miconda - 
> http://www.linkedin.com/in/miconda
>
>
> ___
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users@lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>
>
___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] Howto timeout INVITEs over TCP to something < 30s?

2016-08-18 Thread Daniel Tryba
If an enduser INVITEted over TCP t_set_fr(t) with t < 30s have no
effect, the INVITE will always timeout after 30s. What is controlling
this 30s? The only default at 30s is the fr_timer, which should have no
part in the timeout between an 1xx and a final answer for an INVITE.


___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] Running both 4.3 and 4.4 with the same database with permission module

2016-08-18 Thread Daniel Tryba
I want to upgrade my cluster from 4.3 to 4.4, beginning with the spare
for live testing. But since there is a change to the trusted table
(which we don't use, only address) this isn't possible without some
tricks. There is no override for skipping the version check on any
permissions table.

I need to share the subscriber/location/address/usr_preferences and
db_aliases tables between the 4.3 and 4.4 machines. The only thing I can
think of is:
-patch the permissions module to accept the old version of trusted
-create a 4.4 database and use federated tables to access the 4.3 data

Not hard to implement any of these 2, but some other modules have the
option to skip these checks, eg: 
http://www.kamailio.org/docs/modules/4.4.x/modules/auth_db.html#auth_db.p.version_table

Is there a reason not all modules have this flag (which you could use at
your own risk)? Or am I missing something here?

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Running both 4.3 and 4.4 with the same database with permission module

2016-08-18 Thread Alex Hermann
On donderdag 18 augustus 2016 12:29:25 CEST Daniel Tryba wrote:
> I want to upgrade my cluster from 4.3 to 4.4, beginning with the spare
> for live testing. But since there is a change to the trusted table
> (which we don't use, only address) this isn't possible without some
> tricks. There is no override for skipping the version check on any
> permissions table.

The changes are backwards compatible with the old version. You can just use 
another "version" table on the new instance.

http://sip-router.org/wiki/cookbooks/core-cookbook/devel#version_table

Seems docs haven't made it to kamailio.org.


> I need to share the subscriber/location/address/usr_preferences and
> db_aliases tables between the 4.3 and 4.4 machines. The only thing I can
> think of is:
> -patch the permissions module to accept the old version of trusted
> -create a 4.4 database and use federated tables to access the 4.3 data
> 
> Not hard to implement any of these 2, but some other modules have the
> option to skip these checks, eg:
> http://www.kamailio.org/docs/modules/4.4.x/modules/auth_db.html#auth_db.p.ve
> rsion_table

IMHO that option needs to be removed.
-- 
Greetings,

Alex Hermann



___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] detect failed socket

2016-08-18 Thread Péter Barabás
Hello,

I want to refine the instant message handling in our application. It works 
really fine in most cases. I use the msilo module to store offline messages if 
the user is not registered with sending PUSH notification.
But, there is a situation when I have problems:
When I send a message to a user whose phone is in airplane mode. In this case 
his location record exists but the communication on the socket is not possible 
and the client timed out the request.

Is it possible to check the socket towards the receiver user at the moment when 
the message arrives at Kamailio? I think if I would check that if the socket is 
not fine, I could send the message to the msilo directly and the client would 
not have wait for timeout to resend.

Thanks.

Peter


___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Running both 4.3 and 4.4 with the same database with permission module

2016-08-18 Thread Daniel Tryba
On Thu, Aug 18, 2016 at 03:50:53PM +0200, Alex Hermann wrote:
> > I want to upgrade my cluster from 4.3 to 4.4, beginning with the spare
> > for live testing. But since there is a change to the trusted table
> > (which we don't use, only address) this isn't possible without some
> > tricks. There is no override for skipping the version check on any
> > permissions table.
> 
> The changes are backwards compatible with the old version. You can just use 
> another "version" table on the new instance.
> 
> http://sip-router.org/wiki/cookbooks/core-cookbook/devel#version_table
> 
> Seems docs haven't made it to kamailio.org.

Perfect. Just what is needed in this kind of scenario. But before this
goes to kamailio.org:

>version_table
>
>Set the name of the table holding the table version. Usefull if the
>proxy is sharing a database within a project and during upgrades.
>Default value is "version". 
>
> Example of usage:
>
>table_version=sr_table_version

This example isn't correct, it's version_table not table_version
according to 4.4.x cfg.lex

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] Call forking with delay

2016-08-18 Thread Igor Potjevlesch
Hello list,

I have a proxy that manage fix calls and a proxy that manage mobile calls.
I want to implement call forking so when I call to a fix phone the call
goes to the fix proxy and it forks to the mobile proxy who manage the call
and viceversa. I want the fix to ring 2 or 3 times before the mobile.

In order to do so in my fix proxy I added a diversion field with the reason
"forking" and in my mobile proxy I check if the reason is "forking" to wait
with the fonction "async_route" from the ASYNC module. When I call the fix
I can fork to the mobile with delay without any problem because in that
case my fix proxy manage one call and my mobile proxy the other one.

But when I call the mobile the call doesn't even get to my fix proxy
because my mobile proxy has to make the original call to wait while he is
forking the fix call to my other proxy. And i think that calling the
async_route fonction makes both calls to wait.

My code is:

Fix proxy:

if($tU==123456789){
   add_diversion("forking");
   append_branch("sip:987654321@proxy_mobile");
}

Mobile proxy:

if($tU==987654321){
   $var(z) = "1";
   append_branch("sip:123456789@proxy_fix");
}


route[INVITE]{

if($dir == "forking"){
   async_route("RELAY", "7");
}else if($var(z) == "1"){
   async_route("RELAY", "7");
}else{
   route(RELAY);
   exit;
}

}


How can I differentiate in the second scenario when I call the mobile phone
to fork to the fix phone?

Thank you for your help.

Igor.
___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users