[OpenSIPS-Users] Cpl and diversion header
Bogdan-Andrei Iancu
bogdan at voice-system.ro
Tue Jun 22 10:37:43 CEST 2010
Hi Mehdi,
Unfortunately CPL does not implement the diversion hdr. Right now I see
no easy way to make it work (like manually add the hdr) as CPL
interpreter is completly encapsulated and you cannot interact with it -
only changing the code.
Regards,
Bogdan
mehdi boudou wrote:
> 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
> ------------------------------------------------------------------------
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
--
Bogdan-Andrei Iancu
OpenSIPS Bootcamp
20 - 24 September 2010, Frankfurt, Germany
www.voice-system.ro
More information about the Users
mailing list