Re: [SR-Users] Re: Audio stops after resuming call from hold

2018-03-25 Thread gerry kernan
Update didn't make any difference, when back to investigate reinvites 
Added if statement that sets rtpengie direction if is invite with to tag , all 
ok now 






Gerry Kernan 
InfinityIT 

 
Suite 17 The Mall 
Beacon Court, 
Sandyford, 
Dublin 18. 

 
p: +35312930090 
f:  +35312930137 
w: www.infinityit.ie



 From:   gerry kernan <gerry.ker...@infinityit.ie> 
 To:   'Kamailio (SER) - Users Mailing List' <sr-users@lists.kamailio.org> 
 Sent:   23/03/2018 3:55 PM 
 Subject:   Re: [SR-Users]  Re: Audio stops after resuming call from 
hold 




Hi Segriu
 
I’ve updated to 4.3. I’ll let you know how I go on with the new version
 
 
Best Regards
 
Gerry Kernan
 
From: sr-users [mailto:sr-users-boun...@lists.kamailio.org] On Behalf Of Sergiu 
Pojoga
Sent: 23 March 2018 12:50
To: Kamailio (SER) - Users Mailing List <sr-users@lists.kamailio.org>
Subject: Re: [SR-Users]  Re: Audio stops after resuming call from hold
 

Config code looks solid to me. Look at the 'c=' in SDP in the forward and reply 
re-INVITEs. If it gets properly overwritten (same way as it is for the dialog 
forming INVITE) when rtpengine is engaged, then I believe we are facing some 
kind of bug in the 4.2 version of Kamailio, something about this thread: 
https://lists.kamailio.org/pipermail/sr-users/2012-September/074567.html

 

I can't upgrade Kamailio at the moment to test my theory as it's a production 
environment, but may be you can?

 

On Fri, Mar 23, 2018 at 6:17 AM, gerry kernan <gerry.ker...@infinityit.ie> 
wrote:


Hi 
 
I think my issue is related to rtpengine when the call is take off hold. Im 
using a private address and a public address . below is route section of our 
Kamailio.cfg and do I have somethimg setup incorrectly for handleing re-invites?
 
 
/usr/sbin/rtpengine --pidfile /var/run/rtpengine.pid --table=-1 
--interface=priv/192.X.X.X --interface=pub/212.X.X.X --listen-ng=127.0.0.1:7722 
--tos=184 --timeout=60 --log-level=7 --log-facility=local5 --homer-protocol=udp 
--homer-id=2011
 
 
request_route {
 
    route(SANITY);
 
    force_rport();
 
    # CANCEL processing
    if (is_method("CANCEL")) {
    if (t_check_trans()) {
    route(RELAY);
    }
    exit;
    }
 
    # handle retransmissions
    if (!is_method("ACK")) {
    if(t_precheck_trans()) {
    t_check_trans();
    exit;
    }
    t_check_trans();
    }
 
    # handle requests within SIP dialogs
    route(WITHINDLG);
 
    ### only initial requests (no To tag)
 
    # record routing for dialog forming requests (in case they are routed)
    if (is_method("INVITE|SUBSCRIBE")) {
    record_route();
    }
 
    if (af==INET) {
    route(SIPIPV4);
    } else {
    route(SIPIPV6);
    }
}
 
# Stateful fowarding
route[RELAY] {
    if (!t_relay()) {
    sl_reply_error();
    }
    exit;
}
 
# Handle requests within SIP dialogs
route[WITHINDLG] {
    if (!has_totag()) return;
 
    # sequential request withing a dialog should
    # take the path determined by record-routing
    if (loose_route()) {
    route(DLGURI);
    if ( is_method("ACK") ) {
    # ACK is forwarded statelessly
    if (has_body("application/sdp")) {
    rtpengine_answer();
    }
    } else if ( is_method("NOTIFY") ) {
    # Add Record-Route for in-dialog NOTIFY as per RFC 6665.
    record_route();
    }
    route(DISPATCH);
    exit;
    }
 
    if ( is_method("ACK") ) {
    if ( t_check_trans() ) {
    # no loose-route, but stateful ACK;
    # must be an ACK after a 487
    # or e.g. 404 from upstream server
    route(RELAY);
    exit;
    } else {
    # ACK without matching transaction ... ignore and 
discard
        exit;
    }
    }
    sl_send_reply("404","Not here");
    exit;
}
 
