PDA

Voir la version complète : renvoi d'appel inconditionnel sur asterisk 1.8



whitewater
21/06/2013, 16h41
Bonjour à tous,
Je cherche à mettre en place un renvoi d'appel sur un asterisk 1.8.

J'ai vu le sujet sur voip-info callforwarding, celui de ce topic
http://www.asterisk-france.org/archives_net/showthread.php?t=6392&page=2

mais çà ne fonctionne pas.

Par exemple, je met dans mon extensions.conf, parti default :

exten => _*50*X.,1,NoCDR
exten => _*50*X.,n,Set(CID=${CALLERID(num)})
exten => _*50*X.,n,Set(DB(CFWD/${CID})=${EXTEN:4})
exten => _*50*X.,n,Wait(2)
exten => _*50*X.,n,Playback(call-forward)
exten => _*50*X.,n,Playback(activated)
exten => _*50*X.,n,HangUp()

exten => #50#,1,NoCDR
exten => #50#,n,DBdel(CFWD/${CALLERID(num)})
exten => #50#,n,Wait(2)
exten => #50#,n,Playback(call-forward)
exten => #50#,n,Playback(de-activated)
exten => #50#,n,HangUp()


Je compose *50*<num. pour le renvoi>

le cli d'asterisk me semble bon :

-- Executing [*50*0123456789@DLPN_DialPlan1:1] NoCDR("SIP/301-00000031", "") in new stack
-- Executing [*50*0123456789@DLPN_DialPlan1:2] Set("SIP/301-00000031", "CID=301") in new stack
-- Executing [*50*0123456789@DLPN_DialPlan1:3] Set("SIP/301-00000031", "DB(CFWD/301)=0123456789") in new stack
-- Executing [*50*0123456789@DLPN_DialPlan1:4] Wait("SIP/301-00000031", "2") in new stack
-- Executing [*50*0123456789@DLPN_DialPlan1:5] Playback("SIP/301-00000031", "call-forward") in new stack
-- <SIP/301-00000031> Playing 'call-forward.slin' (language 'fr')
-- Executing [*50*0123456789@DLPN_DialPlan1:6] Playback("SIP/301-00000031", "activated") in new stack
-- <SIP/301-00000031> Playing 'activated.slin' (language 'fr')
-- Executing [*50*0123456789@DLPN_DialPlan1:7] Hangup("SIP/301-00000031", "") in new stack
== Spawn extension (DLPN_DialPlan1, *50*0123456789, 7) exited non-zero on 'SIP/301-00000031'


(rien de plus avec un debug à 100)

Le 301 sonne quand je l'appelle. Pas de renvoi :(

J'ai essayé avec CF, CFIM à la place de CFWD. Idem :(

Une idée ?
Merci

doo
01/07/2013, 16h01
Salut,

Peux-tu nous poster l'extrait de ton dialplan pour l'appel du poste 301 ?

whitewater
01/07/2013, 17h34
Salut doo,
Chose que je n'ai pas précisé au début, j'ai configuré mon asterisk avec asterisk GUI.
Les options "Dial Options" du menu "Call Features" sont toutes activées.

Je ne sais pas si les rubriques suivantes sont suffisantes :

[default]
exten => #50#,1,NoCDR()
exten => #50#,2,DBdel(CFWD/${CALLERID(num)})
exten => #50#,3,Wait(2)
exten => #50#,4,Playback(call-forward)
exten => #50#,5,Playback(de-activated)
exten => #50#,6,HangUp()

exten => *99,1,VoiceMailMain(${CALLERID(num)}@default,s)

exten => 301,hint,SIP/301
exten => 301,1,Macro(stdexten,301,${HINT})

[stdexten]
exten => a,1,VoicemailMain(${mbx})
exten => a,2,Return()

exten => stdexten-BUSY,1,Voicemail(${mbx},b)
exten => stdexten-BUSY,2,Return()

exten => stdexten-NOANSWER,1,Voicemail(${mbx},u)
exten => stdexten-NOANSWER,2,Return()

exten => _stde[x]te[n]-.,1,Goto(stdexten-NOANSWER,1)

exten => _X.,50000(stdexten),NoOp(Start stdexten)
exten => _X.,50001,Set(LOCAL(ext)=${EXTEN})
exten => _X.,50002,Set(LOCAL(dev)=${ARG1})
exten => _X.,50003,Set(LOCAL(cntx)=${ARG2})
exten => _X.,50004,Set(LOCAL(mbx)=${ext}${IF($[!${ISNULL(${cntx})}]?@${cntx})})
exten => _X.,50005,Dial(${dev},20)
exten => _X.,50006,Goto(stdexten-${DIALSTATUS},1)


