<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:Courier;
        panose-1:2 7 4 9 2 2 5 2 4 4;}
@font-face
        {font-family:MingLiU;
        panose-1:2 1 6 9 0 1 1 1 1 1;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:"\@MingLiU";
        panose-1:2 1 6 9 0 1 1 1 1 1;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}
tt
        {mso-style-priority:99;
        font-family:"Courier New";}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:Courier;}
p.msonormal0, li.msonormal0, div.msonormal0
        {mso-style-name:msonormal;
        mso-style-priority:99;
        margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
span.EmailStyle22
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
span.EmailStyle23
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body bgcolor=white lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif'>Ben is correct.  In my opinion, a very easy solution. <o:p></o:p></span></p><p class=MsoNormal><a name="_MailEndCompose"><span style='font-size:11.0pt;font-family:"Calibri",sans-serif'><o:p>&nbsp;</o:p></span></a></p><span style='mso-bookmark:_MailEndCompose'></span><div><div style='border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in'><p class=MsoNormal><b><span style='font-size:11.0pt;font-family:"Calibri",sans-serif'>From:</span></b><span style='font-size:11.0pt;font-family:"Calibri",sans-serif'> users-bounces@lists.opensips.org [mailto:users-bounces@lists.opensips.org] <b>On Behalf Of </b>Newlin, Ben<br><b>Sent:</b> Tuesday, June 21, 2016 5:24 PM<br><b>To:</b> sevpal &lt;sevpal@aol.com&gt;; OpenSIPS users mailling list &lt;users@lists.opensips.org&gt;<br><b>Subject:</b> Re: [OpenSIPS-Users] How to invok lookup() and get attr from the caller, without side effects?<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif'>It also seems like AVPOPS module [1] may be a good solution here as it has functions to pull data from a database into AVPs based by user.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif'><o:p>&nbsp;</o:p></span></p><div><div><p class=MsoNormal><span style='font-size:10.5pt;font-family:"Calibri",sans-serif;color:black'>[1] <a href="http://www.opensips.org/html/docs/modules/2.2.x/avpops.html">http://www.opensips.org/html/docs/modules/2.2.x/avpops.html</a><o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.5pt;font-family:"Calibri",sans-serif;color:black'><o:p>&nbsp;</o:p></span></p></div></div><p class=MsoNormal><span style='font-size:10.5pt;font-family:"Calibri",sans-serif;color:black'>Ben Newlin</span><span style='font-size:11.0pt;font-family:"Calibri",sans-serif'><o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif'><o:p>&nbsp;</o:p></span></p><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'><p class=MsoNormal><b><span style='font-family:"Calibri",sans-serif;color:black'>From: </span></b><span style='font-family:"Calibri",sans-serif;color:black'>&lt;<a href="mailto:users-bounces@lists.opensips.org">users-bounces@lists.opensips.org</a>&gt; on behalf of sevpal &lt;<a href="mailto:sevpal@aol.com">sevpal@aol.com</a>&gt;<br><b>Reply-To: </b>sevpal &lt;<a href="mailto:sevpal@aol.com">sevpal@aol.com</a>&gt;, OpenSIPS users mailling list &lt;<a href="mailto:users@lists.opensips.org">users@lists.opensips.org</a>&gt;<br><b>Date: </b>Tuesday, June 21, 2016 at 11:20 AM<br><b>To: </b>OpenSIPS users mailling list &lt;<a href="mailto:users@lists.opensips.org">users@lists.opensips.org</a>&gt;<br><b>Subject: </b>Re: [OpenSIPS-Users] How to invok lookup() and get attr from the caller, without side effects?<o:p></o:p></span></p></div><div><p class=MsoNormal><o:p>&nbsp;</o:p></p></div><div><div><div><div><div><p class=MsoNormal><span style='font-family:"Calibri",sans-serif;color:black'>Hi, have you tried/considered running a simple query on the database and parsing for the information you need?<o:p></o:p></span></p></div><div><div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Tahoma",sans-serif;color:black'>&nbsp;<o:p></o:p></span></p></div><div><div><p class=MsoNormal style='background:whitesmoke'><b><span style='font-size:10.0pt;font-family:"Tahoma",sans-serif;color:black'>From:</span></b><span style='font-size:10.0pt;font-family:"Tahoma",sans-serif;color:black'> <a href="mailto:pimenta@inatel.br" title="pimenta@inatel.br">Rodrigo Pimenta Carvalho</a> <o:p></o:p></span></p></div><div><p class=MsoNormal style='background:whitesmoke'><b><span style='font-size:10.0pt;font-family:"Tahoma",sans-serif;color:black'>Sent:</span></b><span style='font-size:10.0pt;font-family:"Tahoma",sans-serif;color:black'> Tuesday, June 21, 2016 10:39 AM<o:p></o:p></span></p></div><div><p class=MsoNormal style='background:whitesmoke'><b><span style='font-size:10.0pt;font-family:"Tahoma",sans-serif;color:black'>To:</span></b><span style='font-size:10.0pt;font-family:"Tahoma",sans-serif;color:black'> <a href="mailto:users@lists.opensips.org" title="users@lists.opensips.org">OpenSIPS users mailling list</a> <o:p></o:p></span></p></div><div><p class=MsoNormal style='background:whitesmoke'><b><span style='font-size:10.0pt;font-family:"Tahoma",sans-serif;color:black'>Subject:</span></b><span style='font-size:10.0pt;font-family:"Tahoma",sans-serif;color:black'> Re: [OpenSIPS-Users] How to invok lookup() and get attr from the caller, without side effects?<o:p></o:p></span></p></div></div></div><div><p class=MsoNormal><span style='font-family:"Calibri",sans-serif;color:black'>&nbsp;<o:p></o:p></span></p></div></div><div><div id=divtagdefaultwrapper><p style='background:white'><span style='font-family:"Calibri",sans-serif;color:black'>Hi </span><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:black'>Răzvan</span><span style='font-family:"Calibri",sans-serif;color:black'>.<o:p></o:p></span></p><p style='background:white'><span style='font-family:"Calibri",sans-serif;color:black'>&nbsp;<o:p></o:p></span></p><p style='background:white'><span style='font-family:"Calibri",sans-serif;color:black'>I have tried that idea. But that didn't work. The SIP INVITE message is being changed by the OpenSIPS in a wrong way, in my point of view.<o:p></o:p></span></p><p style='background:white'><span style='font-family:"Calibri",sans-serif;color:black'>Do you know some way to save the entire SIP INVITE message before calling lookup() and then make the saved message take place after the lookup() execution?<o:p></o:p></span></p><p style='background:white'><span style='font-family:"Calibri",sans-serif;color:black'>&nbsp;<o:p></o:p></span></p><p style='background:white'><span style='font-family:"Calibri",sans-serif;color:black'>My original message is:<o:p></o:p></span></p><p style='background:white'><span style='font-family:"Calibri",sans-serif;color:black'>&nbsp;<o:p></o:p></span></p><div><p class=MsoNormal style='background:white'><span style='font-family:"Calibri",sans-serif;color:#006FC9'>INVITE <a href="sip:6001@myDomain.com.br">sip:6001@myDomain.com.br</a> SIP/2.0</span><span style='font-family:"Calibri",sans-serif;color:black'><br></span><span style='font-family:"Calibri",sans-serif;color:#006FC9'>Via: SIP/2.0/TCP 192.168.21.40:5090;rport;branch=z9hG4bK876727215</span><span style='font-family:"Calibri",sans-serif;color:black'><br></span><span style='font-family:"Calibri",sans-serif;color:#006FC9'>From: &lt;<a href="sip:crdphmacl_SPnuV5xqtnSX@myDomain.com.br">sip:crdphmacl_SPnuV5xqtnSX@myDomain.com.br</a>&gt;;tag=179920819</span><span style='font-family:"Calibri",sans-serif;color:black'><br></span><span style='font-family:"Calibri",sans-serif;color:#006FC9'>To: &lt;<a href="sip:6001@myDomain.com.br">sip:6001@myDomain.com.br</a>&gt;</span><span style='font-family:"Calibri",sans-serif;color:black'><br></span><span style='font-family:"Calibri",sans-serif;color:#006FC9'>Call-ID: 1410250893</span><span style='font-family:"Calibri",sans-serif;color:black'><br></span><span style='font-family:"Calibri",sans-serif;color:#006FC9'>CSeq: 21 INVITE</span><span style='font-family:"Calibri",sans-serif;color:black'><br></span><span style='font-family:"Calibri",sans-serif;color:#006FC9'>Contact: &lt;<a href="sip:crdphmacl_SPnuV5xqtnSX@xxx.yyy.240.204:60033;transport=tcp">sip:crdphmacl_SPnuV5xqtnSX@xxx.yyy.240.204:60033;transport=tcp</a>&gt;</span><span style='font-family:"Calibri",sans-serif;color:black'><br></span><span style='font-family:"Calibri",sans-serif;color:#006FC9'>Proxy-Authorization: Digest username=&quot;crdphmacl_SPnuV5xqtnSX&quot;, realm=&quot;localhost&quot;, nonce=&quot;5769458c000001cc263a7c0d6995dc48d42288ec6f8e4048&quot;, uri=&quot;<a href="sip:6001@myDomain.com.br">sip:6001@myDomain.com.br</a>&quot;, response=&quot;0f4c122d2a0a28dea6194c235cd77430&quot;, algorithm=MD5</span><span style='font-family:"Calibri",sans-serif;color:black'><br></span><span style='font-family:"Calibri",sans-serif;color:#006FC9'>Content-Type: application/sdp</span><span style='font-family:"Calibri",sans-serif;color:black'><br></span><span style='font-family:"Calibri",sans-serif;color:#006FC9'>Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO</span><span style='font-family:"Calibri",sans-serif;color:black'><br></span><span style='font-family:"Calibri",sans-serif;color:#006FC9'>Max-Forwards: 70</span><span style='font-family:"Calibri",sans-serif;color:black'><br></span><span style='font-family:"Calibri",sans-serif;color:#006FC9'>User-Agent: Linphone/3.6.1 (eXosip2/4.0.0)</span><span style='font-family:"Calibri",sans-serif;color:black'><br></span><span style='font-family:"Calibri",sans-serif;color:#006FC9'>Subject: Phone call</span><span style='font-family:"Calibri",sans-serif;color:black'><br></span><span style='font-family:"Calibri",sans-serif;color:#006FC9'>Content-Length:&nbsp;&nbsp; 227</span><span style='font-family:"Calibri",sans-serif;color:black'><o:p></o:p></span></p></div><p class=MsoNormal style='background:white'><span style='font-family:"Calibri",sans-serif;color:black'><o:p>&nbsp;</o:p></span></p><p style='background:white'><span style='font-family:"Calibri",sans-serif;color:black'>This is being changed to:<o:p></o:p></span></p><p style='background:white'><span style='font-family:"Calibri",sans-serif;color:black'>&nbsp;<o:p></o:p></span></p><div><p class=MsoNormal style='background:white'><span style='font-family:"Calibri",sans-serif;color:#006FC9'>INVITE </span><span style='font-family:"Calibri",sans-serif;color:red'><a href="sip:crdphmacl_SPnuV5xqtnSX@131.221.240.204:60672;transport=tcp;line=c6356a7d87d6f81">sip:crdphmacl_SPnuV5xqtnSX@131.221.240.204:60672;transport=tcp;line=c6356a7d87d6f81</a> SIP/2.0</span><span style='font-family:"Calibri",sans-serif;color:black'><br></span><span style='font-family:"Calibri",sans-serif;color:#006FC9'>Record-Route: &lt;<a href="sip:myDomain.com.br;transport=tcp;lr;nat=yes;did=0b.b9e0cfe5">sip:myDomain.com.br;transport=tcp;lr;nat=yes;did=0b.b9e0cfe5</a>&gt;</span><span style='font-family:"Calibri",sans-serif;color:black'><br></span><span style='font-family:"Calibri",sans-serif;color:#006FC9'>Via: SIP/2.0/TCP myDomain.com.br:5060;branch=z9hG4bKe2db.49d54587.0;i=1</span><span style='font-family:"Calibri",sans-serif;color:black'><br></span><span style='font-family:"Calibri",sans-serif;color:#006FC9'>Via: SIP/2.0/TCP 192.168.21.40:5090;received=xxx.yyy.240.204;rport=60672;branch=z9hG4bK716249970</span><span style='font-family:"Calibri",sans-serif;color:black'><br></span><span style='font-family:"Calibri",sans-serif;color:#006FC9'>From: &lt;<a href="sip:crdphmacl_SPnuV5xqtnSX@myDomain.com.br">sip:crdphmacl_SPnuV5xqtnSX@myDomain.com.br</a>&gt;;tag=12586028</span><span style='font-family:"Calibri",sans-serif;color:black'><br></span><span style='font-family:"Calibri",sans-serif;color:#006FC9'>To: &lt;<a href="sip:6001@myDomain.com.br">sip:6001@myDomain.com.br</a>&gt;</span><span style='font-family:"Calibri",sans-serif;color:black'><br></span><span style='font-family:"Calibri",sans-serif;color:#006FC9'>Call-ID: 1106771604</span><span style='font-family:"Calibri",sans-serif;color:black'><br></span><span style='font-family:"Calibri",sans-serif;color:#006FC9'>CSeq: 21 INVITE</span><span style='font-family:"Calibri",sans-serif;color:black'><br></span><span style='font-family:"Calibri",sans-serif;color:#006FC9'>Contact: &lt;<a href="sip:crdphmacl_SPnuV5xqtnSX@xxx.yyy.240.204:60672;transport=tcp">sip:crdphmacl_SPnuV5xqtnSX@xxx.yyy.240.204:60672;transport=tcp</a>&gt;</span><span style='font-family:"Calibri",sans-serif;color:black'><br></span><span style='font-family:"Calibri",sans-serif;color:#006FC9'>Content-Type: application/sdp</span><span style='font-family:"Calibri",sans-serif;color:black'><br></span><span style='font-family:"Calibri",sans-serif;color:#006FC9'>Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO</span><span style='font-family:"Calibri",sans-serif;color:black'><br></span><span style='font-family:"Calibri",sans-serif;color:#006FC9'>Max-Forwards: 70</span><span style='font-family:"Calibri",sans-serif;color:black'><br></span><span style='font-family:"Calibri",sans-serif;color:#006FC9'>User-Agent: Linphone/3.6.1 (eXosip2/4.0.0)</span><span style='font-family:"Calibri",sans-serif;color:black'><br></span><span style='font-family:"Calibri",sans-serif;color:#006FC9'>Subject: Phone call</span><span style='font-family:"Calibri",sans-serif;color:black'><br></span><span style='font-family:"Calibri",sans-serif;color:#006FC9'>Content-Length:&nbsp;&nbsp; 224</span><span style='font-family:"Calibri",sans-serif;color:black'><o:p></o:p></span></p></div><p style='background:white'><span style='font-family:"Calibri",sans-serif;color:black'>&nbsp;<o:p></o:p></span></p><p style='background:white'><span style='font-family:"Calibri",sans-serif;color:black'>So, the caller is receiving its own SIP INVITE.<o:p></o:p></span></p><p style='background:white'><span style='font-family:"Calibri",sans-serif;color:black'>That is why when A calls B, is A that rings, not B.<o:p></o:p></span></p><p style='background:white'><span style='font-family:"Calibri",sans-serif;color:black'>&nbsp;<o:p></o:p></span></p><p style='background:white'><span style='font-family:"Calibri",sans-serif;color:black'>It is becoming a bit complicated. So, I suspect I'm going to the incorrect direction.... <o:p></o:p></span></p><p style='background:white'><span style='font-family:"Calibri",sans-serif;color:black'>&nbsp;<o:p></o:p></span></p><p style='background:white'><span style='font-family:"Calibri",sans-serif;color:black'>Best regards.<o:p></o:p></span></p><p style='background:white'><span style='font-family:"Calibri",sans-serif;color:black'>&nbsp;<o:p></o:p></span></p><div id=Signature><div name=divtagdefaultwrapper><div><div><p class=MsoNormal style='background:white'><span style='font-size:10.0pt;font-family:"Calibri",sans-serif;color:black'>RODRIGO PIMENTA CARVALHO<br>Inatel Competence Center<br>Software<br>Ph: +55 35 3471 9200 RAMAL 979<o:p></o:p></span></p></div></div></div></div><p class=MsoNormal style='margin-bottom:12.0pt;background:white'><span style='font-family:"Calibri",sans-serif;color:black'><o:p>&nbsp;</o:p></span></p><div><div class=MsoNormal align=center style='text-align:center;background:white'><span style='font-family:"Calibri",sans-serif;color:black'><hr size=2 width="98%" align=center></span></div><div id=divRplyFwdMsg><p class=MsoNormal style='background:white'><b><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:black'>De:</span></b><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:black'> <a href="mailto:users-bounces@lists.opensips.org">users-bounces@lists.opensips.org</a> &lt;<a href="mailto:users-bounces@lists.opensips.org">users-bounces@lists.opensips.org</a>&gt; em nome de Răzvan Crainea &lt;<a href="mailto:razvan@opensips.org">razvan@opensips.org</a>&gt;</span><span style='font-size:11.0pt;font-family:MingLiU;color:black'><br></span><b><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:black'>Enviado:</span></b><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:black'> terça-feira, 21 de junho de 2016 04:24</span><span style='font-size:11.0pt;font-family:MingLiU;color:black'><br></span><b><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:black'>Para:</span></b><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:black'> <a href="mailto:users@lists.opensips.org">users@lists.opensips.org</a><br><b>Assunto:</b> Re: [OpenSIPS-Users] How to invok lookup() and get attr from the caller, without side effects?</span><span style='font-family:"Calibri",sans-serif;color:black'> <o:p></o:p></span></p><div><p class=MsoNormal style='background:white'><span style='font-family:"Calibri",sans-serif;color:black'>&nbsp;<o:p></o:p></span></p></div></div><div><p style='background:white'><tt><span style='font-size:10.0pt;color:black'>Hi, Rodrigo!</span></tt><span style='font-family:"Calibri",sans-serif;color:black'><o:p></o:p></span></p><p style='background:white'><span style='font-family:"Calibri",sans-serif;color:black'><o:p>&nbsp;</o:p></span></p><p style='background:white'><tt><span style='font-size:10.0pt;color:black'>Have you tried restoring the R-URI after the caller lookup? Something like:</span></tt><span style='font-family:"Calibri",sans-serif;color:black'><o:p></o:p></span></p><p style='background:white'><span style='font-family:"Calibri",sans-serif;color:black'><o:p>&nbsp;</o:p></span></p><p style='background:white'><tt><span style='font-size:10.0pt;color:black'>$var(ru) = $ru;</span></tt><span style='font-family:"Calibri",sans-serif;color:black'><o:p></o:p></span></p><p style='background:white'><tt><span style='font-size:10.0pt;color:black'>lookup(&quot;location&quot;, &quot;&quot;, &quot;$fu&quot;); # this takes the caller from FROM uri, which I think is more suitable than from contact uri</span></tt><span style='font-family:"Calibri",sans-serif;color:black'><o:p></o:p></span></p><p style='background:white'><tt><span style='font-size:10.0pt;color:black'>$ru = $var(ru);</span></tt><span style='font-family:"Calibri",sans-serif;color:black'><o:p></o:p></span></p><p style='background:white'><tt><span style='font-size:10.0pt;color:black'># continue your processing here</span></tt><span style='font-family:"Calibri",sans-serif;color:black'><o:p></o:p></span></p><p style='background:white'><tt><span style='font-size:10.0pt;color:black'>....</span></tt><span style='font-family:"Calibri",sans-serif;color:black'><o:p></o:p></span></p><p style='background:white'><tt><span style='font-size:10.0pt;color:black'># now do the real lookup for the callee</span></tt><span style='font-family:"Calibri",sans-serif;color:black'><o:p></o:p></span></p><p style='background:white'><tt><span style='font-size:10.0pt;color:black'>lookup(&quot;location&quot;);</span></tt><span style='font-family:"Calibri",sans-serif;color:black'><o:p></o:p></span></p><p style='background:white'><span style='font-family:"Calibri",sans-serif;color:black'><o:p>&nbsp;</o:p></span></p><p style='background:white'><tt><span style='font-size:10.0pt;color:black'>Don't do the lookups in the reversed way, because you might loose some contacts.</span></tt><span style='font-family:"Calibri",sans-serif;color:black'><o:p></o:p></span></p><p style='background:white'><span style='font-family:"Calibri",sans-serif;color:black'><o:p>&nbsp;</o:p></span></p><p style='background:white'><tt><span style='font-size:10.0pt;color:black'>Best regards,</span></tt><span style='font-family:"Calibri",sans-serif;color:black'><o:p></o:p></span></p><pre style='background:white'><span style='color:black'>Răzvan Crainea<o:p></o:p></span></pre><pre style='background:white'><span style='color:black'>OpenSIPS Solutions<o:p></o:p></span></pre><pre style='background:white'><span style='color:black'><a href="http://www.opensips-solutions.com" id=LPlnk925360>www.opensips-solutions.com</a><o:p></o:p></span></pre><div style='margin-bottom:15.0pt;overflow:auto' id="LPBorder_GT_14665081476460.4076791762148423"><table class=MsoNormalTable border=1 cellspacing=0 cellpadding=0 width="90%" style='width:90.0%;background:white;border-top:dotted #C8C8C8 1.0pt;border-left:none;border-bottom:dotted #C8C8C8 1.0pt;border-right:none'><tr><td valign=top style='border:none;padding:0in 0in 0in 0in'><div id="LPTitle_14665081476440.178337023690203"><p class=MsoNormal style='margin-top:15.0pt;mso-line-height-alt:15.75pt'><span style='font-size:16.0pt;font-family:"Tahoma",sans-serif;color:#0078D7'><a href="http://www.opensips-solutions.com/" target="_blank"><span style='text-decoration:none'>Home — OpenSIPS Solutions</span></a><o:p></o:p></span></p></div><div style='margin-top:7.5pt;margin-bottom:12.0pt' id="LPMetadata_14665081476450.7986499792204279"><p class=MsoNormal style='margin-top:15.0pt;line-height:10.5pt'><span style='font-size:10.5pt;font-family:"Tahoma",sans-serif;color:#666666'><a href="http://www.opensips-solutions.com">www.opensips-solutions.com</a><o:p></o:p></span></p></div><div id="LPDescription_14665081476460.5765572521696759"><p class=MsoNormal style='margin-top:15.0pt;line-height:15.0pt'><span style='font-size:10.5pt;font-family:"Tahoma",sans-serif;color:#666666'>OpenSIPS is a mature Open Source implementation of a SIP server. OpenSIPS is more than a SIP proxy/router as it includes application-level functionalities.<o:p></o:p></span></p></div></td></tr></table></div><div><p class=MsoNormal style='background:white'><span style='font-family:"Calibri",sans-serif;color:black'>On 06/20/2016 09:02 PM, Rodrigo Pimenta Carvalho wrote:<o:p></o:p></span></p></div><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><div id=divtagdefaultwrapper><p style='background:white'><span style='font-family:"Calibri",sans-serif;color:black'>Dear OpenSIPS-users,<o:p></o:p></span></p><p style='background:white'><span style='font-family:"Calibri",sans-serif;color:black'>&nbsp;<o:p></o:p></span></p><p style='background:white'><span style='font-family:"Calibri",sans-serif;color:black'>The table location has the column attr where I use to store specific additional information for each registration.<o:p></o:p></span></p><p style='background:white'><span style='font-family:"Calibri",sans-serif;color:black'>Whenever A calls B, I have to read this specific information from the A record and from the B record. That is, I need to get and handle specific information about the caller and callee.<o:p></o:p></span></p><p style='background:white'><span style='font-family:"Calibri",sans-serif;color:black'>&nbsp;<o:p></o:p></span></p><p style='background:white'><span style='font-family:"Calibri",sans-serif;color:black'>For the callee, I use to invoke the lookup(&quot;location&quot;) function that put the needed information in the attr_avp. That is good and works very well. Then, I just have to read the attr_avp to get such specific information.<o:p></o:p></span></p><p style='background:white'><span style='font-family:"Calibri",sans-serif;color:black'>&nbsp;<o:p></o:p></span></p><p style='background:white'><span style='font-family:"Calibri",sans-serif;color:black'>For the caller, I use to invoke:<o:p></o:p></span></p><p style='background:white'><span style='font-family:"Calibri",sans-serif;color:black'>&nbsp;<o:p></o:p></span></p><p style='background:white'><span style='font-family:"Calibri",sans-serif;color:#006FC9'>$var(aorChamador) = $(ct.fields(uri));</span><span style='font-family:"Calibri",sans-serif;color:black'><o:p></o:p></span></p><p style='background:white'><span style='font-family:"Calibri",sans-serif;color:#006FC9'>lookup(&quot;location&quot;,&quot;&quot;,&quot;$var(aorChamador)&quot;);</span><span style='font-family:"Calibri",sans-serif;color:black'><o:p></o:p></span></p><p style='background:white'><span style='font-family:"Calibri",sans-serif;color:black'>&nbsp;<o:p></o:p></span></p><p style='background:white'><span style='font-family:"Calibri",sans-serif;color:black'>However it causes amazing side effect in the SIP signaling. Ex: When A calls B, B stays quiet and A rings. So A can answer A. Crazy!<o:p></o:p></span></p><p style='background:white'><span style='font-family:"Calibri",sans-serif;color:black'>According to the documentation, lookup will overwritten the Request-URI. I guess that is why the SIP signaling become incoherent.<o:p></o:p></span></p><p style='background:white'><span style='font-family:"Calibri",sans-serif;color:black'><o:p>&nbsp;</o:p></span></p><p style='background:white'><span style='font-family:"Calibri",sans-serif;color:black'>How could I get the caller attr specific information without side effects?<o:p></o:p></span></p><p style='background:white'><span style='font-family:"Calibri",sans-serif;color:black'><o:p>&nbsp;</o:p></span></p><p style='background:white'><span style='font-family:"Calibri",sans-serif;color:black'>Any hint will be very helpful!!<o:p></o:p></span></p><p style='background:white'><span style='font-family:"Calibri",sans-serif;color:black'><o:p>&nbsp;</o:p></span></p><p style='background:white'><span style='font-family:"Calibri",sans-serif;color:black'>Best regards.<o:p></o:p></span></p><p style='background:white'><span style='font-family:"Calibri",sans-serif;color:black'>&nbsp;<o:p></o:p></span></p><div id=Signature><div name=divtagdefaultwrapper><div><div><p class=MsoNormal style='background:white'><span style='font-size:10.0pt;font-family:"Calibri",sans-serif;color:black'>RODRIGO PIMENTA CARVALHO<br>Inatel Competence Center<br>Software<br>Ph: +55 35 3471 9200 RAMAL 979<o:p></o:p></span></p></div></div></div></div></div><p class=MsoNormal style='margin-bottom:12.0pt;background:white'><span style='font-family:"Calibri",sans-serif;color:black'><o:p>&nbsp;</o:p></span></p><pre style='background:white'><span style='color:black'>_______________________________________________<o:p></o:p></span></pre><pre style='background:white'><span style='color:black'>Users mailing list<o:p></o:p></span></pre><pre style='background:white'><span style='color:black'><a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><o:p></o:p></span></pre><pre style='background:white'><span style='color:black'><a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><o:p></o:p></span></pre></blockquote><p class=MsoNormal style='background:white'><span style='font-family:"Calibri",sans-serif;color:black'><o:p>&nbsp;</o:p></span></p></div></div></div><div class=MsoNormal align=center style='text-align:center'><span style='font-family:"Calibri",sans-serif;color:black'><hr size=2 width="100%" align=center></span></div><p class=MsoNormal><span style='font-family:"Calibri",sans-serif;color:black'>_______________________________________________<br>Users mailing list<br><a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><br><a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><o:p></o:p></span></p></div></div></div></div></div></div></body></html>