<div>This is an example of scenario where i want to add diversion header if the user is busy, no answer, etc..</div><div><?xml version="1.0" encoding="UTF-8"?></div><div><!DOCTYPE cpl SYSTEM "/home/xxx/opensips-1.5.0-notls/modules/cpl-c/cpl-06.dtd"></div>
<div><cpl></div><div> <subaction id="voicemail" ></div><div> <location url="tel:+336xxxxxxxxxx" /></div><div> </subaction></div><div> <incoming ></div><div> <location url="tel:+336xxxxxxxxxxx"></div>
<div> <proxy ></div><div> <busy ></div><div> <sub ref="voicemail" /></div><div> </busy></div><div> <noanswer ></div><div> <sub ref="voicemail" /></div>
<div> </noanswer></div><div> <redirection ></div><div> <sub ref="voicemail" /></div><div> </redirection></div><div> <failure ></div><div> <sub ref="voicemail" /></div>
<div> </failure></div><div> <default ></div><div> <sub ref="voicemail" /></div><div> </default></div><div> </proxy></div><div><span class="Apple-tab-span" style="white-space:pre">        </span> </location></div>
<div> </incoming></div><div></cpl></div><div><br></div><div>I would like to add diversion header if there is theses differents code </div><table class="MsoNormalTable" border="1" cellspacing="0" cellpadding="0" style="margin-left:.4pt;border-collapse:collapse;mso-table-layout-alt:fixed;
border:none;mso-border-alt:solid windowtext 1.0pt;mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
mso-border-insideh:.75pt solid windowtext;mso-border-insidev:.75pt solid windowtext">
<tbody><tr style="mso-yfti-irow:0;mso-yfti-firstrow:yes">
<td width="223" valign="top" style="width:167.0pt;border:solid windowtext 1.0pt;
mso-border-alt:solid windowtext 1.0pt;mso-border-bottom-alt:solid windowtext .75pt;
padding:0cm 5.4pt 0cm 5.4pt">
<p class="TableText"><span lang="EN-US">301</span></p>
</td>
</tr>
<tr style="mso-yfti-irow:1">
<td width="223" valign="top" style="width:167.0pt;border:solid windowtext 1.0pt;
border-top:none;mso-border-top-alt:solid windowtext .75pt;mso-border-top-alt:
.75pt;mso-border-left-alt:1.0pt;mso-border-bottom-alt:.75pt;mso-border-right-alt:
1.0pt;mso-border-color-alt:windowtext;mso-border-style-alt:solid;padding:
0cm 5.4pt 0cm 5.4pt">
<p class="TableText"><span lang="EN-US">302</span></p>
</td>
</tr>
<tr style="mso-yfti-irow:2">
<td width="223" valign="top" style="width:167.0pt;border:solid windowtext 1.0pt;
border-top:none;mso-border-top-alt:solid windowtext .75pt;mso-border-top-alt:
.75pt;mso-border-left-alt:1.0pt;mso-border-bottom-alt:.75pt;mso-border-right-alt:
1.0pt;mso-border-color-alt:windowtext;mso-border-style-alt:solid;padding:
0cm 5.4pt 0cm 5.4pt">
<p class="TableText"><span lang="EN-US">408</span></p>
</td>
</tr>
<tr style="mso-yfti-irow:3">
<td width="223" valign="top" style="width:167.0pt;border:solid windowtext 1.0pt;
border-top:none;mso-border-top-alt:solid windowtext .75pt;mso-border-top-alt:
.75pt;mso-border-left-alt:1.0pt;mso-border-bottom-alt:.75pt;mso-border-right-alt:
1.0pt;mso-border-color-alt:windowtext;mso-border-style-alt:solid;padding:
0cm 5.4pt 0cm 5.4pt">
<p class="TableText"><span lang="EN-US">480</span></p>
</td>
</tr>
<tr style="mso-yfti-irow:4">
<td width="223" valign="top" style="width:167.0pt;border:solid windowtext 1.0pt;
border-top:none;mso-border-top-alt:solid windowtext .75pt;mso-border-top-alt:
.75pt;mso-border-left-alt:1.0pt;mso-border-bottom-alt:.75pt;mso-border-right-alt:
1.0pt;mso-border-color-alt:windowtext;mso-border-style-alt:solid;padding:
0cm 5.4pt 0cm 5.4pt">
<p class="TableText"><span lang="EN-US">486</span></p>
</td>
</tr>
<tr style="mso-yfti-irow:5">
<td width="223" valign="top" style="width:167.0pt;border:solid windowtext 1.0pt;
border-top:none;mso-border-top-alt:solid windowtext .75pt;mso-border-top-alt:
.75pt;mso-border-left-alt:1.0pt;mso-border-bottom-alt:.75pt;mso-border-right-alt:
1.0pt;mso-border-color-alt:windowtext;mso-border-style-alt:solid;padding:
0cm 5.4pt 0cm 5.4pt">
<p class="TableText"><span lang="EN-US">487</span></p>
</td>
</tr>
<tr style="mso-yfti-irow:6">
<td width="223" valign="top" style="width:167.0pt;border:solid windowtext 1.0pt;
border-top:none;mso-border-top-alt:solid windowtext .75pt;mso-border-top-alt:
.75pt;mso-border-left-alt:1.0pt;mso-border-bottom-alt:.75pt;mso-border-right-alt:
1.0pt;mso-border-color-alt:windowtext;mso-border-style-alt:solid;padding:
0cm 5.4pt 0cm 5.4pt">
<p class="TableText"><span lang="EN-US">600</span></p>
</td>
</tr>
<tr style="mso-yfti-irow:7;mso-yfti-lastrow:yes">
<td width="223" valign="top" style="width:167.0pt;border:solid windowtext 1.0pt;
border-top:none;mso-border-top-alt:solid windowtext .75pt;padding:0cm 5.4pt 0cm 5.4pt">
<p class="TableText"><span lang="EN-US">603</span></p>
</td>
</tr></tbody></table><br><div>The probleme is t if i had a treatment in failure route </div><div><div><br></div><div>if (t_check_status("408")) {</div><div> xlog("------------------------------- Erreur 408 -------------------------------");</div>
<div> $ru="tel:+336xxxxxxxxxxx";</div><div> add_diversion("no-answer");</div><div> # do not set the missed call flag again</div><div> t_relay();</div>
<div> }</div></div><div>the Server sends the message two times (in the cpl file and in the config file) and i found one message with the great header and one without</div><div><br></div><div><br></div><div>Regards,</div>
<div><br></div><div><br></div><div>Mehdi BOUDOU</div>