<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi Mauro,<div><br><div><div><span class="Apple-tab-span" style="white-space:pre">        </span>afaik local_route is meant to be used only with OpenSIPS self generated requests (like CANCEL to forking branches) not with WeSIP. That is the reason why we implemented the SPIRAL_HDR feature. When you activate SPIRAL_HDR the messages generated by WeSIP will "enter" again in OpenSIPS thus you can catch them in the route function (not local_route). In order to identify them look for the X-WeSIP-SPIRAL header and then modify the message and relay it with t_realy. Code would look something like this<br></div><div><br></div><div>route{</div><div><br></div><div> if(is_present_hf("X-WeSIP-SPIRAL")){ </div><div> /* modify your message here as required */</div><div> t_relay(); </div><div> }else{ </div><div> as_relay_t("app_server_one");</div><div> } </div><div>}<span class="Apple-tab-span" style="white-space:pre">        </span><br></div><div><br></div><div>Regards</div><div><br></div><div>Ginés</div><br class="Apple-interchange-newline"><blockquote type="cite"><div lang="IT" link="blue" vlink="blue" style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div class="Section1"><div><div style="margin-right: 0cm; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; margin-top: 0cm; margin-bottom: 0.0001pt; "><font size="2" color="navy" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy; ">Hola Gines,<o:p></o:p></span></font></div><div style="margin-right: 0cm; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; margin-top: 0cm; margin-bottom: 0.0001pt; "><font size="2" color="navy" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy; "><o:p> </o:p></span></font></div><div style="margin-right: 0cm; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; margin-top: 0cm; margin-bottom: 0.0001pt; "><font size="2" color="navy" face="Arial"><span lang="EN-GB" style="font-size: 10pt; font-family: Arial; color: navy; ">I’m in a test environment and the domain that I use for every user is resolved with the production SIP server IP…(I haven’t a DNS domain name associated to my test openser), obviously the production SIP server responde to every request with a 403 Forbidden message.<o:p></o:p></span></font></div><div style="margin-right: 0cm; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; margin-top: 0cm; margin-bottom: 0.0001pt; "><font size="2" color="navy" face="Arial"><span lang="EN-GB" style="font-size: 10pt; font-family: Arial; color: navy; "><o:p> </o:p></span></font></div><div style="margin-right: 0cm; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; margin-top: 0cm; margin-bottom: 0.0001pt; "><font size="2" color="navy" face="Arial"><span lang="EN-GB" style="font-size: 10pt; font-family: Arial; color: navy; ">I don’t know if this is the problem but with the wesip SPITAL_HDR set to true, I see only the messages that start in the local_route function.<o:p></o:p></span></font></div><div style="margin-right: 0cm; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; margin-top: 0cm; margin-bottom: 0.0001pt; "><font size="2" color="navy" face="Arial"><span lang="EN-GB" style="font-size: 10pt; font-family: Arial; color: navy; "><o:p> </o:p></span></font></div><div style="margin-right: 0cm; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; margin-top: 0cm; margin-bottom: 0.0001pt; "><font size="2" color="navy" face="Arial"><span lang="EN-GB" style="font-size: 10pt; font-family: Arial; color: navy; ">To avoid this problem, I’m trying to manipulate the message in the local_route function without good result<span class="Apple-converted-space"> </span></span></font><font size="2" color="navy" face="Wingdings"><span lang="EN-GB" style="font-size: 10pt; font-family: Wingdings; color: navy; ">L</span></font><font size="2" color="navy" face="Arial"><span lang="EN-GB" style="font-size: 10pt; font-family: Arial; color: navy; ">…<o:p></o:p></span></font></div><div style="margin-right: 0cm; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; margin-top: 0cm; margin-bottom: 0.0001pt; "><font size="2" color="navy" face="Arial"><span lang="EN-GB" style="font-size: 10pt; font-family: Arial; color: navy; "><o:p> </o:p></span></font></div><div style="margin-right: 0cm; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; margin-top: 0cm; margin-bottom: 0.0001pt; "><font size="2" color="navy" face="Arial"><span lang="EN-GB" style="font-size: 10pt; font-family: Arial; color: navy; ">Is there another way to do this??<o:p></o:p></span></font></div><div style="margin-right: 0cm; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; margin-top: 0cm; margin-bottom: 0.0001pt; "><font size="2" color="navy" face="Arial"><span lang="EN-GB" style="font-size: 10pt; font-family: Arial; color: navy; "><o:p> </o:p></span></font></div><div style="margin-right: 0cm; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; margin-top: 0cm; margin-bottom: 0.0001pt; "><font size="2" color="navy" face="Arial"><span lang="EN-GB" style="font-size: 10pt; font-family: Arial; color: navy; ">Regards<o:p></o:p></span></font></div><div style="margin-right: 0cm; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; margin-top: 0cm; margin-bottom: 0.0001pt; "><font size="2" color="navy" face="Arial"><span lang="EN-GB" style="font-size: 10pt; font-family: Arial; color: navy; "> MD<o:p></o:p></span></font></div><div style="margin-right: 0cm; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; margin-top: 0cm; margin-bottom: 0.0001pt; "><font size="3" face="Times New Roman"><span lang="EN-GB" style="font-size: 12pt; "><o:p> </o:p></span></font></div></div><div><div class="MsoNormal" align="center" style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; text-align: center; "><font size="3" face="Times New Roman"><span style="font-size: 12pt; "><hr size="2" width="100%" align="center" tabindex="-1"></span></font></div><div style="margin-right: 0cm; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; margin-top: 0cm; margin-bottom: 0.0001pt; "><b><font size="2" face="Tahoma"><span style="font-size: 10pt; font-family: Tahoma; font-weight: bold; ">Da:</span></font></b><font size="2" face="Tahoma"><span style="font-size: 10pt; font-family: Tahoma; "><span class="Apple-converted-space"> </span>Ginés Gómez [<a href="mailto:gines@voztele.com" style="color: blue; text-decoration: underline; ">mailto:gines@voztele.com</a>]<span class="Apple-converted-space"> </span><br><b><span style="font-weight: bold; ">Inviato:</span></b><span class="Apple-converted-space"> </span>venerdě 20 marzo 2009 12:46<br><b><span style="font-weight: bold; ">A:</span></b><span class="Apple-converted-space"> </span>Mauro Davi’<br><b><span style="font-weight: bold; ">Cc:</span></b><span class="Apple-converted-space"> </span><a href="mailto:users@lists.opensips.org" style="color: blue; text-decoration: underline; ">users@lists.opensips.org</a><br><b><span style="font-weight: bold; ">Oggetto:</span></b><span class="Apple-converted-space"> </span>Re: [OpenSIPS-Users] Wesip and Opensips</span></font><o:p></o:p></div></div><div style="margin-right: 0cm; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; margin-top: 0cm; margin-bottom: 0.0001pt; "><font size="3" face="Times New Roman"><span style="font-size: 12pt; "><o:p> </o:p></span></font></div><div style="margin-right: 0cm; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; margin-top: 0cm; margin-bottom: 0.0001pt; "><font size="3" face="Times New Roman"><span style="font-size: 12pt; ">Ciao Mauro,<o:p></o:p></span></font></div><div><div style="margin-right: 0cm; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; margin-top: 0cm; margin-bottom: 0.0001pt; "><font size="3" face="Times New Roman"><span style="font-size: 12pt; "><o:p> </o:p></span></font></div></div><div><div style="margin-right: 0cm; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; margin-top: 0cm; margin-bottom: 0.0001pt; "><span class="apple-tab-span"><font size="3" face="Times New Roman"><span style="font-size: 12pt; "> <span class="Apple-converted-space"> </span></span></font></span>first, you can manipulate messages from WeSIP itselft before you send them out. Once they are sent out you can manipulate them in OpenSIPs script if you configure WeSIP to work in spiral mode. When working in spiral mode outgoing messages from WeSIP loop through OpenSIPs script in a new transaction before leaving. You can recognize them, and work accordingly if you look for the particular a header that is added by WeSIP. The header is X-WeSIP-SPIRAL<o:p></o:p></div></div><div><div style="margin-right: 0cm; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; margin-top: 0cm; margin-bottom: 0.0001pt; "><font size="3" face="Times New Roman"><span style="font-size: 12pt; "><o:p> </o:p></span></font></div></div><div><div style="margin-right: 0cm; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; margin-top: 0cm; margin-bottom: 0.0001pt; "><font size="3" face="Times New Roman"><span style="font-size: 12pt; ">NON-SPIRAL-MODE (Default)<o:p></o:p></span></font></div></div><div><div style="margin-right: 0cm; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; margin-top: 0cm; margin-bottom: 0.0001pt; "><font size="3" face="Times New Roman"><span style="font-size: 12pt; "><o:p> </o:p></span></font></div></div><div><div style="margin-right: 0cm; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; margin-top: 0cm; margin-bottom: 0.0001pt; "><font size="3" face="Times New Roman"><span style="font-size: 12pt; ">Origin [OpenSIPS WeSIP] Destination<o:p></o:p></span></font></div></div><div><div style="margin-right: 0cm; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; margin-top: 0cm; margin-bottom: 0.0001pt; "><font size="3" face="Times New Roman"><span style="font-size: 12pt; "> | ----t1----->| ----------->|------t2-----> <o:p></o:p></span></font></div></div><div><div style="margin-right: 0cm; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; margin-top: 0cm; margin-bottom: 0.0001pt; "><font size="3" face="Times New Roman"><span style="font-size: 12pt; "> <span class="apple-tab-span"> <span class="Apple-converted-space"> </span></span>Internal<o:p></o:p></span></font></div></div><div><div style="margin-right: 0cm; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; margin-top: 0cm; margin-bottom: 0.0001pt; "><span class="apple-tab-span"><font size="3" face="Times New Roman"><span style="font-size: 12pt; "> <span class="Apple-converted-space"> </span></span></font></span> Delivery<o:p></o:p></div></div><div><div style="margin-right: 0cm; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; margin-top: 0cm; margin-bottom: 0.0001pt; "><span class="apple-tab-span"><font size="3" face="Times New Roman"><span style="font-size: 12pt; "> </span></font></span><o:p></o:p></div></div><div><div style="margin-right: 0cm; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; margin-top: 0cm; margin-bottom: 0.0001pt; "><font size="3" face="Times New Roman"><span style="font-size: 12pt; "><o:p> </o:p></span></font></div></div><div><div style="margin-right: 0cm; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; margin-top: 0cm; margin-bottom: 0.0001pt; "><font size="3" face="Times New Roman"><span style="font-size: 12pt; ">SPIRAL-MODE<o:p></o:p></span></font></div></div><div><div style="margin-right: 0cm; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; margin-top: 0cm; margin-bottom: 0.0001pt; "><font size="3" face="Times New Roman"><span style="font-size: 12pt; "><o:p> </o:p></span></font></div></div><div><div style="margin-right: 0cm; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; margin-top: 0cm; margin-bottom: 0.0001pt; "><font size="3" face="Times New Roman"><span style="font-size: 12pt; ">Origin<span class="apple-tab-span"> <span class="Apple-converted-space"> </span></span>[OpenSIPS WeSIP] OpenSIPS Destination<o:p></o:p></span></font></div></div><div><div style="margin-right: 0cm; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; margin-top: 0cm; margin-bottom: 0.0001pt; "><font size="3" face="Times New Roman"><span style="font-size: 12pt; "> | ----t1-----> | ----------->|-----------t2------->| ----t3---> | <o:p></o:p></span></font></div></div><div><div style="margin-right: 0cm; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; margin-top: 0cm; margin-bottom: 0.0001pt; "><font size="3" face="Times New Roman"><span style="font-size: 12pt; "> <span class="apple-tab-span"> <span class="Apple-converted-space"> </span></span> Internal X-WeSIP-Spiral <o:p></o:p></span></font></div></div><div><div style="margin-right: 0cm; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; margin-top: 0cm; margin-bottom: 0.0001pt; "><span class="apple-tab-span"><font size="3" face="Times New Roman"><span style="font-size: 12pt; "> <span class="Apple-converted-space"> </span></span></font></span> Delivery <o:p></o:p></div></div><div><div style="margin-right: 0cm; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; margin-top: 0cm; margin-bottom: 0.0001pt; "><span class="apple-tab-span"><font size="3" face="Times New Roman"><span style="font-size: 12pt; "> </span></font></span><o:p></o:p></div></div><div><div style="margin-right: 0cm; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; margin-top: 0cm; margin-bottom: 0.0001pt; "><font size="3" face="Times New Roman"><span style="font-size: 12pt; ">More on this kind of configuration at <a href="http://www.wesip.com/mediawiki/index.php/Configuration#com.voztele.javax.sip.SPIRAL_HDR" style="color: blue; text-decoration: underline; ">http://www.wesip.com/mediawiki/index.php/Configuration#com.voztele.javax.sip.SPIRAL_HDR</a><o:p></o:p></span></font></div></div><div><div style="margin-right: 0cm; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; margin-top: 0cm; margin-bottom: 0.0001pt; "><font size="3" face="Times New Roman"><span style="font-size: 12pt; "><o:p> </o:p></span></font></div></div><div><div style="margin-right: 0cm; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; margin-top: 0cm; margin-bottom: 0.0001pt; "><font size="3" face="Times New Roman"><span style="font-size: 12pt; ">Hope that helps<o:p></o:p></span></font></div></div><div><div style="margin-right: 0cm; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; margin-top: 0cm; margin-bottom: 0.0001pt; "><font size="3" face="Times New Roman"><span style="font-size: 12pt; "><o:p> </o:p></span></font></div></div><div><div style="margin-right: 0cm; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; margin-top: 0cm; margin-bottom: 0.0001pt; "><font size="3" face="Times New Roman"><span style="font-size: 12pt; ">Regards<o:p></o:p></span></font></div></div><div><div style="margin-right: 0cm; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; margin-top: 0cm; margin-bottom: 0.0001pt; "><font size="3" face="Times New Roman"><span style="font-size: 12pt; "><o:p> </o:p></span></font></div></div><div><div style="margin-right: 0cm; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; margin-top: 0cm; margin-bottom: 0.0001pt; "><font size="3" face="Times New Roman"><span style="font-size: 12pt; ">Ginés<o:p></o:p></span></font></div></div><div><div style="margin-right: 0cm; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; margin-top: 0cm; margin-bottom: 0.0001pt; "><font size="3" face="Times New Roman"><span style="font-size: 12pt; "><o:p> </o:p></span></font></div></div><div><div style="margin-right: 0cm; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; margin-top: 0cm; margin-bottom: 0.0001pt; "><font size="3" face="Times New Roman"><span style="font-size: 12pt; "><o:p> </o:p></span></font></div></div><div><div><div style="margin-right: 0cm; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; margin-top: 0cm; margin-bottom: 0.0001pt; "><font size="3" face="Times New Roman"><span style="font-size: 12pt; "><br><br><o:p></o:p></span></font></div><div link="blue" vlink="purple"><div><div><div style="margin-right: 0cm; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; margin-top: 0cm; margin-bottom: 0.0001pt; "><font size="2" face="Arial"><span lang="EN-GB" style="font-size: 10pt; font-family: Arial; ">Hi All,<u1:p></u1:p></span></font><o:p></o:p></div></div><div><div style="margin-right: 0cm; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; margin-top: 0cm; margin-bottom: 0.0001pt; "><font size="2" face="Arial"><span lang="EN-GB" style="font-size: 10pt; font-family: Arial; "><u1:p> </u1:p></span></font><o:p></o:p></div></div><div><div style="margin-right: 0cm; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; margin-top: 0cm; margin-bottom: 0.0001pt; "><font size="2" face="Arial"><span lang="EN-GB" style="font-size: 10pt; font-family: Arial; ">I’m setting up the Click2Dial wesip application, and I’m trying to use it.<u1:p></u1:p></span></font><o:p></o:p></div></div><div><div style="margin-right: 0cm; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; margin-top: 0cm; margin-bottom: 0.0001pt; "><font size="2" face="Arial"><span lang="EN-GB" style="font-size: 10pt; font-family: Arial; "><u1:p> </u1:p></span></font><o:p></o:p></div></div><div><div style="margin-right: 0cm; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; margin-top: 0cm; margin-bottom: 0.0001pt; "><font size="2" face="Arial"><span lang="EN-GB" style="font-size: 10pt; font-family: Arial; ">When I start the call in the opensips script I need to manipulate it.<u1:p></u1:p></span></font><o:p></o:p></div></div><div><div style="margin-right: 0cm; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; margin-top: 0cm; margin-bottom: 0.0001pt; "><font size="2" face="Arial"><span lang="EN-GB" style="font-size: 10pt; font-family: Arial; "><u1:p> </u1:p></span></font><o:p></o:p></div></div><div><div style="margin-right: 0cm; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; margin-top: 0cm; margin-bottom: 0.0001pt; "><font size="2" face="Arial"><span lang="EN-GB" style="font-size: 10pt; font-family: Arial; ">So in the local_route branch I try to see if the To party is an alias but I can’t use alias_db_lookup function in the local_route branch…<u1:p></u1:p></span></font><o:p></o:p></div></div><div><div style="margin-right: 0cm; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; margin-top: 0cm; margin-bottom: 0.0001pt; "><font size="2" face="Arial"><span lang="EN-GB" style="font-size: 10pt; font-family: Arial; "><u1:p> </u1:p></span></font><o:p></o:p></div></div><div><div style="margin-right: 0cm; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; margin-top: 0cm; margin-bottom: 0.0001pt; "><font size="2" face="Arial"><span lang="EN-GB" style="font-size: 10pt; font-family: Arial; ">Is this correct? How I can manipulate the messages generated by wesip ?<u1:p></u1:p></span></font><o:p></o:p></div></div><div><div style="margin-right: 0cm; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; margin-top: 0cm; margin-bottom: 0.0001pt; "><font size="2" face="Arial"><span lang="EN-GB" style="font-size: 10pt; font-family: Arial; "><u1:p> </u1:p></span></font><o:p></o:p></div></div><div><div style="margin-right: 0cm; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; margin-top: 0cm; margin-bottom: 0.0001pt; "><font size="2" face="Arial"><span lang="EN-GB" style="font-size: 10pt; font-family: Arial; ">Thanks in advance<u1:p></u1:p></span></font><o:p></o:p></div></div><div><div style="margin-right: 0cm; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; margin-top: 0cm; margin-bottom: 0.0001pt; "><font size="2" face="Arial"><span lang="EN-GB" style="font-size: 10pt; font-family: Arial; "> MD<u1:p></u1:p></span></font><o:p></o:p></div></div></div><div style="margin-right: 0cm; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; margin-top: 0cm; margin-bottom: 0.0001pt; "><font size="3" face="Times New Roman"><span style="font-size: 12pt; ">_______________________________________________<br>Users mailing list<br><a href="mailto:Users@lists.opensips.org" style="color: blue; text-decoration: underline; ">Users@lists.opensips.org</a><br><a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" style="color: blue; text-decoration: underline; ">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><o:p></o:p></span></font></div></div></div><div style="margin-right: 0cm; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; margin-top: 0cm; margin-bottom: 0.0001pt; "><font size="3" face="Times New Roman"><span style="font-size: 12pt; "><o:p> </o:p></span></font></div></div></div>_______________________________________________<br>Users mailing list<br><a href="mailto:Users@lists.opensips.org" style="color: blue; text-decoration: underline; ">Users@lists.opensips.org</a><br><a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" style="color: blue; text-decoration: underline; ">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br></div></blockquote></div><br></div></body></html>