[OpenSIPS-Users] Cpl and diversion header

mehdi boudou mehdi.boudou at gmail.com
Mon Jun 21 19:33:37 CEST 2010


This is an example of scenario where i want to add diversion header if the
user is busy, no answer, etc..
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE cpl SYSTEM
"/home/xxx/opensips-1.5.0-notls/modules/cpl-c/cpl-06.dtd">
<cpl>
  <subaction id="voicemail" >
    <location url="tel:+336xxxxxxxxxx" />
  </subaction>
  <incoming >
  <location url="tel:+336xxxxxxxxxxx">
      <proxy >
        <busy >
          <sub ref="voicemail" />
        </busy>
        <noanswer >
          <sub ref="voicemail" />
        </noanswer>
        <redirection >
          <sub ref="voicemail" />
        </redirection>
        <failure >
          <sub ref="voicemail" />
        </failure>
        <default >
          <sub ref="voicemail" />
        </default>
      </proxy>
  </location>
 </incoming>
</cpl>

I would like to add diversion header if there is theses differents code

301

302

408

480

486

487

600

603

The probleme is t if i had a treatment in failure route

if (t_check_status("408")) {
                xlog("------------------------------- Erreur 408
-------------------------------");
                $ru="tel:+336xxxxxxxxxxx";
                add_diversion("no-answer");
                # do not set the missed call flag again
                t_relay();
        }
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


Regards,


Mehdi BOUDOU
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.opensips.org/pipermail/users/attachments/20100621/de42f4a5/attachment.htm 


More information about the Users mailing list