[SR-Users] TOPOS contact issue on RE-INVITE

2016-12-29 Thread Daren FERREIRA
Hello,

I made lots of tests in order to make Kamailio act as a topology hiding proxy,
but i always got problems when using topos to store needed Route and 
Record-Route informations.

I thought that was because of possible error(s) playing with :
- socket binding
- destination tweaking
that may have lead to transaction breaking, so i decided to use NAT mode (even 
if that only can be temporary).

My problem is the same. I have not found any way to influence TOPOS on the 
domain it use on the « Contact » header.

Everything is getting well, iPs on Contact Header are toggled between external 
and internal sides, until RE-INVITE.
From there, Contact domain are no more toggled, and so:
- Public IP appear on Private side : i can manage my divide to force it to 
reply to the sender of the request instead of the contact
- Private IP appear on Public side : i can’t do anything to make the external 
side ignore contact’s domain

I wonder if that is a bug, related to RE-INVITE, or if there is any variable i 
can change to say topos which domain to be advertised on Contact headers?




PUBLIC NETWORK SIDE 
RFC6598 NETWORK SIDE

—
|   
|
PROVIDER Y.Y.Y.Y———X.X.X.X—|KAMAILIO]—100.64.10.1   
100.64.10.2 ASTERISK (or anything else)
|   
|

—



20:58:46.215911 IP 100.64.10.2.5060 > 100.64.10.1.5060: SIP, length: 1004
INVITE sip:+0598@100.64.10.1;user=phone SIP/2.0
Via: SIP/2.0/UDP 100.64.10.2:5060;branch=z9hG4bK38ea6539;rport
Max-Forwards: 70
From: "FAX" ;tag=as4cfa9905
To: 
Contact: 
Call-ID: 1c9fb2447f3f72732a83aafa6a3e3017@100.64.10.2:5060
CSeq: 102 INVITE
User-Agent: Asterisk PBX 13.13.1
Date: Thu, 29 Dec 2016 19:59:36 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, 
PUBLISH, MESSAGE
Supported: replaces, timer
P-Access-Network-Info: GSTN;operator-specific-GI=320615200;network-provided
P-Asserted-Identity: 
Content-Type: application/sdp
Content-Length: 246

v=0
o=root 79038203 79038203 IN IP4 100.64.10.2
s=Asterisk PBX 13.13.1
c=IN IP4 100.64.10.2
t=0 0
m=audio 13564 RTP/AVP 8 101
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:150
a=sendrecv

20:58:46.216642 IP 100.64.10.1.5060 > 100.64.10.2.5060: SIP, length: 375
SIP/2.0 100 trying -- your call is important to us
Via: SIP/2.0/UDP 
100.64.10.2:5060;branch=z9hG4bK38ea6539;rport=5060;received=100.64.10.2
From: "FAX" ;tag=as4cfa9905
To: 
Call-ID: 1c9fb2447f3f72732a83aafa6a3e3017@100.64.10.2:5060
CSeq: 102 INVITE
Content-Length: 0


20:58:46.222391 IP X.X.X.X.5060 > Y.Y.Y.Y.5060: SIP, length: 1040
INVITE sip:+0598@Y.Y.Y.Y:5060 SIP/2.0
Via: SIP/2.0/UDP X.X.X.X;branch=z9hG4bK0cec.841e0d4a4e7897fd734b985f81a15580.0
Max-Forwards: 69
From: "FAX" ;tag=as4cfa9905
To: 
Call-ID: 1c9fb2447f3f72732a83aafa6a3e3017@100.64.10.2:5060
CSeq: 102 INVITE
User-Agent: Asterisk PBX 13.13.1
Date: Thu, 29 Dec 2016 19:59:36 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, 
PUBLISH, MESSAGE
Supported: replaces, timer
P-Access-Network-Info: GSTN;operator-specific-GI=320615200;network-provided
P-Asserted-Identity: 
Content-Type: application/sdp
Content-Length: 264
Contact: 

v=0
o=root 79038203 79038203 IN IP4 X.X.X.X
s=Asterisk PBX 13.13.1
c=IN IP4 X.X.X.X
t=0 0
m=audio 57810 RTP/AVP 8 101
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:150
a=sendrecv
a=nortpproxy:yes

