<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Thanks a lot Luis. It worked like a charm. <div class=""><br class=""></div><div class="">Regards</div><div class="">Cibin</div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On 28-Dec-2014, at 9:50 am, Cibin Paul <<a href="mailto:paul_cibin@me.com" class="">paul_cibin@me.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="content-type" content="text/html; charset=utf-8" class=""><div dir="auto" class=""><div class="">Thanks Luis. I will check today and inform you. </div><div class=""><br class=""></div><div class="">Regards</div><div class="">Cibin</div><div class=""><br class="">On 28-Dec-2014, at 9:06 am, Luis Jimenez <<a href="mailto:ljjimenez@gmail.com" class="">ljjimenez@gmail.com</a>> wrote:<br class=""><br class=""></div><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class=""><div class="">You can send the info you need to Asterisk using X headers, for example:<br class=""><br class=""></div><div class="">Kamailio has the pseudo variable $si which contains the public IP originating the request and you can send that to Asterisk using append_hf.<br class=""></div><div class=""><br class=""></div>  append_hf("X-orig-IP: $si");<br class=""><br class=""><br class=""></div>In Asterisk you can access the headers as ${SIP_HEADER(X-orig-IP)}<br class=""><br class=""></div><div class="gmail_extra"><br class=""><div class="gmail_quote">On Sat, Dec 27, 2014 at 7:00 PM, Cibin Paul <span dir="ltr" class=""><<a href="mailto:paul_cibin@me.com" target="_blank" class="">paul_cibin@me.com</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hey,  thanks for looking into this. Phones register with kamailio and I have configured kamailio to load balance the asterisk servers using round robin algorithm. Phones registered in kamailio will directly send the call to the asterisk servers. From there I will send the call out using other routes.<br class="">
<br class="">
In the contact field of the sip header, I get the username@private ip instead of the public ip. I need it in the format username@public ip<br class="">
<div class="HOEnZb"><div class="h5"><br class="">
> On 27-Dec-2014, at 3:26 pm, Daniel-Constantin Mierla <<a href="mailto:miconda@gmail.com" class="">miconda@gmail.com</a>> wrote:<br class="">
><br class="">
> Hello,<br class="">
><br class="">
> I am not that familiar with asterisk to know all the insides SIPURI and<br class="">
> SIPCHANNEL(recvip), you have to explain which fields you need from the<br class="">
> SIP packet in order to be able to assist further, unless someone else<br class="">
> more familiar with asterisk can jump in.<br class="">
><br class="">
> Also, it is not clear how the flow is there, you say you have kamailio<br class="">
> behind asterisk servers, does that mean the phone is sending to asterisk<br class="">
> first, which then forwards to kamailio?<br class="">
><br class="">
> Cheers,<br class="">
> Daniel<br class="">
><br class="">
>> On 26/12/14 18:37, Cibin Paul wrote:<br class="">
>> Hi,<br class="">
>><br class="">
>> I have a kamailio 4.1 as a gateway  and registrar behind asterisk servers. On asterisk, I save the IP address of the originating call parsing the SIPURI or SIPCHANNEL(recvip). In both cases, I am receiving the private ip of the user agent registered with kamailio. Do I need to change anything in kamailio to receive the actual IP address. Please suggest.<br class="">
>><br class="">
>> Regards<br class="">
>> Cibin<br class="">
>><br class="">
>><br class="">
>> _______________________________________________<br class="">
>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br class="">
>> <a href="mailto:sr-users@lists.sip-router.org" class="">sr-users@lists.sip-router.org</a><br class="">
>> <a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank" class="">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br class="">
><br class="">
> --<br class="">
> Daniel-Constantin Mierla<br class="">
> <a href="http://twitter.com/#!/miconda" target="_blank" class="">http://twitter.com/#!/miconda</a> - <a href="http://www.linkedin.com/in/miconda" target="_blank" class="">http://www.linkedin.com/in/miconda</a><br class="">
><br class="">
><br class="">
> _______________________________________________<br class="">
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br class="">
> <a href="mailto:sr-users@lists.sip-router.org" class="">sr-users@lists.sip-router.org</a><br class="">
> <a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank" class="">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br class="">
<br class="">
_______________________________________________<br class="">
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br class="">
<a href="mailto:sr-users@lists.sip-router.org" class="">sr-users@lists.sip-router.org</a><br class="">
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank" class="">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br class="">
</div></div></blockquote></div><br class=""></div>
</div></blockquote><blockquote type="cite" class=""><div class=""><span class="">_______________________________________________</span><br class=""><span class="">SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list</span><br class=""><span class=""><a href="mailto:sr-users@lists.sip-router.org" class="">sr-users@lists.sip-router.org</a></span><br class=""><span class=""><a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" class="">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a></span><br class=""></div></blockquote></div>_______________________________________________<br class="">SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br class=""><a href="mailto:sr-users@lists.sip-router.org" class="">sr-users@lists.sip-router.org</a><br class="">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users<br class=""></div></blockquote></div><br class=""></div></body></html>