[SR-Users] How do i build MSRP chat bot?

2017-04-07 Thread Pranathi Venkatayogi
I would like to place the customer connecting via SIP/MSRP on hold until I find 
the right destination.
What is the best way to do this?
  One idea is to write a MSRP bot. Does anyone know how to go about this?

Other smart ideas?

Thanks,
Pranathi Venkatayogi
System Developer II
(520) 745-9447 x4466
www.cyracom.com<http://www.cyracom.com/>

Join us:   [cid:image001.gif@01D1C9C9.C4E8B6D0] 
<https://www.facebook.com/pages/CyraCom-LLC/134704783312720>  
[cid:image002.gif@01D1C9C9.C4E8B6D0] <https://twitter.com/cyracom>  
[cid:image003.gif@01D1C9C9.C4E8B6D0] <http://www.linkedin.com/company/cyracom>  
[cid:image004.gif@01D1C9C9.C4E8B6D0] <http://www.cyracom.com/blog/>

[cid:image005.png@01D1C9C9.C4E8B6D0]

DISCLAIMER: This e-mail and any attached content may contain confidential or 
privileged material delivered for the sole use of the intended recipient(s). 
Any review, use, distribution or disclosure by others is strictly prohibited. 
If you are not the intended recipient (or authorized to receive for the 
recipient), please contact the sender immediately by reply e-mail and delete 
all copies of this message. It is the recipient's responsibility to scan this 
e-mail and any attachments for viruses. The content of this e-mail message, 
including any attachments, does not comprise a contract or a portion of a 
contract, and so does not bind CyraCom International, Inc. or any of its agents 
or subsidiaries. CyraCom, LLC and Voiance Language Services, LLC are wholly 
owned subsidiaries of CyraCom International, Inc.

___
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] MSRP with Kamailio

2017-02-09 Thread Pranathi Venkatayogi
In order to test server logic is correct, I hardcoded the password and called 
authenticate method. Still it returns -5.
I am attaching the config and relevant snippet below. Please let me know what 
is wrong with this logic.

# -- passwd can be loaded from DB based on $au
$var(passwd) = "password";
$var(retValue) = pv_www_authenticate("MY_DOMAIN", "$var(passwd)", "0", 
"$msrp(method)");
if (!pv_www_authenticate("MY_DOMAIN", "$var(passwd)", "0","$msrp(method)")) {
  xlog("L_ERR", "Translation: MSRP auth failed with: $var(retValue)\n");
}

-Original Message-----
From: Daniel-Constantin Mierla [mailto:mico...@gmail.com] 
Sent: Thursday, February 09, 2017 12:36 AM
To: Pranathi Venkatayogi <pvenkatay...@cyracom.com>; Kamailio (SER) - Users 
Mailing List <sr-users@lists.sip-router.org>
Subject: Re: [SR-Users] MSRP with Kamailio

The return code -5 happens when there is no Authorization header, so the client 
didn't send the credentials.

Can you switch to tcp and grab a pcap with the msrp traffic for AUTH scenario?

Cheers,
Daniel

On 08/02/2017 16:48, Pranathi Venkatayogi wrote:
> Auth was failing on the server with -5. We need someone more familiar with 
> kamailio to take a look.
> I am attaching earlier follow-up message.
>
> -Original Message-
> From: Daniel-Constantin Mierla [mailto:mico...@gmail.com]
> Sent: Tuesday, February 07, 2017 10:47 PM
> To: Pranathi Venkatayogi <pvenkatay...@cyracom.com>; Kamailio (SER) - 
> Users Mailing List <sr-users@lists.sip-router.org>
> Subject: Re: [SR-Users] MSRP with Kamailio
>
> Hello,
>
> is the auth not working because of kamailio or because of the client?
> Have you investigated to see what could be the potential issue?
>
> Cheers,
> Daniel
>
>
> On 07/02/2017 18:56, Pranathi Venkatayogi wrote:
>> Msrp auth doesn’t work. I disabled it in my config for now to work around 
>> it. 
>> As we use TLS and chat is also on a secure channel should be ok.
>>
>> If you can make auth work, please let me know.
>>
>> -Original Message-
>> From: sr-users [mailto:sr-users-boun...@lists.sip-router.org] On 
>> Behalf Of Olli Attila
>> Sent: Tuesday, February 07, 2017 5:47 AM
>> To: mico...@gmail.com; Kamailio (SER) - Users Mailing List 
>> <sr-users@lists.sip-router.org>
>> Subject: Re: [SR-Users] MSRP with Kamailio
>>
>> Hello,
>>
>> Actually when i set debug level to 3, I dont face any syslog errors on 
>> Kamailio. I only see the auth error at the client (Blink) end.
>>
>> -- Olli
>>
>>
>> Daniel-Constantin Mierla kirjoitti 2017-02-07 14:49:
>>> Hello,
>>>
>>> can you run with debug=3 in kamailio.cfg and provide all syslog 
>>> messages for the issues you face?
>>>
>>> Cheers,
>>> Daniel
>>>
>>>
>>> On 07/02/2017 12:16, Olli Attila wrote:
>>>> Hello,
>>>>
>>>> I am running kamailio version 4.4.2. I just configured MSRP module 
>>>> to kamailio with example config taken from 
>>>> "http://www.kamailio.org/docs/modules/4.4.x/modules/msrp.html#msrp.usage;
>>>> (Example 1.16. Event Route (using htable for MSRP connection 
>>>> tracking). After configuring msrp relay, the kamailio service has 
>>>> been restarted succesfully and no errors occurred.
>>>>
>>>> Blink is configured to use my server name with tls and port 5061 
>>>> for MSRP.
>>>>
>>>> I get this error on Blink when i try to send files:
>>>> https://p.dnaip.fi/X4vwoy40
>>>>
>>>> Any suggestion what is going wrong?
>>>>
>>>> Cheers,
>>>>
>>>> -- Olli
>>>>
>>>>
>>>> ___
>>>> 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
> www.twitter.com/miconda -- www.linkedin.com/in/miconda Kamailio 
> Advanced Training - Mar 6-8 (Europe) and Mar 20-22 (USA) - 
> www.asipto.com Kamailio World Conference - May 8-10, 2017 - 
> www.kamailioworld.com
>

--
Daniel-Constantin Mierla
www.twitter.com/miconda -- www.linkedin.com/in/miconda Kamailio Advanced 
Training - Mar 6-8 (Europe) and Mar 20-22 (USA) - www.asipto.com Kamailio World 
Conference - May 8-10, 2017 - www.kamailioworld.com



routing.cfg
Description: routing.cfg
___
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] MSRP with Kamailio

2017-02-07 Thread Pranathi Venkatayogi
Msrp auth doesn’t work. I disabled it in my config for now to work around it. 
As we use TLS and chat is also on a secure channel should be ok.

If you can make auth work, please let me know.

-Original Message-
From: sr-users [mailto:sr-users-boun...@lists.sip-router.org] On Behalf Of Olli 
Attila
Sent: Tuesday, February 07, 2017 5:47 AM
To: mico...@gmail.com; Kamailio (SER) - Users Mailing List 

Subject: Re: [SR-Users] MSRP with Kamailio

Hello,

Actually when i set debug level to 3, I dont face any syslog errors on 
Kamailio. I only see the auth error at the client (Blink) end.

-- Olli


Daniel-Constantin Mierla kirjoitti 2017-02-07 14:49:
> Hello,
> 
> can you run with debug=3 in kamailio.cfg and provide all syslog 
> messages for the issues you face?
> 
> Cheers,
> Daniel
> 
> 
> On 07/02/2017 12:16, Olli Attila wrote:
>> 
>> Hello,
>> 
>> I am running kamailio version 4.4.2. I just configured MSRP module to 
>> kamailio with example config taken from 
>> "http://www.kamailio.org/docs/modules/4.4.x/modules/msrp.html#msrp.usage;
>> (Example 1.16. Event Route (using htable for MSRP connection 
>> tracking). After configuring msrp relay, the kamailio service has 
>> been restarted succesfully and no errors occurred.
>> 
>> Blink is configured to use my server name with tls and port 5061 for 
>> MSRP.
>> 
>> I get this error on Blink when i try to send files:
>> https://p.dnaip.fi/X4vwoy40
>> 
>> Any suggestion what is going wrong?
>> 
>> Cheers,
>> 
>> -- Olli
>> 
>> 
>> ___
>> 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
___
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] Spurious dialog timeouts

