[SR-Users] rtpengine nattede WAN address

gerry kernan gerry.kernan at infinityit.ie
Thu Jun 1 10:26:39 CEST 2017


Thanks Stefan 

 

Will do , much appreciated 

 

 

 

Best Regards

 

Gerry Kernan

 

From: sr-users [mailto:sr-users-bounces at lists.kamailio.org] On Behalf Of Mititelu Stefan
Sent: 01 June 2017 09:23
To: Kamailio (SER) - Users Mailing List <sr-users at lists.kamailio.org>
Subject: Re: [SR-Users] rtpengine nattede WAN address

 

Hi gerry,

 

1. The rtpengine is running on the same machine as kamailio? (From --interface=192.X.X.148!X.X.X.X , I guess so..)

2. Can you paste the rtpengine_offer/rtpengine_answer you are using in Kamailio config?

 

I remember trying this approach which worked for me:

- set interface = external/192.X.X.148!X.X.X.X;internal/192.X.X.148

- use rtpengine_manage() in Kamailio config with "direction=external direction=internal" for incoming calls

- use rtpengine_manage() in Kamailio config with "direction=internal direction=external" for outgoing calls

 

Give it a try! :)

 

---

Stefan

 

 

On Wed, May 31, 2017 at 6:31 PM, gerry kernan <gerry.kernan at infinityit.ie <mailto:gerry.kernan at infinityit.ie> > wrote:

Hi 

 

I’m looking to check if what I’m trying to configure is feasible .

 

UA -> WAN(X.X.X.X) -> Kamailio(LAN 192.X.X.148) -> internal PBX(LAN 192.X.X.131)

 

I have a WN IP forwarded to and internal Kamailio server which is sitting in front of an asterisk server. SIP requests are sent to asterisk from Kamailio via dispatcher .

SIP client can register via WAN and Kamailio to asterisk , I have rtpenine configured as below.

 

/usr/sbin/rtpengine --interface=192.X.X.148!X.X.X.X --listen-ng=7722 --timeout=60 --silent-timeout=3600 --pidfile=/var/run/ngcp-rtpengine-daemon.pid --table=0 --log-level=6 --log-facility=local7 --log-facility-rtcp=local7 --homer=192.168.200.5:9060 <http://192.168.200.5:9060>  --homer-protocol=udp --homer-id=2002

 

 

But SIP SDP when sent to asterisk is still show the WAN IP of the Sip client in the SDP offer that goes to asterisk , ive tried adding parameter “via-branch=” and “auto-bridge” to rtpengine_offer but they don’t seem to make a difference , is there anyone way I can force the SDP offer that goes to the backend PBX to use the IP of Kamailio server that rtpengine is running on rather that the WAN IP that I’m advertising(X.X.X.X) ?

 

 

 

Example SIP SDP from WAN client to asterisk 

 

INVITE sip:*97 at sip.domain.com <mailto:97 at sip.domain.com> ;transport=UDP SIP/2.0

Via: SIP/2.0/UDP Client-IP:29345;branch=z9hG4bK-524287-1---e38082af1f110ad1;rport Max-Forwards: 70 

Contact: <sip:21 at Client-IP:29345;transport=UDP> To: <sip:*97 at sip.domain.com <mailto:97 at sip.domain.com> ;transport=UDP> 

From: <sip:21 at sip.domain.com <mailto:sip%3A21 at sip.domain.com> ;transport=UDP>;tag=e637343b 

Call-ID: jvqeIB9f48_OGcTq0UxP7w.. 

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

Content-Type: application/sdp 

User-Agent: Zoiper rv2.8.40 

o=Z 

0 0 IN IP4 Client-IP 

s=Z 

c=IN IP4 Client-IP 

t=0 0 

m=audio 29344 RTP/AVP 8 0 101 

a=rtpmap:101 telephone-event/8000 

a=fmtp:101 0-16 

a=sendrecv

 

and SDP that Kamailio sends to asterisk 

 

INVITE sip:*97 at sip.domain.com <mailto:97 at sip.domain.com> ;transport=UDP SIP/2.0 

Record-Route: <sip:192.X.X.148;lr> 

Via: SIP/2.0/UDP 192.X.X.148;branch=z9hG4bKd924.bcc4248735b53e9cf783c87c81dfee28.0 

Via: SIP/2.0/UDP Client-IP:29345;received=Client-IP;branch=z9hG4bK-524287-1---e38082af1f110ad1;rport=29345 Max-Forwards: 69 

Contact: <sip:21 at Client-IP:29345;transport=UDP> To: <sip:*97 at sip.domain.com <mailto:97 at sip.domain.com> ;transport=UDP> 

From: <sip:21 at sip.domain.com <mailto:sip%3A21 at sip.domain.com> ;transport=UDP>;tag=e637343b 

Call-ID: jvqeIB9f48_OGcTq0UxP7w.. 

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

Content-Type: application/sdp User-Agent: Zoiper rv2.8.40 

 Path: <sip:192.X.X.148;lr;received=sip:Client-IP:29345> 

v=0 

o=Z 0 0 IN IP4 Client-IP 

s=Z c=IN IP4 X.X.X.X 

t=0 0 

m=audio 32550 RTP/AVP 8 0 101 

a=rtpmap:101 telephone-event/8000 

a=fmtp:101 0-16 

a=sendrecv 

a=rtcp:32551 

a=ice-ufrag:Dwd23Dem 

a=ice-pwd:9Itp6Cq7lkYJxMkeDeA1I2kkzw 

a=candidate:KZyzUR5lXJJpt1Et 1 UDP 2130706431 X.X.X.X 32550 typ host a=candidate:KZyzUR5lXJJpt1Et 2 UDP 2130706430 X.X.X.X 32551 typ host

 

Gerry Kernan

 



 

Infinity IT   |   17 The Mall   |   Beacon Court   |   Sandyford   |   Dublin D18 E3C8   |   Ireland

Tel:  +353 - (0)1 - 293 0090 <tel:+353%201%20293%200090>    |   E-Mail:   <mailto:gerry.kernan at infinityit.ie> gerry.kernan at infinityit.ie

 

Managed IT Services       Infinity IT -  <http://www.infinityit.ie/> www.infinityit.ie

IP Telephony                    Asterisk Consulting –  <http://www.asteriskconsulting.com> www.asteriskconsulting.com

Contact Centre                Total Interact –  <http://www.totalinteract.com> www.totalinteract.com

 


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

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20170601/7e2dab28/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.jpg
Type: image/jpeg
Size: 2681 bytes
Desc: not available
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20170601/7e2dab28/attachment.jpg>


More information about the sr-users mailing list