20:58:46.234592 IP Y.Y.Y.Y.5060 > X.X.X.X.5060: SIP, length: 290
SIP/2.0 100 Trying
Via: SIP/2.0/UDP X.X.X.X;branch=z9hG4bK0cec.841e0d4a4e7897fd734b985f81a15580.0
From: "FAX" ;tag=as4cfa9905
To: 
Call-ID: 1c9fb2447f3f72732a83aafa6a3e3017@100.64.10.2:5060
CSeq: 102 INVITE


20:58:46.548771 IP Y.Y.Y.Y.5060 > X.X.X.X.5060: SIP, length: 718
SIP/2.0 183 Session Progress
Via: SIP/2.0/UDP X.X.X.X;branch=z9hG4bK0cec.841e0d4a4e7897fd734b985f81a15580.0
From: "FAX" ;tag=as4cfa9905
To: ;tag=SDc8s1299-01650089adc2
Call-ID: 1c9fb2447f3f72732a83aafa6a3e3017@100.64.10.2:5060
CSeq: 102 INVITE
Content-Length: 216
Contact: 
Content-Disposition: session;handling=required
Content-Type: application/sdp

v=0
o=- 1510281183 168103904 IN IP4 Y.Y.Y.Z
s=-
c=IN IP4 Y.Y.Y.Z
t=0 0
m=audio 17818 RTP/AVP 8 101
a=sendrecv
a=ptime:20
a=rtpmap:101 telephone-event/8000
a=maxptime:30
a=silenceSupp:off - - - -

20:58:46.554903 IP 100.64.10.1.5060 > 100.64.10.2.5060: SIP, length: 719
SIP/2.0 183 Session Progress
From: "FAX" ;tag=as4cfa9905
To: ;tag=SDc8s1299-01650089adc2
Call-ID: 1c9fb2447f3f72732a83aafa6a3e3017@100.64.10.2:5060
CSeq: 102 INVITE

Re: [SR-Users] Astersik kamailio integration.

2016-12-29 Thread Alberto Llamas
I don't see the statement of: #!define WITH_ASTERISK which seems to be need
it according with your conf file.

Cheers,

On Thu, Dec 29, 2016 at 11:57 AM, Deep Pratap Singh Tomar <
deeppratap.to...@lnttechservices.com> wrote:

> Hi
>
> I have modified the file so that if i send register request to kamailio it
> sud register on asterisk also.
>
> i have shared you the code but i cant see anyting happening in the
> asterisk server.
>
> please help me ASAP.
>
> *L&T Technology Services Ltd*
>
> www.LntTechservices.com 
>
> This Email may contain confidential or privileged information for the
> intended recipient (s). If you are not the intended recipient, please do
> not use or disseminate the information, notify the sender and delete it
> from your system.
>
> ___
> 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
>
>


-- 
Alberto Llamas
Telecommunications Engineer
dCAA|dCAP|KPAC
___
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] BYE issue kamailio + rtpproxy "481 call leg transaction doesn't exists".

2016-12-29 Thread Nihar Ranjan Deb
Hi All,

 

I am a new user of kamailio. We have setup a kamilio server with RTP proxy.
Most of the features are working fine except BYE. 

 

 

Say User A and B are registered in kamailio server. A (caller) connected to
B(called), call established. 

 

1. If Caller (A)  disconnects the call, everything goes fine. B gets
disconnected and call releases.

 

2. But if Called party (B) disconnects the call, A never gets disconnected.
I checked trace as well, in this case caller (A) gets a BYE with B's callid.
So A rejects call with "481 call leg transaction doesn't exists".

Basically A party and B party has separate dialog established with Kamilio.
So they have two separate callids . All messages are exchanged correctly.
Only when B party disconnects call, kamailio sends BYE to A party with B
party callid.

 

Please help me to resolve this issue. Do let me know if any more information
required.

 

 

-- INVITE--

 

INVITE sip:966268@*** SIP/2.0

Via: SIP/2.0/UDP
192.168.1.36:63238;branch=z9hG4bK-524287-1---e64d171ec3b0b54e;rport

Max-Forwards: 70

Contact: 

To: 

From: "334031";tag=4406552c

Call-ID: 82158NzljY2NiYTA5YmI3M2U1MzQyODgwMWYwYTI3ZWJjNzc

CSeq: 2 INVITE

