[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openser-users
Subject:    Re: [SR-Users] SIPURI sending private IP address
From:       Cibin Paul <paul_cibin () me ! com>
Date:       2014-12-28 16:58:11
Message-ID: 7FB8A668-D56D-45E7-9A5B-EB4A3B68C6A8 () me ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Thanks a lot Luis. It worked like a charm. 

Regards
Cibin




> On 28-Dec-2014, at 9:50 am, Cibin Paul <paul_cibin@me.com> wrote:
> 
> Thanks Luis. I will check today and inform you. 
> 
> Regards
> Cibin
> 
> On 28-Dec-2014, at 9:06 am, Luis Jimenez <ljjimenez@gmail.com \
> <mailto:ljjimenez@gmail.com>> wrote: 
> > You can send the info you need to Asterisk using X headers, for example:
> > 
> > Kamailio has the pseudo variable $si which contains the public IP originating the \
> > request and you can send that to Asterisk using append_hf. 
> > append_hf("X-orig-IP: $si");
> > 
> > 
> > In Asterisk you can access the headers as ${SIP_HEADER(X-orig-IP)}
> > 
> > 
> > On Sat, Dec 27, 2014 at 7:00 PM, Cibin Paul <paul_cibin@me.com \
> > <mailto:paul_cibin@me.com>> wrote: 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. 
> > 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 
> > > On 27-Dec-2014, at 3:26 pm, Daniel-Constantin Mierla <miconda@gmail.com \
> > > <mailto:miconda@gmail.com>> wrote: 
> > > Hello,
> > > 
> > > I am not that familiar with asterisk to know all the insides SIPURI and
> > > SIPCHANNEL(recvip), you have to explain which fields you need from the
> > > SIP packet in order to be able to assist further, unless someone else
> > > more familiar with asterisk can jump in.
> > > 
> > > Also, it is not clear how the flow is there, you say you have kamailio
> > > behind asterisk servers, does that mean the phone is sending to asterisk
> > > first, which then forwards to kamailio?
> > > 
> > > Cheers,
> > > Daniel
> > > 
> > > > On 26/12/14 18:37, Cibin Paul wrote:
> > > > Hi,
> > > > 
> > > > 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. 
> > > > Regards
> > > > Cibin
> > > > 
> > > > 
> > > > _______________________________________________
> > > > SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> > > > sr-users@lists.sip-router.org <mailto:sr-users@lists.sip-router.org>
> > > > http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users \
> > > > <http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users>
> > > 
> > > --
> > > Daniel-Constantin Mierla
> > > http://twitter.com/#!/miconda <http://twitter.com/#!/miconda> - \
> > > http://www.linkedin.com/in/miconda <http://www.linkedin.com/in/miconda> 
> > > 
> > > _______________________________________________
> > > SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> > > sr-users@lists.sip-router.org <mailto:sr-users@lists.sip-router.org>
> > > http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users \
> > > <http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users>
> > 
> > _______________________________________________
> > SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> > sr-users@lists.sip-router.org <mailto:sr-users@lists.sip-router.org>
> > http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users \
> > <http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users> 
> > _______________________________________________
> > SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> > sr-users@lists.sip-router.org <mailto:sr-users@lists.sip-router.org>
> > http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users \
> > <http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users>
> _______________________________________________
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users@lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


[Attachment #5 (unknown)]

<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.&nbsp;<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 &lt;<a href="mailto:paul_cibin@me.com" \
class="">paul_cibin@me.com</a>&gt; 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.&nbsp;</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 &lt;<a \
href="mailto:ljjimenez@gmail.com" class="">ljjimenez@gmail.com</a>&gt; 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>&nbsp; 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="">&lt;<a href="mailto:paul_cibin@me.com" \
target="_blank" class="">paul_cibin@me.com</a>&gt;</span> wrote:<br \
class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px \
#ccc solid;padding-left:1ex">Hey,&nbsp; 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=""> &gt; On 27-Dec-2014, at 3:26 pm, \
Daniel-Constantin Mierla &lt;<a href="mailto:miconda@gmail.com" \
class="">miconda@gmail.com</a>&gt; wrote:<br class=""> &gt;<br class="">
&gt; Hello,<br class="">
&gt;<br class="">
&gt; I am not that familiar with asterisk to know all the insides SIPURI and<br \
class=""> &gt; SIPCHANNEL(recvip), you have to explain which fields you need from \
the<br class=""> &gt; SIP packet in order to be able to assist further, unless \
someone else<br class=""> &gt; more familiar with asterisk can jump in.<br class="">
&gt;<br class="">
&gt; Also, it is not clear how the flow is there, you say you have kamailio<br \
class=""> &gt; behind asterisk servers, does that mean the phone is sending to \
asterisk<br class=""> &gt; first, which then forwards to kamailio?<br class="">
&gt;<br class="">
&gt; Cheers,<br class="">
&gt; Daniel<br class="">
&gt;<br class="">
&gt;&gt; On 26/12/14 18:37, Cibin Paul wrote:<br class="">
&gt;&gt; Hi,<br class="">
&gt;&gt;<br class="">
&gt;&gt; I have a kamailio 4.1 as a gateway&nbsp; 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=""> &gt;&gt;<br class="">
&gt;&gt; Regards<br class="">
&gt;&gt; Cibin<br class="">
&gt;&gt;<br class="">
&gt;&gt;<br class="">
&gt;&gt; _______________________________________________<br class="">
&gt;&gt; SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br \
class=""> &gt;&gt; <a href="mailto:sr-users@lists.sip-router.org" \
class="">sr-users@lists.sip-router.org</a><br class=""> &gt;&gt; <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=""> &gt;<br class="">
&gt; --<br class="">
&gt; Daniel-Constantin Mierla<br class="">
&gt; <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=""> &gt;<br class="">
&gt;<br class="">
&gt; _______________________________________________<br class="">
&gt; SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br \
class=""> &gt; <a href="mailto:sr-users@lists.sip-router.org" \
class="">sr-users@lists.sip-router.org</a><br class=""> &gt; <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>



_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic