voici mon dialplan
c'est celui là qui est appellé : TestMenuOriginate
voici le cas.. je lance la commande action : Originate
Code:
OriginateAction originateAction;
ManagerResponse originateResponse;
originateAction = new OriginateAction();
originateAction.setChannel("SIP/1001");
//originateAction.setContext("default");
originateAction.setContext("TestMenuOriginate");
originateAction.setExten("1001");
originateAction.setPriority(new Integer(1));
originateAction.setTimeout(new Integer(30000));
// connect to Asterisk and log in
managerConnection.login();
// send the originate action and wait for a maximum of 30 seconds for Asterisk
// to send a reply
originateResponse = managerConnection.sendAction(originateAction, 30000);
Code:
[TestMenu]
exten => start,1,Answer()
same => n,Background(main-menu)
same => n,WaitExten(5)
exten => 1,1,Playback(digits/1) ; si appuye sur 1
same => n,Log(NOTICE, Menu selectionne est : ${EXTEN})
same => n,SayAlpha(${EXTEN})
same => n,Set(HOTDESK_UPDATE_STATUS(1001)=${EXTEN})
exten => 2,1,Playback(digits/2) ; si appuye sur 2
same => n,Log(NOTICE, Menu selectionne est : ${EXTEN})
same => n,SayAlpha(${EXTEN})
exten => 3,1,Playback(digits/3) ; si appuye sur 3
same => n,Log(NOTICE, Menu selectionne est : ${EXTEN})
same => n,SayAlpha(${EXTEN})
exten => i,1,Playback(pbx-invalid) ; invalid
same => n,Goto(TestMenu,start,1)
exten => t,1,Playback(vm-goodbye) ; timeout
same => n,Hangup()
[TestMenuOriginate]
;Contexte pour les appels entrants : TestMenuOriginate
exten => s,1,Log(NOTICE, Incoming call from ${CALLERID(all)})
exten => s,n,Goto(TestMenu,start,1) ; syntaxe : Goto(context,extension,priority)
exten => s,n,Hangup()
Voici le scénario.
je lance l'appel via le Originate. La personne recoit un appel, mais elle ne répond pas.. elle racroche directement. Comme si je m'appelle sur mon cellulaire.. je peux faire : Répondre, ou refusé.
Quand je faisais refusé.. le ne voyait jamais dans mes logs la 1ere ligne du dialplan : exten => s,1,Log(NOTICE, Incoming call from ${CALLERID(all)})
seulement si je répondais.