Allow: SUBSCRIBE, NOTIFY, INVITE, ACK, CANCEL, BYE, REFER, INFO, OPTIONS,
MESSAGE

Content-Type: application/sdp

Proxy-Authorization: Digest
username="334031",realm="*",nonce="",uri="sip:966268@***",response="
***",algorithm=MD5

Supported: replaces

User-Agent: X-Lite release 4.9.6 stamp 82158

Content-Length: 334

 

v=0

o=- 13127393523589215 1 IN IP4 192.168.1.36

s=X-Lite release 4.9.6 stamp 82158

c=IN IP4 192.168.1.36

t=0 0

m=audio 57116 RTP/AVP 9 8 120 0 84 101

a=rtpmap:120 opus/48000/2

a=fmtp:120 useinbandfec=1; usedtx=1; maxaveragebitrate=64000

a=rtpmap:84 speex/16000

a=rtpmap:101 telephone-event/8000

a=fmtp:101 0-15

a=sendrecv

 

 

 

-BYE

 

 

BYE sip:334031@192.168.1.36:63238;rinstance=ea9b5f48eb342a98 SIP/2.0

Via: SIP/2.0/UDP
***:5060;branch=z9hG4bKa28b.a2ac8c26802cdcc8c619784643f82000.0

Via: SIP/2.0/UDP
10.0.0.1;branch=z9hG4bKsr-HqsDUwx8-phRByVr-9VwUlbcUlPcIpKo-0noY0rjI95gmMhg10
qgY9mc-w5He0EJbTbkb3AZt2Yna6n4uPmqbJWEYwVKYlDTYlH*

From: ;tag=1665200125

To: "334031" ;tag=4406552c

Call-ID:
!!:xePve9XKtEJ4NJJT-2hM9lsXe6RemqZPIRAa1PZf1wJ4DRx5ePRce0OwbHAY-RD4Hlya-HRwe
MH4N6RemHYMI9Y0tV**

CSeq: 3 BYE

Contact: 

Max-Forwards: 69

User-Agent: Yealink SIP-T20P 9.72.0.80

Content-Length: 0

 

 

-- 481-

 

SIP/2.0 481 Call/Transaction Does Not Exist

Via: SIP/2.0/UDP
***:5060;branch=z9hG4bKa28b.a2ac8c26802cdcc8c619784643f82000.0;received=35.1
64.228.12

Via: SIP/2.0/UDP
10.0.0.1;branch=z9hG4bKsr-HqsDUwx8-phRByVr-9VwUlbcUlPcIpKo-0noY0rjI95gmMhg10
qgY9mc-w5He0EJbTbkb3AZt2Yna6n4uPmqbJWEYwVKYlDTYlH*

To: "334031" ;tag=4406552c

From: ;tag=1665200125

Call-ID:
!!:xePve9XKtEJ4NJJT-2hM9lsXe6RemqZPIRAa1PZf1wJ4DRx5ePRce0OwbHAY-RD4Hlya-HRwe
MH4N6RemHYMI9Y0tV**

CSeq: 3 BYE

Accept-Language: en

Content-Length: 0

 

 

 

 

Regards,

Nihar

___
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] Astersik kamailio integration.

2016-12-29 Thread Deep Pratap Singh Tomar
Hi

I have modified the file so that if i send register request to kamailio it sud 
register on asterisk also.

i have shared you the code but i cant see anyting happening in the asterisk 
server.

please help me ASAP.

L&T Technology Services Ltd

www.LntTechservices.com

This Email may contain confidential or privileged information for the intended 
recipient (s). If you are not the intended recipient, please do not use or 
disseminate the information, notify the sender and delete it from your system.


