Code:
exten => 9999,1,Answer()
exten => 9999,n,Dial(SIP/4053&SIP/4056&SIP/4063&SIP/4057,20,m(partie1))
exten => 9999,n,GotoIf($["${DIALSTATUS}" = "CHANUNAVAIL"]?lbl_localsets_1:)
exten => 9999,n,GotoIf($["${DIALSTATUS}" = "NOANSWER"]?lbl_localsets_1:)
exten => 9999,n,GotoIf($["${DIALSTATUS}" = "BUSY"]?lbl_localsets_1:)
exten => 9999,n(lbl_localsets_0),Hangup()
exten => 9999,n(lbl_localsets_1),Dial(SIP/4053&SIP/4054&SIP/4056&SIP/4058&SIP/4059&SIP/4060&SIP/4061&SIP/4065&SIP/4071&SIP/4073&SIP/4063&SIP/4057&SIP/4075,20,m(partie2))
exten => 9999,n,GotoIf($["${DIALSTATUS}" = "CHANUNAVAIL"]?lbl_localsets_2:)
exten => 9999,n,GotoIf($["${DIALSTATUS}" = "NOANSWER"]?lbl_localsets_2:)
exten => 9999,n,GotoIf($["${DIALSTATUS}" = "BUSY"]?lbl_localsets_2:)
exten => 9999,n,Goto(lbl_localsets_0)
exten => 9999,n(lbl_localsets_2),Dial(SIP/4055&SIP/4074&SIP/4072&SIP/4053&SIP/4056&SIP/4063&SIP/4057,20,m(partie3))
exten => 9999,n,GotoIf($["${DIALSTATUS}" = "CHANUNAVAIL"]?lbl_localsets_3:)
exten => 9999,n,GotoIf($["${DIALSTATUS}" = "NOANSWER"]?lbl_localsets_3:)
exten => 9999,n,GotoIf($["${DIALSTATUS}" = "BUSY"]?lbl_localsets_3:)
exten => 9999,n,Goto(lbl_localsets_0)
exten => 9999,n(lbl_localsets_3),Dial(SIP/forfait-openip/45621001) ;On appelle vers un autre numéro, sans musique d'attente
exten => 9999,n,GotoIf($["${DIALSTATUS}" = "CHANUNAVAIL"]?lbl_localsets_0:)
exten => 9999,n,GotoIf($["${DIALSTATUS}" = "NOANSWER"]?lbl_localsets_0:)
exten => 9999,n,GotoIf($["${DIALSTATUS}" = "BUSY"]?lbl_localsets_0:)
exten => 9999,n,Goto(lbl_localsets_0)