[Spce-user] Contact header with LB and extra_sockets

Sergio Serrano sergio.serrano at avanzada7.com
Wed Oct 19 03:57:08 EDT 2016


Thanks Andrew, in my config.yml I have next:

lb:
    debug: no
    extra_sockets: 
      port_5060: udp:172.18.0.246:5060
    max_forwards: '70'
    nattest_exception_ips: []
    pkg_mem: '16'
    port: '60666'


This is done because we have filter by iptables access to 5060 port to
secure Port and use 60666 for the clients. We only use different ports
on same interface for differents services. 

I have review ROUTE_MASK_CONTACT but I cant' see how can we set
extra_sockets in contact when we talk with peer. If you could provide
some help more I would be pleasant with you.

Regards,

SergioEl mar, 18-10-2016 a las 17:56 +0200, Andrew Pogrebennyk escribió:
> Sergio,
> one option (besides modifying ROUTE_MASK_CONTACT in
> lb/kamailio.cfg.customtt.tt2) would be to leave kamailio.lb.port set
> to 5060, but add another extra_socket in config.yml with port 60666
> and if this is a separate network interface or VLAN you are using to
> receive client traffic, add also type sip_ext_incoming on that
> interface in network.yml.
> 
> The reason is that it is insignificant what is selected in
> outbound_socket preference on the user or domain level, because NGCP
> simply reuses the interface it has received registration on, but it
> is using the outbound_socket preference of the peer both to send
> packet there and mask Contact header.
> 
> Edit: actually it is strange that you are getting port 60666, are you
> using advertised address by any chance? As in this case it's a bit
> inconsistent using the kamailio.lb.port instead of the one from
> extra_socket:
> ROUTE[ROUTE_MASK_CONTACT]
> ...
>                 [% IF sip_adv_ips.size -%] 
>                 xlog("L_INFO", "Mask local contact using advertised
> address - [% logres -%]\n");
>                 [% IF kamailio.lb.strict_routing_safe == "yes" %]
>                 $var(tmpcontact) = "<sip:ngcp-lb@[% sip_adv_ips.0
> %]:[% kamailio.lb.port %];ngcpct=" + $var(b64ct) + ">";
>                 [% ELSE %]
>                 $var(tmpcontact) = "<sip:ngcp-lb@[% sip_adv_ips.0
> %]:[% sems.bindport %];ngcpct=" + $var(b64ct) + ">";
>                 [% END %]
>                 [% ELSE -%]
> 
> BR,
> Andrew
> 
> On 18/10/16 16:20, Sergio Serrano wrote:
> > Hi all,
> > 
> > 	We have configured SIPWise with non standar SIP Port(60666) for
> > customers communication and extra_sockets(5060) to communicate with
> > Peers. We have setup extra_socket in Peerings-> details -> peering
> > server preferences -> internal -> outbound sockets. When we connect
> > with Peer, sipwise always put not standar port in Contact header
> > 
> > Contact: <sip:ngcp-lb at X:X:X:X:60666;ngcpct=7369703a3132372e302e302e
> > 313a35303830>
> > 
> > This is generate that INVITE transaction works fine, but when de
> > BYE is initiated by Peer, send REQUEST to contact header and the
> > REQUEST is not received by SIPWise.
> > 
> > Are there any way to fix in sipwise that contact header put the
> > correct port(in this case 5060 instead of 60666) when SIPwise
> > communicate with Peer that uses special extra_socket?
> > 
> > Regards,
> > 
> > Sergio
> > 
> > 
> > _______________________________________________
> > Spce-user mailing list
> > Spce-user at lists.sipwise.com
> > https://lists.sipwise.com/listinfo/spce-user
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: This is a digitally signed message part
URL: <http://lists.sipwise.com/pipermail/spce-user_lists.sipwise.com/attachments/20161019/1c1c7fad/attachment-0001.asc>


More information about the Spce-user mailing list