kamailio.cfg
Description: kamailio.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] 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' 
>> *Subject:* Kamailio behind NAT, ACK to private IP not advertised public IP.
>>
>>
>>
>> Hi,
>>
>>   I am encountering the same problem described in google groups 
>> .
>> 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: > >
>>
>> Call-ID: eb8670eec4354acdb69fd26f5625b75c
>>
>> From: "cust1"
>> ;tag=2f25d2ae690747c48c87
>> 4
>> e0b415ca03c
>>
>> To:
>> ;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: 
>>
>> 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"
>> ;tag=2f25d2ae690747c48c87
>> 4
>> e0b415ca03c
>>
>> To:
>> ;tag=1c33ad41f6f44cae8a
>> e
>> 8e060f30fe119
>>
>> Call-ID: eb8670eec4354acdb69fd26f5625b75c
>>
>> CSeq: 4665 ACK
>>
>> Route: 
>>
>> User-Agent: Blink 3.0.0 (Windows)
>>
>> Content-Length:  0
>>
>>
>>
>> Thanks,
>>
>> *Pranathi Venkatayogi*
>>
>> /System Developer II/
>>
>> (520) 745-9447 x4466
>>
>> www.cyracom.com 
>>
>>
>>
>> Join us:   cid:image001.gif@01D1C9C9.C4E8B6D0
>> 
>> cid:image002.gif@01D1C9C9.C4E8B6D0
>>  cid:imag

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

2016-12-29 Thread Fred Posner
> 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' 
>> *Subject:* Kamailio behind NAT, ACK to private IP not advertised public IP.
>>
>>
>>
>> Hi,
>>
>>   I am encountering the same problem described in google groups 
>> .
>> 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: > >
>>
>> Call-ID: eb8670eec4354acdb69fd26f5625b75c
>>
>> From: "cust1"
>> ;tag=2f25d2ae690747c48c874
>> e0b415ca03c
>>
>> To:
>> ;tag=1c33ad41f6f44cae8ae
>> 8e060f30fe119
>>
>> CSeq: 4665 INVITE
>>
>> Server: Blink 3.0.0 (Windows)
>>
>> Allow: SUBSCRIBE, NOTIFY, PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, 
>> MESSAGE, REFER
>>
>> Contact: 
>>
>> 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"
>> ;tag=2f25d2ae690747c48c874
>> e0b415ca03c
>>
>> To:
>> ;tag=1c33ad41f6f44cae8ae
>> 8e060f30fe119
>>
>> Call-ID: eb8670eec4354acdb69fd26f5625b75c
>>
>> CSeq: 4665 ACK
>>
>> Route: 
>>
>> User-Agent: Blink 3.0.0 (Windows)
>>
>> Content-Length:  0
>>
>>
>>
>> Thanks,
>>
>> *Pranathi Venkatayogi*
>>
>> /System Developer II/
>>
>> (520) 745-9447 x4466
>>
>> www.cyracom.com 
>>
>>
>>
>> Join us:   cid:image001.gif@01D1C9C9.C4E8B6D0
>>  
>> cid:image002.gif@01D1C9C9.C4E8B6D0
>>  cid:image003.gif@01D1C9C9.C4E8B6D0
>>  
>> cid:image004.gif@01D1C9C9.C4E8B6D0
>> 
>>
>>
>>
>> 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 

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' 
> *Subject:* Kamailio behind NAT, ACK to private IP not advertised public IP.
>
>
>
> Hi,
>
>   I am encountering the same problem described in google groups 
> .
> 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:  >
>
> Call-ID: eb8670eec4354acdb69fd26f5625b75c
>
> From: "cust1"
> ;tag=2f25d2ae690747c48c874
> e0b415ca03c
>
> To:
> ;tag=1c33ad41f6f44cae8ae
> 8e060f30fe119
>
> CSeq: 4665 INVITE
>
> Server: Blink 3.0.0 (Windows)
>
> Allow: SUBSCRIBE, NOTIFY, PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, 
> MESSAGE, REFER
>
> Contact: 
>
> 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"
> ;tag=2f25d2ae690747c48c874
> e0b415ca03c
>
> To:
> ;tag=1c33ad41f6f44cae8ae
> 8e060f30fe119
>
> Call-ID: eb8670eec4354acdb69fd26f5625b75c
>
> CSeq: 4665 ACK
>
> Route: 
>
> User-Agent: Blink 3.0.0 (Windows)
>
> Content-Length:  0
>
>
>
> Thanks,
>
> *Pranathi Venkatayogi*
>
> /System Developer II/
>
> (520) 745-9447 x4466
>
> www.cyracom.com 
>
>
>
> Join us:   cid:image001.gif@01D1C9C9.C4E8B6D0
>  
> cid:image002.gif@01D1C9C9.C4E8B6D0
>  cid:image003.gif@01D1C9C9.C4E8B6D0
>  
> cid:image004.gif@01D1C9C9.C4E8B6D0
> 
>
>
>
> 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 atta

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