2017-02-06 Thread Pranathi Venkatayogi
Any clue on this?

Or to work around this, can someone shed light on how to differentiate when 
“Dialog:end” is called due to actual call drop - Bye vs some timeout.
I need to do some special logic only on call drop. 

Relevant snippet from the logs are:

7719 Feb 3 21:41:20 labsip00 /usr/sbin/kamailio[11323]: exec: *** 
cfgtrace:local_route=[dialog:end] c=[//etc/kamailio//routing.cfg] l=490 a=16 
n=if
7720 Feb 3 21:41:20 labsip00 /usr/sbin/kamailio[11323]: exec: *** 
cfgtrace:local_route=[dialog:end] c=[//etc/kamailio//routing.cfg] l=481 a=24 
n=is_known_dlg
7721 Feb 3 21:41:20 labsip00 /usr/sbin/kamailio[11323]: exec: *** 
cfgtrace:local_route=[dialog:end] c=[//etc/kamailio//routing.cfg] l=482 a=63 
n=assign
7722 Feb 3 21:41:20 labsip00 /usr/sbin/kamailio[11323]: exec: *** 
cfgtrace:local_route=[dialog:end] c=[//etc/kamailio//routing.cfg] l=489 a=16 
n=if
7723 Feb 3 21:41:20 labsip00 /usr/sbin/kamailio[11323]: exec: *** 
cfgtrace:local_route=[dialog:end] c=[//etc/kamailio//routing.cfg] l=485 a=26 
n=xlog
7724 Feb 3 21:41:20 labsip00 /usr/sbin/kamailio[11323]: INFO: 

[SR-Users] Spurious dialog timeouts

2017-02-03 Thread Pranathi Venkatayogi
Hi,
   I have two kamailio proxies between the customer and agent. Cust -> proxy1 
-> proxy2 -> agent.
   The dialogs are successfully established and remain undeleted within the 
customer / agent client.
   However in  Proxy2 I am seeing spurious dialog timeout. I am attaching 
kamailio log trace below. 
   Also attached is the siptrace on the agent/customer side. 

   Question: How is this dlg_ontimeout() generated despite dialog being 
successfully established and undelete? How to avoid it.

Kamailio (proxy2) log:

7719 Feb  3 21:41:20 labsip00 /usr/sbin/kamailio[11323]: exec: *** 
cfgtrace:local_route=[dialog:end] c=[//etc/kamailio//routing.cfg] l=490 a=16 
n=if
 7720 Feb  3 21:41:20 labsip00 /usr/sbin/kamailio[11323]: exec: *** 
cfgtrace:local_route=[dialog:end] c=[//etc/kamailio//routing.cfg] l=481 a=24 
n=is_known_dlg
 7721 Feb  3 21:41:20 labsip00 /usr/sbin/kamailio[11323]: exec: *** 
cfgtrace:local_route=[dialog:end] c=[//etc/kamailio//routing.cfg] l=482 a=63 
n=assign
 7722 Feb  3 21:41:20 labsip00 /usr/sbin/kamailio[11323]: exec: *** 
cfgtrace:local_route=[dialog:end] c=[//etc/kamailio//routing.cfg] l=489 a=16 
n=if
 7723 Feb  3 21:41:20 labsip00 /usr/sbin/kamailio[11323]: exec: *** 
cfgtrace:local_route=[dialog:end] c=[//etc/kamailio//routing.cfg] l=485 a=26 
n=xlog
 7724 Feb  3 21:41:20 labsip00 /usr/sbin/kamailio[11323]: INFO: 

Re: [SR-Users] How does Kamailio decide which protocol to use when fwding to another proxy?

2017-01-25 Thread Pranathi Venkatayogi
By setting $du, I was able to force proxy1 to use TLS instead of UDP.

$du = "sip:ip:port;transport=tls"<sip:ip:port;transport=tls>;
t_relay();

Thanks Daniel for your input.

From: Pranathi Venkatayogi
Sent: Wednesday, January 25, 2017 8:25 AM
To: 'mico...@gmail.com' <mico...@gmail.com>; 'Kamailio (SER) - Users Mailing 
List' <sr-users@lists.sip-router.org>
Subject: RE: [SR-Users] How does Kamailio decide which protocol to use when 
fwding to another proxy?

I am attaching all the information needed:

Here is invite sent by the customer -
10.11.200.21:58822 -(SIP over TLS)-> 10.0.16.52:5061
INVITE sip:span...@translation.sms-test.cyracom.com SIP/2.0
Via: SIP/2.0/TLS 
10.11.200.21:58822;rport;branch=z9hG4bKPj40846ca84d834aeb9d6ae838e7d01166;alias
Max-Forwards: 70
From: "cust1" 
<sip:cu...@devtranslation.sms-test.cyracom.com>;tag=46715a1fbe9c4d06a04ecf7e48997955
To: <sip:span...@translation.sms-test.cyracom.com>
Contact: <sip:64715890@10.11.200.21:58825;transport=tls>
Call-ID: a6a27f5f13a147ff82f48fde3789838e
CSeq: 6098 INVITE
Allow: SUBSCRIBE, NOTIFY, INVITE, ACK, BYE, CANCEL, UPDATE, MESSAGE, REFER
Supported: replaces, norefersub, gruu
User-Agent: Blink 3.0.0 (Windows)
Proxy-Authorization: Digest username="cust1", 
realm="devtranslation.sms-test.cyracom.com", 
nonce="WIfTSliH0h4rWzCg73Myws7fCOgYpwHyAg5IxIA=", 
uri="sip:span...@translation.sms-test.cyracom.com", 
response="391c1e155da5949698501a379b9037a3"
Content-Type: application/sdp
Content-Length:   359
v=0
o=- 3694256158 3694256158 IN IP4 10.11.200.21
s=Blink 3.0.0 (Windows)
t=0 0
m=message 2855 TCP/TLS/MSRP *
c=IN IP4 10.11.200.21
a=path:msrps://192.168.1.110:2855/3dc0380f6ef30157c39c;tcp
a=accept-types:message/cpim text/* image/* application/im-iscomposing+xml
a=accept-wrapped-types:text/* image/* application/im-iscomposing+xml
a=setup:active

Here is the invite received by the agent. As we see transport=tls is set 
correctly. Question is why and who is inserting Via header to be UDP port 5060. 
10.0.16.52 is proxy1’s IP address. Strange thing is proxy1 has TLS connection 
with proxy2 and still it is sending via UDP.
172.31.211.31:5061 -(SIP over TLS)-> 10.0.27.108:60894
INVITE sip:20745891@10.0.27.108:60896;transport=tls SIP/2.0
Via: SIP/2.0/TLS 
63.149.103.72:5061;branch=z9hG4bKe337.4192b97c6a818407e5631f415c224e45.0
Via: SIP/2.0/UDP 
10.0.16.52;rport=5060;branch=z9hG4bKe337.2c67958aee41eaa6f6d03652c89552c8.0;i=1
Via: SIP/2.0/TLS 
10.11.200.21:59039;received=10.11.200.21;rport=59039;branch=z9hG4bKPj62fa0d97094946169f04a60aeb9aa215;alias
Max-Forwards: 68
From: "cust1" 
<sip:cu...@devtranslation.sms-test.cyracom.com>;tag=7bbc8a1c90e94d96b3360223ce815d50
To: <sip:span...@translation.sms-test.cyracom.com>
Contact: <sip:64715890@10.11.200.21:59045;transport=tls>
Record-Route: <sip:63.149.103.72:5060;transport=tls;lr;nat=yes>
Record-Route: <sip:10.0.16.52:5061;transport=tls;lr;nat=yes>
Call-ID: f1f4cb291ee44c11b3eda6c6801c1d22
CSeq: 28943 INVITE
Allow: SUBSCRIBE, NOTIFY, INVITE, ACK, BYE, CANCEL, UPDATE, MESSAGE, REFER
Supported: replaces, norefersub, gruu
User-Agent: Blink 3.0.0 (Windows)
Content-Type: application/sdp
Content-Length:   359
v=0
o=- 3694259050 3694259050 IN IP4 10.11.200.21
s=Blink 3.0.0 (Windows)
t=0 0
m=message 2855 TCP/TLS/MSRP *
c=IN IP4 10.11.200.21
a=path:msrps://192.168.1.110:2855/3fe6e776d38e70ffc529;tcp
a=accept-types:message/cpim text/* image/* application/im-iscomposing+xml
a=accept-wrapped-types:text/* image/* application/im-iscomposing+xml
a=setup:active

Attached is the nslookup output of the proxy2 domain.
[cid:image002.jpg@01D27714.A43CB960]


From: sr-users [mailto:sr-users-boun...@lists.sip-router.org] On Behalf Of 
Daniel-Constantin Mierla
Sent: Wednesday, January 25, 2017 12:17 AM
To: Kamailio (SER) - Users Mailing List 
<sr-users@lists.sip-router.org<mailto:sr-users@lists.sip-router.org>>
Subject: Re: [SR-Users] How does Kamailio decide which protocol to use when 
fwding to another proxy?

Hello,

first thing: do not reply to other emails from the mailing list, create a new 
one -- at the end of your message is a previous email from the list. It keeps 
the conversation clean, doesn't mess the email thread id and also makes it 
easier to understand what's all about (and less bandwidth) on mobile devices.

You would have to provide the sip packet (the invite) to understand what 
happens there. The support of TLS can be discovered via DNS lookup (NAPTR+SRV) 
or the transport can be enforced in the r-uri with transport=xyz parameter.

Cheers,
Daniel


On 24/01/2017 20:01, Pranathi Venkatayogi wrote:
Hi,
  I have two instances of Kamailio acting as edge proxies. One on the customer 
side and one on the agent side.
  Like: customer -> proxy1 -> proxy2 -> agent.
  Both customer and agent are registered to proxy1/proxy2 via TLS.

  However when prox

Re: [SR-Users] How does Kamailio decide which protocol to use when fwding to another proxy?

2017-01-25 Thread Pranathi Venkatayogi
I am attaching all the information needed:

Here is invite sent by the customer -
10.11.200.21:58822 -(SIP over TLS)-> 10.0.16.52:5061
INVITE sip:span...@translation.sms-test.cyracom.com SIP/2.0
Via: SIP/2.0/TLS 
10.11.200.21:58822;rport;branch=z9hG4bKPj40846ca84d834aeb9d6ae838e7d01166;alias
Max-Forwards: 70
From: "cust1" 
<sip:cu...@devtranslation.sms-test.cyracom.com>;tag=46715a1fbe9c4d06a04ecf7e48997955
To: <sip:span...@translation.sms-test.cyracom.com>
Contact: <sip:64715890@10.11.200.21:58825;transport=tls>
Call-ID: a6a27f5f13a147ff82f48fde3789838e
CSeq: 6098 INVITE
Allow: SUBSCRIBE, NOTIFY, INVITE, ACK, BYE, CANCEL, UPDATE, MESSAGE, REFER
Supported: replaces, norefersub, gruu
User-Agent: Blink 3.0.0 (Windows)
Proxy-Authorization: Digest username="cust1", 
realm="devtranslation.sms-test.cyracom.com", 
nonce="WIfTSliH0h4rWzCg73Myws7fCOgYpwHyAg5IxIA=", 
uri="sip:span...@translation.sms-test.cyracom.com", 
response="391c1e155da5949698501a379b9037a3"
Content-Type: application/sdp
Content-Length:   359
v=0
o=- 3694256158 3694256158 IN IP4 10.11.200.21
s=Blink 3.0.0 (Windows)
t=0 0
m=message 2855 TCP/TLS/MSRP *
c=IN IP4 10.11.200.21
a=path:msrps://192.168.1.110:2855/3dc0380f6ef30157c39c;tcp
a=accept-types:message/cpim text/* image/* application/im-iscomposing+xml
a=accept-wrapped-types:text/* image/* application/im-iscomposing+xml
a=setup:active

Here is the invite received by the agent. As we see transport=tls is set 
correctly. Question is why and who is inserting Via header to be UDP port 5060. 
10.0.16.52 is proxy1’s IP address. Strange thing is proxy1 has TLS connection 
with proxy2 and still it is sending via UDP.
172.31.211.31:5061 -(SIP over TLS)-> 10.0.27.108:60894
INVITE sip:20745891@10.0.27.108:60896;transport=tls SIP/2.0
Via: SIP/2.0/TLS 
63.149.103.72:5061;branch=z9hG4bKe337.4192b97c6a818407e5631f415c224e45.0
Via: SIP/2.0/UDP 
10.0.16.52;rport=5060;branch=z9hG4bKe337.2c67958aee41eaa6f6d03652c89552c8.0;i=1
Via: SIP/2.0/TLS 
10.11.200.21:59039;received=10.11.200.21;rport=59039;branch=z9hG4bKPj62fa0d97094946169f04a60aeb9aa215;alias
Max-Forwards: 68
From: "cust1" 
<sip:cu...@devtranslation.sms-test.cyracom.com>;tag=7bbc8a1c90e94d96b3360223ce815d50
To: <sip:span...@translation.sms-test.cyracom.com>
Contact: <sip:64715890@10.11.200.21:59045;transport=tls>
Record-Route: <sip:63.149.103.72:5060;transport=tls;lr;nat=yes>
Record-Route: <sip:10.0.16.52:5061;transport=tls;lr;nat=yes>
Call-ID: f1f4cb291ee44c11b3eda6c6801c1d22
CSeq: 28943 INVITE
Allow: SUBSCRIBE, NOTIFY, INVITE, ACK, BYE, CANCEL, UPDATE, MESSAGE, REFER
Supported: replaces, norefersub, gruu
User-Agent: Blink 3.0.0 (Windows)
Content-Type: application/sdp
Content-Length:   359
v=0
o=- 3694259050 3694259050 IN IP4 10.11.200.21
s=Blink 3.0.0 (Windows)
t=0 0
m=message 2855 TCP/TLS/MSRP *
c=IN IP4 10.11.200.21
a=path:msrps://192.168.1.110:2855/3fe6e776d38e70ffc529;tcp
a=accept-types:message/cpim text/* image/* application/im-iscomposing+xml
a=accept-wrapped-types:text/* image/* application/im-iscomposing+xml
a=setup:active

Attached is the nslookup output of the proxy2 domain.
[cid:image001.jpg@01D276E4.807FB5C0]


From: sr-users [mailto:sr-users-boun...@lists.sip-router.org] On Behalf Of 
Daniel-Constantin Mierla
Sent: Wednesday, January 25, 2017 12:17 AM
To: Kamailio (SER) - Users Mailing List <sr-users@lists.sip-router.org>
Subject: Re: [SR-Users] How does Kamailio decide which protocol to use when 
fwding to another proxy?

Hello,

first thing: do not reply to other emails from the mailing list, create a new 
one -- at the end of your message is a previous email from the list. It keeps 
the conversation clean, doesn't mess the email thread id and also makes it 
easier to understand what's all about (and less bandwidth) on mobile devices.

You would have to provide the sip packet (the invite) to understand what 
happens there. The support of TLS can be discovered via DNS lookup (NAPTR+SRV) 
or the transport can be enforced in the r-uri with transport=xyz parameter.

Cheers,
Daniel


On 24/01/2017 20:01, Pranathi Venkatayogi wrote:
Hi,
  I have two instances of Kamailio acting as edge proxies. One on the customer 
side and one on the agent side.
  Like: customer -> proxy1 -> proxy2 -> agent.
  Both customer and agent are registered to proxy1/proxy2 via TLS.

  However when proxy1 forwards to proxy2, it is using UDP. How can I force it 
to use TLS?
  Attached is the result of nslookup on the domain: 
translation.sms-test.cyracom.com.





--

Daniel-Constantin Mierla

www.twitter.com/miconda<http://www.twitter.com/miconda> -- 
www.linkedin.com/in/miconda<http://www.linkedin.com/in/miconda>

Kamailio Advanced Training - Mar 6-8 (Europe) and Mar 20-22 (USA) - 
www.asipto.com<http://www.asipto.com>

Kamailio World Conference - May 8-10, 2017 - 
www.kamailioworld.com<http://www.kamailioworld

Re: [SR-Users] How does Kamailio decide which protocol to use when fwding to another proxy?

2017-01-24 Thread Pranathi Venkatayogi
In the case below though TLS session is established between proxy1 and proxy2, 
invite is fwded on UDP.

1.  How to force Kamailio to use existing tls session to communicate? 
(proxy1)

2.  What is the command to look at if existing tls sessions are present 
from proxy1

a.  kamcmd tls.list does it, but I need one which works from within config.

From: Pranathi Venkatayogi
Sent: Tuesday, January 24, 2017 11:02 AM
To: 'Kamailio (SER) - Users Mailing List' <sr-users@lists.sip-router.org>
Subject: How does Kamailio decide which protocol to use when fwding to another 
proxy?

Hi,
  I have two instances of Kamailio acting as edge proxies. One on the customer 
side and one on the agent side.
  Like: customer -> proxy1 -> proxy2 -> agent.
  Both customer and agent are registered to proxy1/proxy2 via TLS.

  However when proxy1 forwards to proxy2, it is using UDP. How can I force it 
to use TLS?
  Attached is the result of nslookup on the domain: 
translation.sms-test.cyracom.com.

Thanks
Pranathi

[cid:image002.jpg@01D27654.0A627200]

___
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] How does Kamailio decide which protocol to use when fwding to another proxy?

2017-01-24 Thread Pranathi Venkatayogi
Hi,
  I have two instances of Kamailio acting as edge proxies. One on the customer 
side and one on the agent side.
  Like: customer -> proxy1 -> proxy2 -> agent.
  Both customer and agent are registered to proxy1/proxy2 via TLS.

  However when proxy1 forwards to proxy2, it is using UDP. How can I force it 
to use TLS?
  Attached is the result of nslookup on the domain: 
translation.sms-test.cyracom.com.

Thanks
Pranathi

[cid:image001.jpg@01D27631.42773770]

From: sr-users [mailto:sr-users-boun...@lists.sip-router.org] On Behalf Of Ryan 
Wagoner
Sent: Tuesday, January 24, 2017 8:26 AM
To: sr-users@lists.sip-router.org
Subject: [SR-Users] Asterisk Proxy Multiple Devices / BLF Issues

I'm following the latest Kamailio and Asterisk Realtime guide to offload 
registrations from my FreePBX / Asterisk setup and possibly load balance down 
the road. I'm running Kamailio 4.4.5 and Asterisk 11.6-cert15.  I realize 
FreePBX isn't realtime and will work around  that with a database view, etc.

I was excited to see Kamailio will handle multiple devices registering to the 
same device/extension and placing / receiving calls works. I did run into an 
issue when any device unregisters Kamailio always forwards the register with 
expires 0 to Asterisk. To workaround this I modified the route[REGFWD] and 
added the if($hdr(Expires)==$null) chunk of code. I wanted to use 
caller->count, but ran into stale contact records with expires set to deleted. 
I then tried enumerating the contacts, but don't understand why 
ulc(caller->expires) is 10 when kamctl ul show shows expires deleted. The code 
below works, but I was hoping for an explanation of the expires = 10 or if 
there was a better way to handle this scenario.

Additionally I enabled presence (WITH_PRESENCE) but Kamailio responds 489 bad 
event for subscribe requests from devices registered to it. I was hoping it 
would proxy these to Asterisk for BLF support. If somebody could point me in 
the right direction it would be appreciated.

# Forward REGISTER to Asterisk
route[REGFWD] {
if(!is_method("REGISTER"))
{
return;
}

if($hdr(Expires)==$null)
{
reg_fetch_contacts("location", "$sel(contact.uri)", "caller");

$var(i) = 0;
$var(j) = 0;
while($var(i) < $(ulc(caller=>count)))
{
if($(ulc(caller=>expires)[$var(i)])!=10)
{
$var(j) = $var(j) + 1;
}

$var(i) = $var(i) + 1;
}

if($var(j)>=1)
{
return;
}
}

$var(rip) = $sel(cfg_get.asterisk.bindip);
$uac_req(method)="REGISTER";
$uac_req(ruri)="sip:" + $var(rip) + ":" + 
$sel(cfg_get.asterisk.bindport);
$uac_req(furi)="sip:" + $au + "@" + $var(rip);
$uac_req(turi)="sip:" + $au + "@" + $var(rip);
$uac_req(hdrs)="Contact: \r\n";
if($sel(contact.expires) != $null)
$uac_req(hdrs)= $uac_req(hdrs) + "Expires: " + 
$sel(contact.expires) + "\r\n";
else
$uac_req(hdrs)= $uac_req(hdrs) + "Expires: " + $hdr(Expires) + 
"\r\n";
uac_req_send();
}

Thanks,
Ryan
___
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] How to determine correct port to set in record-route header

2017-01-24 Thread Pranathi Venkatayogi
I have set that from the beginning, but of no avail. 

advertised_address="63.149.103.72"
listen=udp:MY_IP_ADDR:5060 advertise MY_PUBLICIP_ADDR:5060

-Original Message-
From: sr-users [mailto:sr-users-boun...@lists.sip-router.org] On Behalf Of 
Daniel Tryba
Sent: Tuesday, January 24, 2017 7:59 AM
To: Kamailio (SER) - Users Mailing List <sr-users@lists.sip-router.org>
Subject: Re: [SR-Users] How to determine correct port to set in record-route 
header

On Tue, Jan 24, 2017 at 03:50:24PM +, Pranathi Venkatayogi wrote:
>   I am using Kamailio behind NAT, unable to figure how to make it put “public 
> ip” in Record-route header, I am manually inserting the hard-coded header 
> myself as below.
>   However now I am having trouble choosing the right port number in all 
> scenarios.


Take a look at https://www.kamailio.org/wiki/cookbooks/4.4.x/core#listen
and the mentioned set_advertised_address() / set_advertised_port() cfg 
functions.

To quote the documentation:
 A typical use case for advertise address is when running SIP server  behind a 
NAT/Firewall, when the local IP address (to be used for bind)  is different 
than the public IP address (to be used for advertising). 


___
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] How to determine correct port to set in record-route header

2017-01-24 Thread Pranathi Venkatayogi
Any help?

From: Pranathi Venkatayogi
Sent: Monday, January 23, 2017 2:35 PM
To: 'Kamailio (SER) - Users Mailing List' <sr-users@lists.sip-router.org>
Subject: How to determine correct port to set in record-route header

Hi,
  I am using Kamailio behind NAT, unable to figure how to make it put “public 
ip” in Record-route header, I am manually inserting the hard-coded header 
myself as below.
  However now I am having trouble choosing the right port number in all 
scenarios.

$var(dstPort) = 5061;
if (dst_port==5060)
{
   $var(dstPort) = 5060;
}
insert_hf("Record-Route: 
<sip:MY_PUBLICIP_ADDR:$var(dstPort);transport=tls;lr;nat=yes>\r\n", 
"Record-Route");

   In one scenario I see the conflicting port numbers in “via” header vs 
“Record route”.
   The ACK is being set to port 5060 based on Record route header and is not 
being received by the callee.

2017-01-23 14:52:49.970233 [blink.exe 2780]: SENDING: Packet 11, +0:00:36.411867
10.0.27.108:58217 -(SIP over TLS)-> 172.31.211.31:5061
SIP/2.0 180 Ringing
Via: SIP/2.0/TLS 
63.149.103.72:5061;received=172.31.211.31;branch=z9hG4bK4799.7067bd2a48063748a4c353fa408eaefa.0
Via: SIP/2.0/UDP 
10.0.16.52;rport=5060;branch=z9hG4bK4799.935a27c6ef5ad112225964cbe7c1be44.0;i=2
Via: SIP/2.0/TLS 
10.11.200.12:51793;rport=51793;received=10.11.200.12;branch=z9hG4bKPj49f6aeca3f9b4155ab4c5304b544aa4d;alias
Record-Route: <sip:63.149.103.72:5060;transport=tls;lr;nat=yes>
Record-Route: <sip:10.0.16.52:5061;transport=tls;lr;nat=yes>
Call-ID: 09ce10efa6a946bf9445ccc21857393e
From: "cust1" 
<sip:cu...@devtranslation.sms-test.cyracom.com>;tag=95082caabecc42548c2fec5ccd29e5de
To: 
<sip:span...@translation.sms-test.cyracom.com>;tag=ec365cc8489b48a7bc5725d21b7d97a1
CSeq: 17422 INVITE
Server: Blink 3.0.0 (Windows)
Contact: <sip:20745891@10.0.27.108:58216;transport=tls>
Allow: SUBSCRIBE, NOTIFY, PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, MESSAGE, 
REFER
Content-Length:  0
Questions:
1. How can I let in-built record-route function automatically choose “public 
ip” so I can get rid of my manual insertion altogether.
2. If no option, what is the right way to choose the port on which packet is 
being received, so it is same as what is on “VIA”.
3. Any other pointers to improve the logic 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


[SR-Users] How to determine correct port to set in record-route header

2017-01-23 Thread Pranathi Venkatayogi
Hi,
  I am using Kamailio behind NAT, unable to figure how to make it put “public 
ip” in Record-route header, I am manually inserting the hard-coded header 
myself as below.
  However now I am having trouble choosing the right port number in all 
scenarios.

$var(dstPort) = 5061;
if (dst_port==5060)
{
   $var(dstPort) = 5060;
}
insert_hf("Record-Route: 
\r\n", 
"Record-Route");

   In one scenario I see the conflicting port numbers in “via” header vs 
“Record route”.
   The ACK is being set to port 5060 based on Record route header and is not 
being received by the callee.

2017-01-23 14:52:49.970233 [blink.exe 2780]: SENDING: Packet 11, +0:00:36.411867
10.0.27.108:58217 -(SIP over TLS)-> 172.31.211.31:5061
SIP/2.0 180 Ringing
Via: SIP/2.0/TLS 
63.149.103.72:5061;received=172.31.211.31;branch=z9hG4bK4799.7067bd2a48063748a4c353fa408eaefa.0
Via: SIP/2.0/UDP 
10.0.16.52;rport=5060;branch=z9hG4bK4799.935a27c6ef5ad112225964cbe7c1be44.0;i=2
Via: SIP/2.0/TLS 
10.11.200.12:51793;rport=51793;received=10.11.200.12;branch=z9hG4bKPj49f6aeca3f9b4155ab4c5304b544aa4d;alias
Record-Route: 
Record-Route: 
Call-ID: 09ce10efa6a946bf9445ccc21857393e
From: "cust1" 
;tag=95082caabecc42548c2fec5ccd29e5de
To: 
;tag=ec365cc8489b48a7bc5725d21b7d97a1
CSeq: 17422 INVITE
Server: Blink 3.0.0 (Windows)
Contact: 
Allow: SUBSCRIBE, NOTIFY, PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, MESSAGE, 
REFER
Content-Length:  0

Questions:
1. How can I let in-built record-route function automatically choose “public 
ip” so I can get rid of my manual insertion altogether.
2. If no option, what is the right way to choose the port on which packet is 
being received, so it is same as what is on “VIA”.
3. Any other pointers to improve the logic 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


[SR-Users] Best way to log incoming/outgoing sip messages?

2017-01-20 Thread Pranathi Venkatayogi
Hi,
  What is the best way to get a complete dump of incoming/outgoing SIP messages 
of Kamailio server?
  I encountered “SIPTrace” module, but it writes to database. Is there a way we 
can write to syslog instead?

Thanks
Pranathi

___
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] Kamailio behind NAT, ACK to private IP not advertised public IP.

2016-12-29 Thread Pranathi Venkatayogi
I added later as I was trying so many things. Pls find attached.

-Original Message-
From: sr-users [mailto:sr-users-boun...@lists.sip-router.org] On Behalf Of Fred 
Posner
Sent: Thursday, December 29, 2016 10:23 AM
To: sr-users@lists.sip-router.org
Subject: Re: [SR-Users] Kamailio behind NAT, ACK to private IP not advertised 
public IP.

> listen=udp:MY_IP_ADDR:5060 advertise MY_PUBLICIP_ADDR:5060

That statement does not exist anywhere in the files you sent.

--fred

On 12/29/2016 11:19 AM, Pranathi Venkatayogi wrote:
> Yes. I defined advertised address and even used listen with advertise as 
> below. Still Kamailio does not send publicip in record route header.
> listen=udp:MY_IP_ADDR:5060 advertise MY_PUBLICIP_ADDR:5060
> 
> 
> -Original Message-
> From: sr-users [mailto:sr-users-boun...@lists.sip-router.org] On 
> Behalf Of Daniel Grotti
> Sent: Thursday, December 29, 2016 6:31 AM
> To: sr-users@lists.sip-router.org
> Subject: Re: [SR-Users] Kamailio behind NAT, ACK to private IP not advertised 
> public IP.
> 
> Hi,
> not sure if I understood it right but, have you defined the 
> advertised_address ? That should be used in Via and RR as well:
> 
> https://www.kamailio.org/wiki/cookbooks/4.4.x/core#advertised_address
> 
> 
> Daniel
> 
> 
> On 12/29/2016 12:09 AM, Pranathi Venkatayogi wrote:
>> I implemented full NAT logic as per the sample config. Still unable 
>> to resolve the issue.
>>
>> How do I let Kamailio change record_route header to use public ip address?
>>
>>
>>
>> Please help!!!
>>
>>
>>
>> (attached are latest scripts)
>>
>>
>>
>> *From:* Pranathi Venkatayogi
>> *Sent:* Wednesday, December 28, 2016 12:39 PM
>> *To:* 'sr-users@lists.sip-router.org' <sr-users@lists.sip-router.org>
>> *Subject:* Kamailio behind NAT, ACK to private IP not advertised public IP.
>>
>>
>>
>> Hi,
>>
>>   I am encountering the same problem described in google groups 
>> <https://groups.google.com/forum/#!topic/2600hz-dev/-xvUZUrv4Y4>.
>> However I dint not find any resolution hence writing again.
>>
>>
>>
>>   200 OK sent from the server has private Ip in its record route. As 
>> you see below, though the message is received on public IP
>> (63.149.103.72) , the record route is set to private IP
>> (172.31.211.31)
>>
>>   I used listen with advertise of public IP, it did not work. Please 
>> find attached the config I am using.
>>
>>
>>
>>   How do I change it send public ip only when talking to external world.
>>
>>   Can someone point to me clear documentation how to configure 
>> Kamailio for NAT traversal.
>>
>>
>>
>> *The following message is sent from Kamailio behind NAT to the public
>> computer.*
>>
>> 2016-12-27 17:19:24.526875 [blink.exe 5652]: RECEIVED: Packet 123,
>> +0:08:42.690309
>>
>> 63.149.103.72:5061 -(SIP over TLS)-> 10.0.0.6:62912
>>
>> SIP/2.0 200 OK
>>
>> Via: SIP/2.0/TLS
>> 10.0.0.6:62912;rport=62912;received=50.175.10.190;branch=z9hG4bKPj2e3
>> 8
>> 1a96979945bd969989ffe9dca3a9;alias
>>
>> Record-Route: <sip:172.31.211.31:5061;transport=tls;lr;did=5.5e5
>> <sip:172.31.211.31:5061;transport=tls;lr;did=5.5e5>>
>>
>> Call-ID: eb8670eec4354acdb69fd26f5625b75c
>>
>> From: "cust1"
>> <sip:cu...@translation.sms-test.cyracom.com>;tag=2f25d2ae690747c48c87
>> 4
>> e0b415ca03c
>>
>> To:
>> <sip:span...@translation.sms-test.cyracom.com>;tag=1c33ad41f6f44cae8a
>> e
>> 8e060f30fe119
>>
>> CSeq: 4665 INVITE
>>
>> Server: Blink 3.0.0 (Windows)
>>
>> Allow: SUBSCRIBE, NOTIFY, PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, 
>> MESSAGE, REFER
>>
>> Contact: <sip:75329410@10.0.27.108:61381;transport=tls>
>>
>> Supported: 100rel, replaces, norefersub, gruu
>>
>> Content-Type: application/sdp
>>
>> Content-Length:   355
>>
>> v=0
>>
>> o=- 3691844303 3691844304 IN IP4 10.0.27.108
>>
>> s=Blink 3.0.0 (Windows)
>>
>> t=0 0
>>
>> m=message 2855 TCP/TLS/MSRP *
>>
>> c=IN IP4 10.0.27.108
>>
>> a=path:msrps://10.0.27.108:2855/261d3f47be25612cc77c;tcp
>>
>> a=accept-types:message/cpim text/* image/* 
>> application/im-iscomposing+xml
>>
>> a=accept-wrapped-types:text/* image/* application/im-iscomposing+xml
>>
>> a=setup:active
>>
>> --
>>
>>
>>
>> *The following is the ACK se

Re: [SR-Users] Kamailio behind NAT, ACK to private IP not advertised public IP.

2016-12-29 Thread Pranathi Venkatayogi
Yes. I defined advertised address and even used listen with advertise as below. 
Still Kamailio does not send publicip in record route header.
listen=udp:MY_IP_ADDR:5060 advertise MY_PUBLICIP_ADDR:5060


-Original Message-
From: sr-users [mailto:sr-users-boun...@lists.sip-router.org] On Behalf Of 
Daniel Grotti
Sent: Thursday, December 29, 2016 6:31 AM
To: sr-users@lists.sip-router.org
Subject: Re: [SR-Users] Kamailio behind NAT, ACK to private IP not advertised 
public IP.

Hi,
not sure if I understood it right but, have you defined the advertised_address 
? That should be used in Via and RR as well:

https://www.kamailio.org/wiki/cookbooks/4.4.x/core#advertised_address


Daniel


On 12/29/2016 12:09 AM, Pranathi Venkatayogi wrote:
> I implemented full NAT logic as per the sample config. Still unable to 
> resolve the issue.
>
> How do I let Kamailio change record_route header to use public ip address?
>
>
>
> Please help!!!
>
>
>
> (attached are latest scripts)
>
>
>
> *From:* Pranathi Venkatayogi
> *Sent:* Wednesday, December 28, 2016 12:39 PM
> *To:* 'sr-users@lists.sip-router.org' <sr-users@lists.sip-router.org>
> *Subject:* Kamailio behind NAT, ACK to private IP not advertised public IP.
>
>
>
> Hi,
>
>   I am encountering the same problem described in google groups 
> <https://groups.google.com/forum/#!topic/2600hz-dev/-xvUZUrv4Y4>.
> However I dint not find any resolution hence writing again.
>
>
>
>   200 OK sent from the server has private Ip in its record route. As 
> you see below, though the message is received on public IP 
> (63.149.103.72) , the record route is set to private IP 
> (172.31.211.31)
>
>   I used listen with advertise of public IP, it did not work. Please 
> find attached the config I am using.
>
>
>
>   How do I change it send public ip only when talking to external world.
>
>   Can someone point to me clear documentation how to configure 
> Kamailio for NAT traversal.
>
>
>
> *The following message is sent from Kamailio behind NAT to the public
> computer.*
>
> 2016-12-27 17:19:24.526875 [blink.exe 5652]: RECEIVED: Packet 123,
> +0:08:42.690309
>
> 63.149.103.72:5061 -(SIP over TLS)-> 10.0.0.6:62912
>
> SIP/2.0 200 OK
>
> Via: SIP/2.0/TLS
> 10.0.0.6:62912;rport=62912;received=50.175.10.190;branch=z9hG4bKPj2e38
> 1a96979945bd969989ffe9dca3a9;alias
>
> Record-Route: <sip:172.31.211.31:5061;transport=tls;lr;did=5.5e5
> <sip:172.31.211.31:5061;transport=tls;lr;did=5.5e5>>
>
> Call-ID: eb8670eec4354acdb69fd26f5625b75c
>
> From: "cust1"
> <sip:cu...@translation.sms-test.cyracom.com>;tag=2f25d2ae690747c48c874
> e0b415ca03c
>
> To:
> <sip:span...@translation.sms-test.cyracom.com>;tag=1c33ad41f6f44cae8ae
> 8e060f30fe119
>
> CSeq: 4665 INVITE
>
> Server: Blink 3.0.0 (Windows)
>
> Allow: SUBSCRIBE, NOTIFY, PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, 
> MESSAGE, REFER
>
> Contact: <sip:75329410@10.0.27.108:61381;transport=tls>
>
> Supported: 100rel, replaces, norefersub, gruu
>
> Content-Type: application/sdp
>
> Content-Length:   355
>
> v=0
>
> o=- 3691844303 3691844304 IN IP4 10.0.27.108
>
> s=Blink 3.0.0 (Windows)
>
> t=0 0
>
> m=message 2855 TCP/TLS/MSRP *
>
> c=IN IP4 10.0.27.108
>
> a=path:msrps://10.0.27.108:2855/261d3f47be25612cc77c;tcp
>
> a=accept-types:message/cpim text/* image/* 
> application/im-iscomposing+xml
>
> a=accept-wrapped-types:text/* image/* application/im-iscomposing+xml
>
> a=setup:active
>
> --
>
>
>
> *The following is the ACK sent by public computer in reply to the 
> above message. Note this message never reaches the Kamailio server as 
> it is sent to private IP.*
>
> 2016-12-27 17:19:24.526875 [blink.exe 5652]: SENDING: Packet 124,
> +0:08:42.690309
>
> 10.0.0.6:62944 -(SIP over TLS)-> 172.31.211.31:5061
>
> ACK sip:75329410@10.0.27.108:61381;transport=tls SIP/2.0
>
> Via: SIP/2.0/TLS
> 10.0.0.6:62944;rport;branch=z9hG4bKPj7df757862e6546beba18a646cb965ba2;
> alias
>
> Max-Forwards: 70
>
> From: "cust1"
> <sip:cu...@translation.sms-test.cyracom.com>;tag=2f25d2ae690747c48c874
> e0b415ca03c
>
> To:
> <sip:span...@translation.sms-test.cyracom.com>;tag=1c33ad41f6f44cae8ae
> 8e060f30fe119
>
> Call-ID: eb8670eec4354acdb69fd26f5625b75c
>
> CSeq: 4665 ACK
>
> Route: <sip:172.31.211.31:5061;transport=tls;lr;did=5.5e5>
>
> User-Agent: Blink 3.0.0 (Windows)
>
> Content-Length:  0
>
>
>
> Thanks,
>
> *Pranathi Venkatayogi*
>
> /System Developer II/
>
> (520) 745-9447 x4466
>
> www.cyracom.com <http://

Re: [SR-Users] Kamailio behind NAT, ACK to private IP not advertised public IP.

2016-12-28 Thread Pranathi Venkatayogi
I implemented full NAT logic as per the sample config. Still unable to resolve 
the issue.
How do I let Kamailio change record_route header to use public ip address?

Please help!!!

(attached are latest scripts)

From: Pranathi Venkatayogi
Sent: Wednesday, December 28, 2016 12:39 PM
To: 'sr-users@lists.sip-router.org' <sr-users@lists.sip-router.org>
Subject: Kamailio behind NAT, ACK to private IP not advertised public IP.

Hi,
  I am encountering the same problem described in google 
groups<https://groups.google.com/forum/#!topic/2600hz-dev/-xvUZUrv4Y4>. However 
I dint not find any resolution hence writing again.

  200 OK sent from the server has private Ip in its record route. As you see 
below, though the message is received on public IP (63.149.103.72) , the record 
route is set to private IP (172.31.211.31)
  I used listen with advertise of public IP, it did not work. Please find 
attached the config I am using.

  How do I change it send public ip only when talking to external world.
  Can someone point to me clear documentation how to configure Kamailio for NAT 
traversal.

The following message is sent from Kamailio behind NAT to the public computer.
2016-12-27 17:19:24.526875 [blink.exe 5652]: RECEIVED: Packet 123, 
+0:08:42.690309
63.149.103.72:5061 -(SIP over TLS)-> 10.0.0.6:62912
SIP/2.0 200 OK
Via: SIP/2.0/TLS 
10.0.0.6:62912;rport=62912;received=50.175.10.190;branch=z9hG4bKPj2e381a96979945bd969989ffe9dca3a9;alias
Record-Route: <sip:172.31.211.31:5061;transport=tls;lr;did=5.5e5>
Call-ID: eb8670eec4354acdb69fd26f5625b75c
From: "cust1" 
<sip:cu...@translation.sms-test.cyracom.com>;tag=2f25d2ae690747c48c874e0b415ca03c
To: 
<sip:span...@translation.sms-test.cyracom.com>;tag=1c33ad41f6f44cae8ae8e060f30fe119
CSeq: 4665 INVITE
Server: Blink 3.0.0 (Windows)
Allow: SUBSCRIBE, NOTIFY, PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, MESSAGE, 
REFER
Contact: <sip:75329410@10.0.27.108:61381;transport=tls>
Supported: 100rel, replaces, norefersub, gruu
Content-Type: application/sdp
Content-Length:   355
v=0
o=- 3691844303 3691844304 IN IP4 10.0.27.108
s=Blink 3.0.0 (Windows)
t=0 0
m=message 2855 TCP/TLS/MSRP *
c=IN IP4 10.0.27.108
a=path:msrps://10.0.27.108:2855/261d3f47be25612cc77c;tcp
a=accept-types:message/cpim text/* image/* application/im-iscomposing+xml
a=accept-wrapped-types:text/* image/* application/im-iscomposing+xml
a=setup:active
--

The following is the ACK sent by public computer in reply to the above message. 
Note this message never reaches the Kamailio server as it is sent to private IP.
2016-12-27 17:19:24.526875 [blink.exe 5652]: SENDING: Packet 124, 
+0:08:42.690309
10.0.0.6:62944 -(SIP over TLS)-> 172.31.211.31:5061
ACK sip:75329410@10.0.27.108:61381;transport=tls SIP/2.0
Via: SIP/2.0/TLS 
10.0.0.6:62944;rport;branch=z9hG4bKPj7df757862e6546beba18a646cb965ba2;alias
Max-Forwards: 70
From: "cust1" 
<sip:cu...@translation.sms-test.cyracom.com>;tag=2f25d2ae690747c48c874e0b415ca03c
To: 
<sip:span...@translation.sms-test.cyracom.com>;tag=1c33ad41f6f44cae8ae8e060f30fe119
Call-ID: eb8670eec4354acdb69fd26f5625b75c
CSeq: 4665 ACK
Route: <sip:172.31.211.31:5061;transport=tls;lr;did=5.5e5>
User-Agent: Blink 3.0.0 (Windows)
Content-Length:  0

Thanks,
Pranathi Venkatayogi
System Developer II
(520) 745-9447 x4466
www.cyracom.com<http://www.cyracom.com/>

Join us:   [cid:image001.gif@01D1C9C9.C4E8B6D0] 
<https://www.facebook.com/pages/CyraCom-LLC/134704783312720>  
[cid:image002.gif@01D1C9C9.C4E8B6D0] <https://twitter.com/cyracom>  
[cid:image003.gif@01D1C9C9.C4E8B6D0] <http://www.linkedin.com/company/cyracom>  
[cid:image004.gif@01D1C9C9.C4E8B6D0] <http://www.cyracom.com/blog/>

[cid:image005.png@01D1C9C9.C4E8B6D0]

DISCLAIMER: This e-mail and any attached content may contain confidential or 
privileged material delivered for the sole use of the intended recipient(s). 
Any review, use, distribution or disclosure by others is strictly prohibited. 
If you are not the intended recipient (or authorized to receive for the 
recipient), please contact the sender immediately by reply e-mail and delete 
all copies of this message. It is the recipient's responsibility to scan this 
e-mail and any attachments for viruses. The content of this e-mail message, 
including any attachments, does not comprise a contract or a portion of a 
contract, and so does not bind CyraCom International, Inc. or any of its agents 
or subsidiaries. CyraCom, LLC and Voiance Language Services, LLC are wholly 
owned subsidiaries of CyraCom International, Inc.



routing.cfg
Description: routing.cfg


kamailioprod.cfg
Description: kamailioprod.cfg
___
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] Kamailio behind NAT, ACK to private IP not advertised public IP.

2016-12-28 Thread Pranathi Venkatayogi
Hi,
  I am encountering the same problem described in google 
groups<https://groups.google.com/forum/#!topic/2600hz-dev/-xvUZUrv4Y4>. However 
I dint not find any resolution hence writing again.

  200 OK sent from the server has private Ip in its record route. As you see 
below, though the message is received on public IP (63.149.103.72) , the record 
route is set to private IP (172.31.211.31)
  I used listen with advertise of public IP, it did not work. Please find 
attached the config I am using.

  How do I change it send public ip only when talking to external world.
  Can someone point to me clear documentation how to configure Kamailio for NAT 
traversal.

The following message is sent from Kamailio behind NAT to the public computer.
2016-12-27 17:19:24.526875 [blink.exe 5652]: RECEIVED: Packet 123, 
+0:08:42.690309
63.149.103.72:5061 -(SIP over TLS)-> 10.0.0.6:62912
SIP/2.0 200 OK
Via: SIP/2.0/TLS 
10.0.0.6:62912;rport=62912;received=50.175.10.190;branch=z9hG4bKPj2e381a96979945bd969989ffe9dca3a9;alias
Record-Route: <sip:172.31.211.31:5061;transport=tls;lr;did=5.5e5>
Call-ID: eb8670eec4354acdb69fd26f5625b75c
From: "cust1" 
<sip:cu...@translation.sms-test.cyracom.com>;tag=2f25d2ae690747c48c874e0b415ca03c
To: 
<sip:span...@translation.sms-test.cyracom.com>;tag=1c33ad41f6f44cae8ae8e060f30fe119
CSeq: 4665 INVITE
Server: Blink 3.0.0 (Windows)
Allow: SUBSCRIBE, NOTIFY, PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, MESSAGE, 
REFER
Contact: <sip:75329410@10.0.27.108:61381;transport=tls>
Supported: 100rel, replaces, norefersub, gruu
Content-Type: application/sdp
Content-Length:   355
v=0
o=- 3691844303 3691844304 IN IP4 10.0.27.108
s=Blink 3.0.0 (Windows)
t=0 0
m=message 2855 TCP/TLS/MSRP *
c=IN IP4 10.0.27.108
a=path:msrps://10.0.27.108:2855/261d3f47be25612cc77c;tcp
a=accept-types:message/cpim text/* image/* application/im-iscomposing+xml
a=accept-wrapped-types:text/* image/* application/im-iscomposing+xml
a=setup:active
--

The following is the ACK sent by public computer in reply to the above message. 
Note this message never reaches the Kamailio server as it is sent to private IP.
2016-12-27 17:19:24.526875 [blink.exe 5652]: SENDING: Packet 124, 
+0:08:42.690309
10.0.0.6:62944 -(SIP over TLS)-> 172.31.211.31:5061
ACK sip:75329410@10.0.27.108:61381;transport=tls SIP/2.0
Via: SIP/2.0/TLS 
10.0.0.6:62944;rport;branch=z9hG4bKPj7df757862e6546beba18a646cb965ba2;alias
Max-Forwards: 70
From: "cust1" 
<sip:cu...@translation.sms-test.cyracom.com>;tag=2f25d2ae690747c48c874e0b415ca03c
To: 
<sip:span...@translation.sms-test.cyracom.com>;tag=1c33ad41f6f44cae8ae8e060f30fe119
Call-ID: eb8670eec4354acdb69fd26f5625b75c
CSeq: 4665 ACK
Route: <sip:172.31.211.31:5061;transport=tls;lr;did=5.5e5>
User-Agent: Blink 3.0.0 (Windows)
Content-Length:  0

Thanks,
Pranathi Venkatayogi
System Developer II
(520) 745-9447 x4466
www.cyracom.com<http://www.cyracom.com/>

Join us:   [cid:image001.gif@01D1C9C9.C4E8B6D0] 
<https://www.facebook.com/pages/CyraCom-LLC/134704783312720>  
[cid:image002.gif@01D1C9C9.C4E8B6D0] <https://twitter.com/cyracom>  
[cid:image003.gif@01D1C9C9.C4E8B6D0] <http://www.linkedin.com/company/cyracom>  
[cid:image004.gif@01D1C9C9.C4E8B6D0] <http://www.cyracom.com/blog/>

[cid:image005.png@01D1C9C9.C4E8B6D0]

DISCLAIMER: This e-mail and any attached content may contain confidential or 
privileged material delivered for the sole use of the intended recipient(s). 
Any review, use, distribution or disclosure by others is strictly prohibited. 
If you are not the intended recipient (or authorized to receive for the 
recipient), please contact the sender immediately by reply e-mail and delete 
all copies of this message. It is the recipient's responsibility to scan this 
e-mail and any attachments for viruses. The content of this e-mail message, 
including any attachments, does not comprise a contract or a portion of a 
contract, and so does not bind CyraCom International, Inc. or any of its agents 
or subsidiaries. CyraCom, LLC and Voiance Language Services, LLC are wholly 
owned subsidiaries of CyraCom International, Inc.



kamailioprod.cfg
Description: kamailioprod.cfg


routing.cfg
Description: routing.cfg
___
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] MSRP auth does not work with blink

2016-11-28 Thread Pranathi Venkatayogi
Any luck? Any help from other users who used - pv_www_authenticate?

From: Pranathi Venkatayogi
Sent: Friday, November 25, 2016 12:37 PM
To: 'mico...@gmail.com'; Kamailio (SER) - Users Mailing List
Subject: RE: [SR-Users] MSRP auth does not work with blink

Hi Daniel,
  Please find attached Kamailio syslog messages. Also included are the configs 
I am using and client msrp log.
  The spot can be found by searching for the following:
  Translation: MSRP auth failed with: -5

   Please let me know what I may be doing wrong.

Thanks
Pranathi

From: sr-users [mailto:sr-users-boun...@lists.sip-router.org] On Behalf Of 
Daniel-Constantin Mierla
Sent: Thursday, November 24, 2016 4:54 AM
To: Kamailio (SER) - Users Mailing List
Subject: Re: [SR-Users] MSRP auth does not work with blink


Hello,

I couldn't spot any kamailio log messages in the zip logs you sent. Can you run 
kamailio with debug=3 in kamailio.cfg and send all the syslog messages printed 
by kamailio in such case?

Cheers,
Daniel

On 23/11/2016 00:41, Pranathi Venkatayogi wrote:
Hi,
  I am trying to use MSRP feature of blink client. In the server config when 
auth is challenged, I see the following error in the client.Can you please 
advise if I am configuring the server right?
Note: the return value of pv_www_authenticate is “-5”.

  13 2016-11-07 17:57:26.494124 [blink.exe 24976]: Closed connection to 
10.0.16.51:2855 ('NotificationProxyLogger' object has no attribute 
'received_illegal_data')

  Find attached full set of client logs.
  Here is the relevant portion of  kamailio.cfg:
if (!pv_www_authenticate("MY_DOMAIN", "$var(passwd)", "0",
"$msrp(method)")) {
www_challenge("MY_DOMAIN", "1");
xlog("L_ERR", "MSRP auth failed with: $var(retValue)\n");
exit;
}



--

Daniel-Constantin Mierla

http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda

Kamailio Advanced Training, Berlin, Nov 28-30, 2016 - http://www.asipto.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] Is there a way to detect inactive MSRP chat sessions without using SIP session timers

2016-11-18 Thread Pranathi Venkatayogi
That’s a good idea. But unfortunately blink client does not support “OPTIONS”
  Allow: SUBSCRIBE, NOTIFY, PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, MESSAGE, 
REFER

Only way is to do it the hard way - Keep track of messages sent by an endpoint 
and keep it alive as long as the server receives them.

One question about dialog module in this regard –
In “How it works” section in the module description, it says -  “The dialog 
timeout is reset each time a sequential request is processed.”
What does this mean?

-Only request at SIP level for that call sent by the client causes 
reset of the timer?  Or

-Is the module smart enough to consider MSRP message sent from that 
endpoint during that call as well?

Thanks for your clarification,
Pranathi

From: Daniel-Constantin Mierla [mailto:mico...@gmail.com]
Sent: Friday, November 18, 2016 2:26 AM
To: Pranathi Venkatayogi; Kamailio (SER) - Users Mailing List
Cc: Mick McGrellis
Subject: Re: Is there a way to detect inactive MSRP chat sessions without using 
SIP session timers


Hello,

see dialog module - maybe it works solving your problem by sending OPTIONS 
keepalives within dialogs.

Cheers,
Daniel

On 17/11/16 19:02, Pranathi Venkatayogi wrote:

Hi,

  I am using MSRP feature of Blink client. I want to track when the chat starts 
and ends so I can free up server resources.

  Apparently Blink client does not send BYE when MSRP chat window closes. It 
does not support SIP session timers even.



  So potential use of SIP session timers (sst and dialog modules) is ruled out.



  Only possible way is to track every message that goes through the server and 
keep the session alive.

  If no message comes within “expiry time period”, server can send “bye” to all 
parties and tear up the session.



  Can you please comment if there are other approaches to solve this problem?

  If not, are they any modules that will help me implement the above approach 
easily?



Thanks

Pranathi



--

Daniel-Constantin Mierla

http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda

Kamailio Advanced Training, Berlin, Nov 28-30, 2016 - http://www.asipto.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] Is there a way to detect inactive MSRP chat sessions without using SIP session timers

2016-11-17 Thread Pranathi Venkatayogi
Hi,

  I am using MSRP feature of Blink client. I want to track when the chat starts 
and ends so I can free up server resources.

  Apparently Blink client does not send BYE when MSRP chat window closes. It 
does not support SIP session timers even.



  So potential use of SIP session timers (sst and dialog modules) is ruled out.



  Only possible way is to track every message that goes through the server and 
keep the session alive.

  If no message comes within “expiry time period”, server can send “bye” to all 
parties and tear up the session.



  Can you please comment if there are other approaches to solve this problem?

  If not, are they any modules that will help me implement the above approach 
easily?



Thanks

Pranathi
___
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] usage of app_mono : how to communicate results back to config file

2016-11-14 Thread Pranathi Venkatayogi
Hi,
 I am using app_mono module and building my logic in c# app.
 I am unable to understand how to send the decision back to kamalio.cfg.

More precisely:
   I would like my routing logic to allow specific user names though they are 
not registered as subscribers. Like: 
transl...@myip.cyracom.com
   I have the logic in c# app which takes $ru and validates such that:
Host is myip.cyracom.com
User is translate
   How do I communicate the decision if it is valid or not back to my config 
script.
   Do I need to introduce new pseudo variable for this purpose?

Thanks,
Pranathi


___
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