[DLPN_DialPlan1]
include = CallingRule_externe
include = CallingRule_externe4chiffres
include = default
include = parkedcalls
include = conferences
include = ringgroups
include = voicemenus
include = queues
include = voicemailgroups
include = directory
include = pagegroups
include = page_an_extension

merci.

whitewater
08/07/2013, 08h55
J'ai essayé d'utiliser la partie d'Elastix du fichier extensions.conf pour cela.

J'ai ajouté sous [default] de mon fichier extensions.conf :

exten => *72,1,NoCDR()
exten => *72,n,Answer
exten => *72,n,Wait(1)
exten => *72,n,Macro(user-callerid,)
exten => *72,n,Playback(call-fwd-unconditional)
exten => *72,n,Playback(please-enter-your&extension)
exten => *72,n,Read(fromext,then-press-pound,,,,)
exten => *72,n,Set(fromext=${IF($["foo${fromext}"="foo"]?${AMPUSER}:${fromext})})
exten => *72,n,Wait(1)
exten => *72,n(startread),Playback(ent-target-attendant)
exten => *72,n,Read(toext,then-press-pound,,,,)
exten => *72,n,GotoIf($["foo${toext}"="foo"]?startread)
exten => *72,n,Wait(1)
exten => *72,n,Set(DB(CFIM/${fromext})=${toext})
exten => *72,n,Set(STATE=BUSY)
exten => *72,n,Gosub(app-cf-on,sstate,1)
exten => *72,n(hook_1),Playback(call-fwd-unconditional&for&extension)
exten => *72,n,SayDigits(${fromext})
exten => *72,n,Playback(is-set-to)
exten => *72,n,SayDigits(${toext})
exten => *72,n,Macro(hangupcall,)
exten => _*72.,1,NoCDR()
exten => _*72.,n,Answer
exten => _*72.,n,Wait(1)
exten => _*72.,n,Macro(user-callerid,)
exten => _*72.,n,Set(fromext=${AMPUSER})
exten => _*72.,n,Set(toext=${EXTEN:3})
exten => _*72.,n,Set(DB(CFIM/${fromext})=${toext})
exten => _*72.,n,Set(STATE=BUSY)
exten => _*72.,n,Gosub(app-cf-on,sstate,1)
exten => _*72.,n(hook_2),Playback(call-fwd-unconditional&for&extension)
exten => _*72.,n,SayDigits(${fromext})
exten => _*72.,n,Playback(is-set-to)
exten => _*72.,n,SayDigits(${toext})
exten => _*72.,n,Macro(hangupcall,)


Si je tape 0*720123456789 pour programmer mon renvoi, voila la CLI :

-- Executing [*720123456789@DLPN_DialPlan1:1] NoCDR("SIP/301-000000dc", "") in new stack
-- Executing [*720123456789@DLPN_DialPlan1:2] Answer("SIP/301-000000dc", "") in new stack
-- Executing [*720123456789@DLPN_DialPlan1:3] Wait("SIP/301-000000dc", "1") in new stack
-- Executing [*720123456789@DLPN_DialPlan1:4] Macro("SIP/301-000000dc", "user-callerid,") in new stack
[Jul 8 08:52:21] WARNING[18937]: app_macro.c:309 _macro_exec: No such context 'macro-user-callerid' for macro 'user-callerid'
-- Executing [*720123456789@DLPN_DialPlan1:5] Set("SIP/301-000000dc", "fromext=") in new stack
-- Executing [*720123456789@DLPN_DialPlan1:6] Set("SIP/301-000000dc", "toext=0123456789") in new stack
-- Executing [*720123456789@DLPN_DialPlan1:7] Set("SIP/301-000000dc", "DB(CFIM/)=0123456789") in new stack
-- Executing [*720123456789@DLPN_DialPlan1:8] Set("SIP/301-000000dc", "STATE=BUSY") in new stack
-- Executing [*720123456789@DLPN_DialPlan1:9] Gosub("SIP/301-000000dc", "app-cf-on,sstate,1") in new stack
[Jul 8 08:52:21] ERROR[18937]: app_stack.c:420 gosub_exec: Attempt to reach a non-existent destination for gosub: (Context:app-cf-on, Extension:sstate, Priority:1)
== Spawn extension (DLPN_DialPlan1, *720123456789, 10) exited non-zero on 'SIP/301-000000dc'


avec un joli Error. Une idée ? Merci :)

Edit:
Je viens de comprendre qu'il cherche un context app-cf-on qu'il n'a pas bien sûr... :petrus75:

whitewater
25/07/2013, 14h21
Aller tant pis.
Je passe à Xivo.