2016-12-29 Thread Daniel Grotti

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' 
*Subject:* Kamailio behind NAT, ACK to private IP not advertised public IP.



Hi,

  I am encountering the same problem described in google groups
.
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: >

Call-ID: eb8670eec4354acdb69fd26f5625b75c

From: "cust1"
;tag=2f25d2ae690747c48c874e0b415ca03c

To:
;tag=1c33ad41f6f44cae8ae8e060f30fe119

CSeq: 4665 INVITE

Server: Blink 3.0.0 (Windows)

Allow: SUBSCRIBE, NOTIFY, PRACK, INVITE, ACK, BYE, CANCEL, UPDATE,
MESSAGE, REFER

Contact: 

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"
;tag=2f25d2ae690747c48c874e0b415ca03c

To:
;tag=1c33ad41f6f44cae8ae8e060f30fe119

Call-ID: eb8670eec4354acdb69fd26f5625b75c

CSeq: 4665 ACK

Route: 

User-Agent: Blink 3.0.0 (Windows)

Content-Length:  0



Thanks,

*Pranathi Venkatayogi*

/System Developer II/

(520) 745-9447 x4466

www.cyracom.com 



Join us:   cid:image001.gif@01D1C9C9.C4E8B6D0
 
cid:image002.gif@01D1C9C9.C4E8B6D0
 cid:image003.gif@01D1C9C9.C4E8B6D0
 cid:image004.gif@01D1C9C9.C4E8B6D0




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



___
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] String split function

2016-12-29 Thread Grant Bagdasarian
Hi Alex,

Thank you for the answer.
I'll do it with the string transformations.

Regards,

Grant

-Original Message-
From: sr-users [mailto:sr-users-boun...@lists.sip-router.org] On Behalf Of Alex 
Balashov
Sent: donderdag 29 december 2016 10:18
To: Kamailio (SER) - Users Mailing List 
Subject: Re: [SR-Users] String split function

Hi Grant,

On Thu, Dec 29, 2016 at 09:12:05AM +, Grant Bagdasarian wrote:

> Hi,
> 
> Is there a string split function built into Kamailio for use in the 
> cfg script?  I'd like to split a string of key/value pairs inside the 
> cfg script.  For example: Key1=Value1;Key2=Value2; First split on ; 
> Then on =

Alas, there is nothing like that. Such a function would have to return an array 
or arraylike structure, and outside of AVPs, there are no array primitives in 
native Kamailio route script.

The best you can do is:

   $var(i) = 0;

   while(defined $(var(str){s.select,$var(i),DELIMITER})) {
  $var(token) = $(var(str){s.select,$var(i),DELIMITER});
  $var(i) = $var(i) + 1;
   }

-- Alex

--
Alex Balashov | Principal | Evariste Systems LLC

Tel: +1-706-510-6800 (direct) / +1-800-250-5920 (toll-free)
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] String split function

2016-12-29 Thread Alex Balashov
Hi Grant,

On Thu, Dec 29, 2016 at 09:12:05AM +, Grant Bagdasarian wrote:

> Hi,
> 
> Is there a string split function built into Kamailio for use in the
> cfg script?  I'd like to split a string of key/value pairs inside the
> cfg script.  For example: Key1=Value1;Key2=Value2; First split on ;
> Then on =

Alas, there is nothing like that. Such a function would have to return
an array or arraylike structure, and outside of AVPs, there are no array
primitives in native Kamailio route script.

The best you can do is:

   $var(i) = 0;

   while(defined $(var(str){s.select,$var(i),DELIMITER})) {
  $var(token) = $(var(str){s.select,$var(i),DELIMITER});
  $var(i) = $var(i) + 1;
   }

-- Alex

-- 
Alex Balashov | Principal | Evariste Systems LLC

Tel: +1-706-510-6800 (direct) / +1-800-250-5920 (toll-free) 
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] String split function

2016-12-29 Thread Grant Bagdasarian
Hi,

Is there a string split function built into Kamailio for use in the cfg script?
I'd like to split a string of key/value pairs inside the cfg script.
For example: Key1=Value1;Key2=Value2;
First split on ;
Then on =

I think I can use the String Transformation {s.select,index,separator}, but I 
was hoping there is a built in function.
{param.valueat,index[, delimiter]} may also be an option.

Regards,

Grant
___
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