[SR-Users] Kamailio as pass through proxy

kai.ohnacker at cbc.de kai.ohnacker at cbc.de
Mon Jul 13 15:19:32 CEST 2015


Hello,

I try to setup a SIP infrastructure with Kamailio server in private network and a pass through Kamailio proxy in the DMZ for NAT handling. (-> TEST.jpg)
The pass through proxy uses a new routing algorithm and this works fine for external calls to internal calls. (->Kamailio.cfg.txt)
The logic behind is if a packet on external interface arrives, the proxy change the URI and forward the packet to the internal SIP server.
Otherwise, the proxy shall forward the packet to external interface if a packet arrives at the internal interface.
Because the SIP server has a fix IP, it's easy to route to this server, but the way back is more complicated and I think my algorithm is not working.
But the first problem is the routing behavior from the private server if I try to make a call from intern to extern. The server sends the request to the external IP address from the client and the IP address from the pass through Kamailio proxy is not considered.


8(2720) ERROR: <core> [udp_server.c:576]: udp_send(): sendto(sock,0x7f4724dd9238,1328,0,192.168.1.20:5060,16): Network is unreachable(101)
8(2720) ERROR: tm [../../forward.h:208]: msg_send(): udp_send failed
8(2720) WARNING: tm [t_fwd.c:1610]: t_send_branch(): ERROR: t_send_branch: sending request on branch 0 failed
8(2720) exec: *** cfgtrace:request_route=[RELAY] c=[/usr/local/etc/kamailio/kamailio.cfg] l=553 a=24 n=sl_reply_error
8(2720) ERROR: sl [sl_funcs.c:387]: sl_reply_error(): ERROR: sl_reply_error used: Unfortunately error on sending to next hop occurred (477/SL)
8(2720) exec: *** cfgtrace:request_route=[RELAY] c=[/usr/local/etc/kamailio/kamailio.cfg] l=555 a=2 n=exit
7(2718) exec: *** cfgtrace:request_route=[DEFAULT_ROUTE] c=[/usr/local/etc/kamailio/kamailio.cfg] l=474 a=5 n=route

To change the IP address which is used from the private server as the destination address,  I added the following lines to the Kamailio.cfg.

modparam("registrar", "use_path",1)
modparam("registrar", "path_mode", 2)
modparam("registrar", "path_use_received",1)
modparam("path", "use_received", 1)



But the routing behavior has not changed. (perhaps this configure was not the right)

Is there a way to configure the private server that the last IP address from the record-route header is used?



Cheers,

Kai







-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20150713/67da69ee/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: TEST.JPG
Type: image/jpeg
Size: 23435 bytes
Desc: TEST.JPG
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20150713/67da69ee/attachment.jpe>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: kamailio.cfg.txt
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20150713/67da69ee/attachment.txt>


More information about the sr-users mailing list