asmodaisda
04/02/2014, 17h57
Bonjour,
Je tourne en rond avec GotoIfTime et iftime. Je sollicite donc votre aide :)
http://www.voip-info.org/wiki/view/Asterisk+func+iftime
http://www.voip-info.org/wiki/view/Asterisk+cmd+GotoIfTime
Je souhaite faire en sorte que lorsque l'appel est compris dans la plage horaire 8h20-18h10 du lundi au vendredi celui-ci suive le context semaine. Si la plage horaire n'est pas respecté celui-ci suive le context autre.
J'ai essayé avec exten => s,n,(context) mais cela ne marche pas :
NOTICE[3593]: pbx.c:4530 pbx_extension_helper: No such label 'semaine' in extension '123' in context 'pbx_config'
[Feb 4 16:34:19]
WARNING[3593]: pbx.c:10836 pbx_parseable_goto: Priority 'semaine' must be a number > 0, or valid label
exten => 123,1,Answer()
exten => 123,2,Set(HEURE=${IFTIME(08:20-18:10,mon-fri,*,*?FERME:OUVERT)})
exten => 123,3,GotoIf($[${HEURE}=OUVERT]?semaine:samedi)
exten => s,n,(semaine),Dial(SIP/111)
exten => s,n,(samedi)Playback(accueil-standard0)
J'ai donc alors essayé avec les contexts mais pas mieux:
NOTICE[2829]: chan_sip.c:22753 handle_request_invite: Call from '100' (192.168.1.212:5060) to extension '123' rejected because extension not found in context 'pbx_config'.
[semaine]
exten => 124,1,Answer()
exten => 124,2,Dial(SIP/111,10,tr)
exten => 124,3,VoiceMail(6000)
exten => 124,4,playBack(vm-goodbye)
exten => 124,5,HangUp()
[samedi]
exten => 125,1,Answer()
exten => 125,2,Playback(accueil-standard0)
Je tourne en rond car je ne je ne voix pas comment mettre dans le contexte [pbx_config] les contextes semaine et samedi.
J'ai mis dans le sip.conf
[125]
type=friend
host=dynamic
username=125
secret=test
context=samedi
[124]
type=friend
host=dynamic
username=124
secret=test
context=semaine
La commande dialplan show default donne :
NOTICE[2829]: chan_sip.c:22753 handle_request_invite: Call from '100' (192.168.1.212:5060) to extension '123' rejected because extension not found in context 'pbx_config'.
telephonie*CLI> dialplan show default
[ Context 'default' created by 'pbx_lua' ]
Alt. Switch => 'Lua/' [pbx_lua]
-= 0 extensions (0 priorities) in 1 context. =-
La commande dialplan show donne :
[ Context 'parkedcalls' created by 'features' ]
'700' => 1. Park() [features]
[ Context 'app_dial_gosub_virtual_context' created by 'app_dial' ]
's' => 1. NoOp() [app_dial]
[ Context 'app_queue_gosub_virtual_context' created by 'app_queue' ]
's' => 1. NoOp() [app_queue]
[ Context 'local' created by 'pbx_lua' ]
Alt. Switch => 'Lua/' [pbx_lua]
[ Context 'demo' created by 'pbx_lua' ]
Alt. Switch => 'Lua/' [pbx_lua]
[ Context 'default' created by 'pbx_lua' ]
Alt. Switch => 'Lua/' [pbx_lua]
[ Context 'standard' created by 'pbx_config' ]
'123' => 1. Answer() [pbx_config]
2. Set(HEURE=${IFTIME(08:20-14:10,mon-fri,*,*?FERME:OUVERT)} ) [pbx_config]
3. GotoIf($[${HEURE}=OUVERT]?semaine:samedi) [pbx_config]
's' => 4. (semaine),Dial(SIP/111) [pbx_config]
5. (samedi)Playback(accueil-standard0) [pbx_config]
[ Context 'samedi' created by 'pbx_config' ]
'125' => 1. Answer() [pbx_config]
2. Playback(accueil-standard0) [pbx_config]
[ Context 'semaine' created by 'pbx_config' ]
'124' => 1. Answer() [pbx_config]
2. Dial(SIP/111,10,tr) [pbx_config]
3. VoiceMail(6000) [pbx_config]
4. playBack(vm-goodbye) [pbx_config]
5. HangUp() [pbx_config]
[ Context 'pbx_config' created by 'pbx_config' ]
'111' => 1. Dial(SIP/111,10,tr) [pbx_config]
2. VoiceMail(6000) [pbx_config]
3. playBack(vm-goodbye) [pbx_config]
4. HangUp() [pbx_config]
'222' => 1. Dial(SIP/222,10,tr) [pbx_config]
2. VoiceMail(6000) [pbx_config]
3. playBack(vm-goodbye) [pbx_config]
4. HangUp() [pbx_config]
'333' => 1. agi(googletts.agi,"hi i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i A ",fr) [pbx_config]
3. playBack(vm-goodbye) [pbx_config]
4. HangUp() [pbx_config]
'334' => 1. Answer() [pbx_config]
2. Playback(accueil-standard0) [pbx_config]
3. Dial(SIP/111,20,tr) [pbx_config]
4. VoiceMail(6000) [pbx_config]
5. playBack(vm-goodbye) [pbx_config]
6. HangUp() [pbx_config]
'444' => 1. GoToIfTime(08:50-18:10|mon-fri|*|*?333,1) [pbx_config]
'601' => 1. Playback(dictate/record&vm-then-pound) [pbx_config]
2. Record(en/accueil-standard%d.gsm) [pbx_config]
3. Playback(beep) [pbx_config]
4. Playback(${RECORDED_FILE}) [pbx_config]
5. Hangup() [pbx_config]
[ Context 'open' created by 'pbx_config' ]
-= 13 extensions (38 priorities) in 11 contexts. =-
Par avance merci pour votre aide :-D
Je tourne en rond avec GotoIfTime et iftime. Je sollicite donc votre aide :)
http://www.voip-info.org/wiki/view/Asterisk+func+iftime
http://www.voip-info.org/wiki/view/Asterisk+cmd+GotoIfTime
Je souhaite faire en sorte que lorsque l'appel est compris dans la plage horaire 8h20-18h10 du lundi au vendredi celui-ci suive le context semaine. Si la plage horaire n'est pas respecté celui-ci suive le context autre.
J'ai essayé avec exten => s,n,(context) mais cela ne marche pas :
NOTICE[3593]: pbx.c:4530 pbx_extension_helper: No such label 'semaine' in extension '123' in context 'pbx_config'
[Feb 4 16:34:19]
WARNING[3593]: pbx.c:10836 pbx_parseable_goto: Priority 'semaine' must be a number > 0, or valid label
exten => 123,1,Answer()
exten => 123,2,Set(HEURE=${IFTIME(08:20-18:10,mon-fri,*,*?FERME:OUVERT)})
exten => 123,3,GotoIf($[${HEURE}=OUVERT]?semaine:samedi)
exten => s,n,(semaine),Dial(SIP/111)
exten => s,n,(samedi)Playback(accueil-standard0)
J'ai donc alors essayé avec les contexts mais pas mieux:
NOTICE[2829]: chan_sip.c:22753 handle_request_invite: Call from '100' (192.168.1.212:5060) to extension '123' rejected because extension not found in context 'pbx_config'.
[semaine]
exten => 124,1,Answer()
exten => 124,2,Dial(SIP/111,10,tr)
exten => 124,3,VoiceMail(6000)
exten => 124,4,playBack(vm-goodbye)
exten => 124,5,HangUp()
[samedi]
exten => 125,1,Answer()
exten => 125,2,Playback(accueil-standard0)
Je tourne en rond car je ne je ne voix pas comment mettre dans le contexte [pbx_config] les contextes semaine et samedi.
J'ai mis dans le sip.conf
[125]
type=friend
host=dynamic
username=125
secret=test
context=samedi
[124]
type=friend
host=dynamic
username=124
secret=test
context=semaine
La commande dialplan show default donne :
NOTICE[2829]: chan_sip.c:22753 handle_request_invite: Call from '100' (192.168.1.212:5060) to extension '123' rejected because extension not found in context 'pbx_config'.
telephonie*CLI> dialplan show default
[ Context 'default' created by 'pbx_lua' ]
Alt. Switch => 'Lua/' [pbx_lua]
-= 0 extensions (0 priorities) in 1 context. =-
La commande dialplan show donne :
[ Context 'parkedcalls' created by 'features' ]
'700' => 1. Park() [features]
[ Context 'app_dial_gosub_virtual_context' created by 'app_dial' ]
's' => 1. NoOp() [app_dial]
[ Context 'app_queue_gosub_virtual_context' created by 'app_queue' ]
's' => 1. NoOp() [app_queue]
[ Context 'local' created by 'pbx_lua' ]
Alt. Switch => 'Lua/' [pbx_lua]
[ Context 'demo' created by 'pbx_lua' ]
Alt. Switch => 'Lua/' [pbx_lua]
[ Context 'default' created by 'pbx_lua' ]
Alt. Switch => 'Lua/' [pbx_lua]
[ Context 'standard' created by 'pbx_config' ]
'123' => 1. Answer() [pbx_config]
2. Set(HEURE=${IFTIME(08:20-14:10,mon-fri,*,*?FERME:OUVERT)} ) [pbx_config]
3. GotoIf($[${HEURE}=OUVERT]?semaine:samedi) [pbx_config]
's' => 4. (semaine),Dial(SIP/111) [pbx_config]
5. (samedi)Playback(accueil-standard0) [pbx_config]
[ Context 'samedi' created by 'pbx_config' ]
'125' => 1. Answer() [pbx_config]
2. Playback(accueil-standard0) [pbx_config]
[ Context 'semaine' created by 'pbx_config' ]
'124' => 1. Answer() [pbx_config]
2. Dial(SIP/111,10,tr) [pbx_config]
3. VoiceMail(6000) [pbx_config]
4. playBack(vm-goodbye) [pbx_config]
5. HangUp() [pbx_config]
[ Context 'pbx_config' created by 'pbx_config' ]
'111' => 1. Dial(SIP/111,10,tr) [pbx_config]
2. VoiceMail(6000) [pbx_config]
3. playBack(vm-goodbye) [pbx_config]
4. HangUp() [pbx_config]
'222' => 1. Dial(SIP/222,10,tr) [pbx_config]
2. VoiceMail(6000) [pbx_config]
3. playBack(vm-goodbye) [pbx_config]
4. HangUp() [pbx_config]
'333' => 1. agi(googletts.agi,"hi i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i A ",fr) [pbx_config]
3. playBack(vm-goodbye) [pbx_config]
4. HangUp() [pbx_config]
'334' => 1. Answer() [pbx_config]
2. Playback(accueil-standard0) [pbx_config]
3. Dial(SIP/111,20,tr) [pbx_config]
4. VoiceMail(6000) [pbx_config]
5. playBack(vm-goodbye) [pbx_config]
6. HangUp() [pbx_config]
'444' => 1. GoToIfTime(08:50-18:10|mon-fri|*|*?333,1) [pbx_config]
'601' => 1. Playback(dictate/record&vm-then-pound) [pbx_config]
2. Record(en/accueil-standard%d.gsm) [pbx_config]
3. Playback(beep) [pbx_config]
4. Playback(${RECORDED_FILE}) [pbx_config]
5. Hangup() [pbx_config]
[ Context 'open' created by 'pbx_config' ]
-= 13 extensions (38 priorities) in 11 contexts. =-
Par avance merci pour votre aide :-D