route[SIPIPV4] {
    if (src_ip != BACKEND_NET4)
    {
    # device (client) to server (backend)
    route(V4DEVTOSRV);
    } else {
    # server (backend) to devuce (client)
    route(V4SRVTODEV);
    }
}
 
route[SIPIPV6] {
    sl_send_reply("404", "Not routing for IPv6");
    exit;
}
 
route[V4DEVTOSRV] {
    xlog("L_NOTICE", "client->backend FROM CLIENT IP: $si $rm $ru  $td 
ID=$ci\n");
 
    # SIP request packet client-&

Re: [SR-Users] Re: Audio stops after resuming call from hold

2018-03-24 Thread gerry kernan
Hi Segriu

 

I’ve updated to 4.3. I’ll let you know how I go on with the new version

 

Best Regards

 

Gerry Kernan

 

From: sr-users [mailto:sr-users-boun...@lists.kamailio.org] On Behalf Of Sergiu 
Pojoga
Sent: 23 March 2018 12:50
To: Kamailio (SER) - Users Mailing List <sr-users@lists.kamailio.org>
Subject: Re: [SR-Users]  Re: Audio stops after resuming call from hold

 

Config code looks solid to me. Look at the 'c=' in SDP in the forward and reply 
re-INVITEs. If it gets properly overwritten (same way as it is for the dialog 
forming INVITE) when rtpengine is engaged, then I believe we are facing some 
kind of bug in the 4.2 version of Kamailio, something about this thread: 
https://lists.kamailio.org/pipermail/sr-users/2012-September/074567.html

 

I can't upgrade Kamailio at the moment to test my theory as it's a production 
environment, but may be you can?

 

On Fri, Mar 23, 2018 at 6:17 AM, gerry kernan <gerry.ker...@infinityit.ie 
<mailto:gerry.ker...@infinityit.ie> > wrote:

Hi 

 

I think my issue is related to rtpengine when the call is take off hold. Im 
using a private address and a public address . below is route section of our 
Kamailio.cfg and do I have somethimg setup incorrectly for handleing re-invites?

 

 

/usr/sbin/rtpengine --pidfile /var/run/rtpengine.pid --table=-1 
--interface=priv/192.X.X.X --interface=pub/212.X.X.X --listen-ng=127.0.0.1:7722 
<http://127.0.0.1:7722>  --tos=184 --timeout=60 --log-level=7 
--log-facility=local5 --homer-protocol=udp --homer-id=2011

 

 

request_route {

 

route(SANITY);

 

force_rport();

 

# CANCEL processing

if (is_method("CANCEL")) {

if (t_check_trans()) {

route(RELAY);

}

exit;

}

 

# handle retransmissions

if (!is_method("ACK")) {

if(t_precheck_trans()) {

t_check_trans();

exit;

}

t_check_trans();

}

 

# handle requests within SIP dialogs

route(WITHINDLG);

 

### only initial requests (no To tag)

 

# record routing for dialog forming requests (in case they are routed)

if (is_method("INVITE|SUBSCRIBE")) {

record_route();

}

 

if (af==INET) {

route(SIPIPV4);

} else {

route(SIPIPV6);

}

}

 

# Stateful fowarding

route[RELAY] {

if (!t_relay()) {

sl_reply_error();

}

exit;

}

 

# Handle requests within SIP dialogs

route[WITHINDLG] {

if (!has_totag()) return;

 

# sequential request withing a dialog should

# take the path determined by record-routing

if (loose_route()) {

route(DLGURI);

if ( is_method("ACK") ) {

# ACK is forwarded statelessly

if (has_body("application/sdp")) {

rtpengine_answer();

}

} else if ( is_method("NOTIFY") ) {

# Add Record-Route for in-dialog NOTIFY as per RFC 6665.

record_route();

}

route(DISPATCH);

exit;

}

 

if ( is_method("ACK") ) {

if ( t_check_trans() ) {

# no loose-route, but stateful ACK;

# must be an ACK after a 487

# or e.g. 404 from upstream server

route(RELAY);

exit;

} else {

# ACK without matching transaction ... ignore and 
discard

exit;

}

}

sl_send_reply("404","Not here");

exit;

}

 

route[SIPIPV4] {

if (src_ip != BACKEND_NET4)

{

# device (client) to server (backend)

route(V4DEVTOSRV);

} else {

# server (backend) to devuce (client)

route(V4SRVTODEV);

}

}

 

route[SIPIPV6] {

sl_send_reply("404", "Not routing for IPv6");

exit;

}

 

route[V4DEVTOSRV] {

xlog("L_NOTICE", "client->backend FROM CLIENT IP: $si $rm $ru  $td 
ID=$ci\n");

 

# SIP request packet client->backend

 

# - remove preloaded route headers

remove_hf("Route");

 

if (!lookup_domain("$td", "dattr_")) {

xlog("L_ERR", "$si $rm $ru -- domain \"$td\" is not "

"found in domain table\n");

xlog("a

Re: [SR-Users] Re: Audio stops after resuming call from hold

2018-03-24 Thread gerry kernan
I’ve been testing with jitsi softphone from a different location( customer was 
using Zoiper which fails every time) and hold/unhold works every time, mightn’t 
 be a Kamailio or rtpengine issue. I’ll do further tests to see if it local 
firewall/network

 

 

 

Best Regards

 

Gerry Kernan

 

From: sr-users [mailto:sr-users-boun...@lists.kamailio.org] On Behalf Of Sergiu 
Pojoga
Sent: 23 March 2018 12:50
To: Kamailio (SER) - Users Mailing List <sr-users@lists.kamailio.org>
Subject: Re: [SR-Users]  Re: Audio stops after resuming call from hold

 

Config code looks solid to me. Look at the 'c=' in SDP in the forward and reply 
re-INVITEs. If it gets properly overwritten (same way as it is for the dialog 
forming INVITE) when rtpengine is engaged, then I believe we are facing some 
kind of bug in the 4.2 version of Kamailio, something about this thread: 
https://lists.kamailio.org/pipermail/sr-users/2012-September/074567.html

 

I can't upgrade Kamailio at the moment to test my theory as it's a production 
environment, but may be you can?

 

On Fri, Mar 23, 2018 at 6:17 AM, gerry kernan <gerry.ker...@infinityit.ie 
<mailto:gerry.ker...@infinityit.ie> > wrote:

Hi 

 

I think my issue is related to rtpengine when the call is take off hold. Im 
using a private address and a public address . below is route section of our 
Kamailio.cfg and do I have somethimg setup incorrectly for handleing re-invites?

 

 

/usr/sbin/rtpengine --pidfile /var/run/rtpengine.pid --table=-1 
--interface=priv/192.X.X.X --interface=pub/212.X.X.X --listen-ng=127.0.0.1:7722 
<http://127.0.0.1:7722>  --tos=184 --timeout=60 --log-level=7 
--log-facility=local5 --homer-protocol=udp --homer-id=2011

 

 

request_route {

 

route(SANITY);

 

force_rport();

 

# CANCEL processing

if (is_method("CANCEL")) {

if (t_check_trans()) {

route(RELAY);

}

exit;

}

 

# handle retransmissions

if (!is_method("ACK")) {

if(t_precheck_trans()) {

t_check_trans();

exit;

}

t_check_trans();

}

 

# handle requests within SIP dialogs

route(WITHINDLG);

 

### only initial requests (no To tag)

 

# record routing for dialog forming requests (in case they are routed)

if (is_method("INVITE|SUBSCRIBE")) {

record_route();

}

 

if (af==INET) {

route(SIPIPV4);

} else {

route(SIPIPV6);

}

}

 

# Stateful fowarding

route[RELAY] {

if (!t_relay()) {

sl_reply_error();

}

exit;

}

 

# Handle requests within SIP dialogs

route[WITHINDLG] {

if (!has_totag()) return;

 

# sequential request withing a dialog should

# take the path determined by record-routing

if (loose_route()) {

route(DLGURI);

if ( is_method("ACK") ) {

# ACK is forwarded statelessly

if (has_body("application/sdp")) {

rtpengine_answer();

}

} else if ( is_method("NOTIFY") ) {

# Add Record-Route for in-dialog NOTIFY as per RFC 6665.

record_route();

}

route(DISPATCH);

exit;

}

 

if ( is_method("ACK") ) {

if ( t_check_trans() ) {

# no loose-route, but stateful ACK;

# must be an ACK after a 487

# or e.g. 404 from upstream server

route(RELAY);

exit;

} else {

# ACK without matching transaction ... ignore and 
discard

exit;

}

}

sl_send_reply("404","Not here");

exit;

}

 

route[SIPIPV4] {

if (src_ip != BACKEND_NET4)

{

# device (client) to server (backend)

route(V4DEVTOSRV);

} else {

# server (backend) to devuce (client)

route(V4SRVTODEV);

}

}

 

route[SIPIPV6] {

sl_send_reply("404", "Not routing for IPv6");

exit;

}

 

route[V4DEVTOSRV] {

xlog("L_NOTICE", "client->backend FROM CLIENT IP: $si $rm $ru  $td 
ID=$ci\n");

 

# SIP request packet client->backend

 

# - remove preloaded route headers

remove_hf("Route");

 

if (!lookup_domain("$td", "dattr_")) {


Re: [SR-Users] Re: Audio stops after resuming call from hold

2018-03-23 Thread gerry kernan
   }

}

 

if (has_body("application/sdp")) {

rtpengine_offer("direction=pub direction=priv ICE=remove");

}

 

route(DISPATCH);

 

xlog("L_NOTICE", "DISPATCH: source address: $si SIP request's method: 
$rm SIP Request's URI: $ru ID=$ci\n");

exit;

}

 

route[V4SRVTODEV] {

# SIP request packet backend->client

 

# Invites from backend contain Route field and it should be used

# to reach the registered client

 

xlog("L_NOTICE", "backend->client FROM BACKEND: source address: $si"

"  METHOD: $rm  $ru  To-URI: $tu ID=$ci \n");

 

xlog("L_NOTICE", "backend->client $rm: TO $ru FROM $fu ID=$ci\n");

if (has_body("application/sdp")) {

rtpengine_offer("direction=priv direction=pub ICE=remove");

}

 

if(!is_present_hf("Route")) {

sl_send_reply("404", "No record routing");

exit;

}

loose_route();

 

route(DISPATCH);

}

 

route[DISPATCH] {

 

xlog("L_NOTICE", "ROUTE-DISPATCH $si $rm $ru ID=$ci \n");

 

xlog("L_NOTICE", "ROUTE-DISPATCH Messege buff ID=$ci $rm  \n 
$mb\n");

 

if(!is_method("ACK")) {

if (has_body("application/sdp")) {

xlog("L_NOTICE", "SDP OfferID=$ci\n");

t_on_reply("INVSDP");

} else {

t_on_reply("INVNOSDP");

}

}

xlog("L_NOTICE", "DISPATCH $si METHOD: $rm $ru $du ID=$ci\n");

xlog("L_NOTCIE", "Return code: $rc ID=$ci\n");

route(RELAY);

exit;

}

 

 

# URI update for dialog requests

route[DLGURI] {

if(!isdsturiset()) {

handle_ruri_alias();

}

return;

}

 

route[REPLYALIAS] {

if(src_ip != BACKEND_NET4) {

# SIP reply packet client->backend

xlog("L_NOTICE", "FROM CLIENT($si onreply_route- ): Method: $rm"

"$ru To: $tu Recieved on: $Ri ID=$ci ");

add_contact_alias();

} else {

# SIP reply packet backend->client

xlog("L_NOTICE", "FROM BACKEND($si onreply_route): Method: $rm"

" $ru To: $tu Recieved on: $Ri  ID=$ci");

xlog("L_NOTICE", "FROM BACKEND #rtpengine_answer# ($si 
onreply_route):"

" source address: $si SIP request's method: $rm 
SIP Request's"

" URI: $ru ID=$ci\n");

}

}

 

onreply_route[INVSDP] {

if (af!=INET) {

exit;

}

if (has_body("application/sdp")) {

xlog("L_NOTICE", "INVSDP Route: Method: $rm"

        " $ru To: $tu Recieved on: $Ri  ID=$ci\n 
$mb\n");

 

rtpengine_answer();

}

route(REPLYALIAS);

exit;

}

 

onreply_route[INVNOSDP] {

if (af!=INET) {

exit;

}

if (has_body("application/sdp")) {

xlog("L_NOTICE", "INVNOSDP Route: Method: $rm"

" $ru To: $tu Recieved on: $Ri  ID=$ci\n 
$mb\n");

 

    

if(src_ip == BACKEND_NET4) {

rtpengine_offer("direction=priv direction=pub 
ICE=remove");

} else {

rtpengine_offer("direction=pub direction=priv 
ICE=remove");

}

}

route(REPLYALIAS);

exit;

}

 

 

Best Regards

 

Gerry Kernan

 

From: sr-users [mailto:sr-users-boun...@lists.kamailio.org] On Behalf Of gerry 
kernan
Sent: 23 March 2018 08:50
To: 'Kamailio (SER) - Users Mailing List' <sr-users@lists.kamailio.org>
Subject: Re: [SR-Users]  Re: Audio stops after resuming call from hold

 

Hi Segriu

 

I think my issue is with  rtpengine . I’m using direction parameter to set a 
LAN and WAN IP on the offer and I think it’s getting messed up during re-invites

 

 

 

 

 

Best Regards

 

Gerry Kernan

 

From: sr-users [mailto:sr-users-boun...@lists.kamailio.org] On Behalf Of Sergiu 
Pojoga
Sent: 23 March 2018 01:34
To: Kamailio (SER) - Users Mailing List <sr-users@lists.kamailio.org 
<mailto:sr-users@lists.kamailio.org> >
Subject:  Re: [SR-Users] Audio stops after resuming call from hold

 

OMG, what are the odds, a client re

Re: [SR-Users] Re: Audio stops after resuming call from hold

2018-03-23 Thread gerry kernan
Hi Segriu

 

I think my issue is with  rtpengine . I’m using direction parameter to set a 
LAN and WAN IP on the offer and I think it’s getting messed up during re-invites

 

 

 

 

 

Best Regards

 

Gerry Kernan

 

From: sr-users [mailto:sr-users-boun...@lists.kamailio.org] On Behalf Of Sergiu 
Pojoga
Sent: 23 March 2018 01:34
To: Kamailio (SER) - Users Mailing List <sr-users@lists.kamailio.org>
Subject:  Re: [SR-Users] Audio stops after resuming call from hold

 

OMG, what are the odds, a client reported the same problem today! Edge proxy 
running same 4.2.3, requests are forwarded to a farm of Asterisks v13 in a 
similar way based on $rd, far-end NAT traversal is handled by Kamailio.

 

I've had only an hour or so to debug today. Re-invites containing SDP are 
handled the same way as invites in terms of SDP mangling, all looks good in 
that sense. There's nothing special to be done about re-invites.

 

Preliminary clue is that this happens (or not) depending on the type of 
firewall/NAT behind which the phone is located. In the case with the trouble, 
it's a Sonicwall, probably a Symmetric NAT. Is doesn't happen to a phone behind 
a Full/Restricted Cone NAT. 

 

What nat= are you setting for Asterisk peers?

Do you engage rtpproxy/rtpengine?

Any far-end NAT traversal manipulations involved such as SIP ALG or STUN?

 

Cheers.

 

On Thu, Mar 22, 2018 at 3:55 PM, gerry kernan <gerry.ker...@infinityit.ie 
<mailto:gerry.ker...@infinityit.ie> > wrote:

Hi 

 

Hoping someone can point me in the right direction.

I have a Kamailio Ver: 4.2.3-1.1  running in front of a few asterisk servers 
Ver: 13.17.2  sip is routed to an asterisk server depending the domain name in 
the sip request, all working as expected . but if a call is put on hold  after 
resuming the call the party that placed the call on hold can’t hear any audio. 
The other party can hear . do I need to do anything special to handle 
re-invites for calls put on hold?

 

 

Gerry Kernan

 



 

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

Tel:  +353 - (0)1 - 293 0090   |   E-Mail:   
<mailto:gerry.ker...@infinityit.ie> gerry.ker...@infinityit.ie

 

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

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

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

 


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

 

___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] rtpengine nattede WAN address

2017-06-01 Thread gerry kernan
Thanks Stefan 

That's sorted my issue 


Gerry

Sent from my iPhone

> On 1 Jun 2017, at 09:25, Mititelu Stefan <stefan.mititel...@gmail.com> wrote:
> 
> 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.ker...@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 
>> --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:*9...@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@Client-IP:29345;transport=UDP> To: 
>> <sip:*9...@sip.domain.com;transport=UDP>
>> 
>> From: <sip:2...@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:*9...@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@Client-IP:29345;transport=UDP> To: 
>> <sip:*9...@sip.domain.com;transport=UDP>
>> 
>> From: <sip:2...@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=fm

[SR-Users] rtpengine nattede WAN address

2017-06-01 Thread gerry kernan
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
--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:*9...@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@Client-IP:29345;transport=UDP> To:
<sip:*9...@sip.domain.com;transport=UDP> 

From: <sip:2...@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:*9...@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---e38082af1f110ad
1;rport=29345 Max-Forwards: 69 

Contact: <sip:21@Client-IP:29345;transport=UDP> To:
<sip:*9...@sip.domain.com;transport=UDP> 

From: <sip:2...@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   |   E-Mail:
<mailto:gerry.ker...@infinityit.ie> gerry.ker...@infinityit.ie

 

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

IP TelephonyAsterisk Consulting -
<http://www.asteriskconsulting.com> www.asteriskconsulting.com

Contact CentreTotal Interact -
<http://www.totalinteract.com> www.totalinteract.com

 

___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] Kamailio rtpengine sdp

2017-04-18 Thread gerry kernan
Hi 

 

Thanks in advance if anyone can point me in the correct direction .

I have kamailio running in front of some asterisk VM's.  SIP endpoint
register to their asterisk PBX via Kamailio dispatcher module. I'm running
rtpengine with a Wan and private interface to bridge audio stream between
these endpoints on the WAN to asterisk PBX running on LAN IP behind
Kamailio.

Calls from ext to ext work fine audio both directions , calls outbound to
PSTN via SIP trunk to SIP provider via trunk on asterisk work fine audio
both directions. But incoming calls via SIP provider I only get audio on
stream from asterisk registered ext to external caller , no audio from
external caller to the asterisk ext.

I reckon I have something wrong in my Kamailio.cfg . if I register an ext
direct to asterisk I get audio both ways on incoming calls. And rtp logs
from rtpenegine show it as trying to send the rtp to the private address of
the sip endpoint rather that its WAN address.

I think my mistake in somewhere in the cfg below. 

Do I need to handle invites from the backend asterisk servers different that
invites from sip endpoints?

 

 

 

Gerry Kernan

 



 

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

Tel:  +353 - (0)1 - 293 0090   |   E-Mail:
<mailto:gerry.ker...@infinityit.ie> gerry.ker...@infinityit.ie

 

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

IP TelephonyAsterisk Consulting -
<http://www.asteriskconsulting.com> www.asteriskconsulting.com

Contact CentreTotal Interact -
<http://www.totalinteract.com> www.totalinteract.com

 

___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users