Bonjour à tous,
J'aurai besoin d'un petit coup de main. J'essai de rajouter un 0 aux appels entrants dans FreePBX. La problématique initial est que tout les numéros arrivant sur mes deux T0 sont dépourvus de 0 (d'ailleurs, si quelqu'un connait un peu dahdi et pourrait savoir pourquoi je n'arrive pas à avoir le 0...).
Bref, je veux le remettre (notamment pour l'annuaire personnelle des utilisateurs et pour le rappel automatique).
J'ai essayé ce bout de dialplan dans extensions_custom.conf, mais sans résultat:
[from-pstn-custom]
exten => _XXXXXXXXX,1,Set(CALLERID(num)=0${CALLERID(num)})
exten => _XXXXXXXXX,n,Goto(from-pstn,${EXTEN},1)
Malheureusement, ce fichier ne me semble pas lu du tout...
Si quelqu'un avait un élément de réponses, je le remercie d'avance :)
HS: pour ceux qui ont suivis, j'ai un autre sujet sur lequel je poste régulièrement des questions en tout genre, mais vu le sujet, pense qu'un nouveau poste sera utile pour d'autre.
malheureusent non,
cette fonction ajoute un "mot" au CallerID<name>.
Par exemple, tu as dans ton annuaire quelqu'un qui s'appel "Accueil" au 110, si tu appels avec ce téléphone un autre de l'entreprise, tu auras "Accueil" et en dessous "110". En ajoutant un callerID, tu auras "PREFIXAccueil" en dessous "110".
J'aimerai ajouter un 0 au CallerID<number> moi, c'est un peu différent.
1) Voici la CLI d'un appel sur le 03 (donc arrivé sur la carte de digium, gérée par dahdi):
-- Accepting call from '664XXXXXX' to '3933' on channel 0/1, span 2
-- Executing [3933@from-pstn:1] Set("DAHDI/4-1", "__FROM_DID=3933") in new stack
-- Executing [3933@from-pstn:2] Set("DAHDI/4-1", "CHANNEL(language)=fr") in new stack
-- Executing [3933@from-pstn:3] Gosub("DAHDI/4-1", "cidlookup,cidlookup_1,1") in new stack
-- Executing [cidlookup_1@cidlookup:1] ExecIf("DAHDI/4-1", "1?Set(CALLERID(name)=MONNOM)") in new stack
-- Executing [cidlookup_1@cidlookup:2] Return("DAHDI/4-1", "") in new stack
-- Executing [3933@from-pstn:4] Gosub("DAHDI/4-1", "app-blacklist-check,s,1") in new stack
-- Executing [s@app-blacklist-check:1] GotoIf("DAHDI/4-1", "0?blacklisted") in new stack
-- Executing [s@app-blacklist-check:2] Set("DAHDI/4-1", "CALLED_BLACKLIST=1") in new stack
-- Executing [s@app-blacklist-check:3] Return("DAHDI/4-1", "") in new stack
-- Executing [3933@from-pstn:5] ExecIf("DAHDI/4-1", "0 ?Set(CALLERID(name)=664XXXXXXXX)") in new stack
-- Executing [3933@from-pstn:6] Set("DAHDI/4-1", "__CALLINGPRES_SV=allowed") in new stack
-- Executing [3933@from-pstn:7] Set("DAHDI/4-1", "CALLERPRES()=allowed_not_screened") in new stack
-- Executing [3933@from-pstn:8] Goto("DAHDI/4-1", "from-did-direct,103,1") in new stack
-- Goto (from-did-direct,103,1)
-- Executing [103@from-did-direct:1] Macro("DAHDI/4-1", "exten-vm,novm,103") in new stack
-- Executing [s@macro-exten-vm:1] Macro("DAHDI/4-1", "user-callerid,") in new stack
-- Executing [s@macro-user-callerid:1] Set("DAHDI/4-1", "AMPUSER=664XXXXXX") in new stack
-- Executing [s@macro-user-callerid:2] GotoIf("DAHDI/4-1", "0?report") in new stack
-- Executing [s@macro-user-callerid:3] ExecIf("DAHDI/4-1", "1?Set(REALCALLERIDNUM=664XXXXXX)") in new stack
-- Executing [s@macro-user-callerid:4] Set("DAHDI/4-1", "AMPUSER=") in new stack
-- Executing [s@macro-user-callerid:5] Set("DAHDI/4-1", "AMPUSERCIDNAME=") in new stack
-- Executing [s@macro-user-callerid:6] GotoIf("DAHDI/4-1", "1?report") in new stack
-- Goto (macro-user-callerid,s,10)
-- Executing [s@macro-user-callerid:10] GotoIf("DAHDI/4-1", "0?continue") in new stack
-- Executing [s@macro-user-callerid:11] Set("DAHDI/4-1", "__TTL=64") in new stack
-- Executing [s@macro-user-callerid:12] GotoIf("DAHDI/4-1", "1?continue") in new stack
-- Goto (macro-user-callerid,s,19)
-- Executing [s@macro-user-callerid:19] NoOp("DAHDI/4-1", "Using CallerID "MONOM" <664XXXXXX>") in new stack
-- Executing [s@macro-exten-vm:2] Set("DAHDI/4-1", "RingGroupMethod=none") in new stack
-- Executing [s@macro-exten-vm:3] Set("DAHDI/4-1", "VMBOX=novm") in new stack
-- Executing [s@macro-exten-vm:4] Set("DAHDI/4-1", "__EXTTOCALL=103") in new stack
-- Executing [s@macro-exten-vm:5] Set("DAHDI/4-1", "CFUEXT=") in new stack
-- Executing [s@macro-exten-vm:6] Set("DAHDI/4-1", "CFBEXT=") in new stack
-- Executing [s@macro-exten-vm:7] Set("DAHDI/4-1", "RT=""") in new stack
-- Executing [s@macro-exten-vm:8] Macro("DAHDI/4-1", "record-enable,103,IN") in new stack
-- Executing [s@macro-record-enable:1] GotoIf("DAHDI/4-1", "1?check") in new stack
-- Goto (macro-record-enable,s,4)
-- Executing [s@macro-record-enable:4] ExecIf("DAHDI/4-1", "0?MacroExit()") in new stack
-- Executing [s@macro-record-enable:5] GotoIf("DAHDI/4-1", "0?Group:OUT") in new stack
-- Goto (macro-record-enable,s,15)
-- Executing [s@macro-record-enable:15] GotoIf("DAHDI/4-1", "1?IN") in new stack
-- Goto (macro-record-enable,s,20)
-- Executing [s@macro-record-enable:20] ExecIf("DAHDI/4-1", "1?MacroExit()") in new stack
-- Executing [s@macro-exten-vm:9] Macro("DAHDI/4-1", "dial-one,"",tr,103") in new stack
-- Executing [s@macro-dial-one:1] Set("DAHDI/4-1", "DEXTEN=103") in new stack
-- Executing [s@macro-dial-one:2] Set("DAHDI/4-1", "DIALSTATUS_CW=") in new stack
-- Executing [s@macro-dial-one:3] GosubIf("DAHDI/4-1", "0?screen,1") in new stack
-- Executing [s@macro-dial-one:4] GosubIf("DAHDI/4-1", "0?cf,1") in new stack
-- Executing [s@macro-dial-one:5] GotoIf("DAHDI/4-1", "1?skip1") in new stack
-- Goto (macro-dial-one,s,8)
-- Executing [s@macro-dial-one:8] GotoIf("DAHDI/4-1", "0?nodial") in new stack
-- Executing [s@macro-dial-one:9] GotoIf("DAHDI/4-1", "0?continue") in new stack
-- Executing [s@macro-dial-one:10] Set("DAHDI/4-1", "EXTHASCW=ENABLED") in new stack
-- Executing [s@macro-dial-one:11] GotoIf("DAHDI/4-1", "0?next1:cwinusebusy") in new stack
-- Goto (macro-dial-one,s,23)
-- Executing [s@macro-dial-one:23] GotoIf("DAHDI/4-1", "1?next3:continue") in new stack
-- Goto (macro-dial-one,s,24)
-- Executing [s@macro-dial-one:24] ExecIf("DAHDI/4-1", "0?Set(DIALSTATUS_CW=BUSY)") in new stack
-- Executing [s@macro-dial-one:25] GotoIf("DAHDI/4-1", "0?nodial") in new stack
-- Executing [s@macro-dial-one:26] GosubIf("DAHDI/4-1", "1?dstring,1:dlocal,1") in new stack
-- Executing [dstring@macro-dial-one:1] Set("DAHDI/4-1", "DSTRING=") in new stack
-- Executing [dstring@macro-dial-one:2] Set("DAHDI/4-1", "DEVICES=103") in new stack
-- Executing [dstring@macro-dial-one:3] ExecIf("DAHDI/4-1", "0?Return()") in new stack
-- Executing [dstring@macro-dial-one:4] ExecIf("DAHDI/4-1", "0?Set(DEVICES=03)") in new stack
-- Executing [dstring@macro-dial-one:5] Set("DAHDI/4-1", "LOOPCNT=1") in new stack
-- Executing [dstring@macro-dial-one:6] Set("DAHDI/4-1", "ITER=1") in new stack
-- Executing [dstring@macro-dial-one:7] Set("DAHDI/4-1", "THISDIAL=SIP/103") in new stack
-- Executing [dstring@macro-dial-one:8] GosubIf("DAHDI/4-1", "1?zap2dahdi,1") in new stack
-- Executing [zap2dahdi@macro-dial-one:1] ExecIf("DAHDI/4-1", "0?Return()") in new stack
-- Executing [zap2dahdi@macro-dial-one:2] Set("DAHDI/4-1", "NEWDIAL=") in new stack
-- Executing [zap2dahdi@macro-dial-one:3] Set("DAHDI/4-1", "LOOPCNT2=1") in new stack
-- Executing [zap2dahdi@macro-dial-one:4] Set("DAHDI/4-1", "ITER2=1") in new stack
-- Executing [zap2dahdi@macro-dial-one:5] Set("DAHDI/4-1", "THISPART2=SIP/103") in new stack
-- Executing [zap2dahdi@macro-dial-one:6] ExecIf("DAHDI/4-1", "0?Set(THISPART2=DAHDI/103)") in new stack
-- Executing [zap2dahdi@macro-dial-one:7] Set("DAHDI/4-1", "NEWDIAL=SIP/103&") in new stack
-- Executing [zap2dahdi@macro-dial-one:8] Set("DAHDI/4-1", "ITER2=2") in new stack
-- Executing [zap2dahdi@macro-dial-one:9] GotoIf("DAHDI/4-1", "0?begin2") in new stack
-- Executing [zap2dahdi@macro-dial-one:10] Set("DAHDI/4-1", "THISDIAL=SIP/103") in new stack
-- Executing [zap2dahdi@macro-dial-one:11] Return("DAHDI/4-1", "") in new stack
-- Executing [dstring@macro-dial-one:9] Set("DAHDI/4-1", "DSTRING=SIP/103&") in new stack
-- Executing [dstring@macro-dial-one:10] Set("DAHDI/4-1", "ITER=2") in new stack
-- Executing [dstring@macro-dial-one:11] GotoIf("DAHDI/4-1", "0?begin") in new stack
-- Executing [dstring@macro-dial-one:12] Set("DAHDI/4-1", "DSTRING=SIP/103") in new stack
-- Executing [dstring@macro-dial-one:13] Return("DAHDI/4-1", "") in new stack
-- Executing [s@macro-dial-one:27] GotoIf("DAHDI/4-1", "0?nodial") in new stack
-- Executing [s@macro-dial-one:28] GotoIf("DAHDI/4-1", "1?skiptrace") in new stack
-- Goto (macro-dial-one,s,30)
-- Executing [s@macro-dial-one:30] Set("DAHDI/4-1", "D_OPTIONS=tr") in new stack
-- Executing [s@macro-dial-one:31] ExecIf("DAHDI/4-1", "0?SIPAddHeader(Alert-Info: )") in new stack
-- Executing [s@macro-dial-one:32] ExecIf("DAHDI/4-1", "0?SIPAddHeader()") in new stack
-- Executing [s@macro-dial-one:33] ExecIf("DAHDI/4-1", "0?SetMusicOnHold()") in new stack
-- Executing [s@macro-dial-one:34] GosubIf("DAHDI/4-1", "0?qwait,1") in new stack
-- Executing [s@macro-dial-one:35] Set("DAHDI/4-1", "__CWIGNORE=") in new stack
-- Executing [s@macro-dial-one:36] Set("DAHDI/4-1", "__KEEPCID=TRUE") in new stack
-- Executing [s@macro-dial-one:37] Dial("DAHDI/4-1", "SIP/103,"",tr") in new stack
== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
-- Called 103
-- SIP/103-0000001a is ringing
-- Channel 0/1, span 2 got hangup, cause 16
== Spawn extension (macro-dial-one, s, 37) exited non-zero on 'DAHDI/4-1' in macro 'dial-one'
== Spawn extension (macro-exten-vm, s, 9) exited non-zero on 'DAHDI/4-1' in macro 'exten-vm'
== Spawn extension (from-did-direct, 103, 1) exited non-zero on 'DAHDI/4-1'
-- Executing [h@from-did-direct:1] Macro("DAHDI/4-1", "hangupcall,") in new stack
-- Executing [s@macro-hangupcall:1] GotoIf("DAHDI/4-1", "1?skiprg") in new stack
-- Goto (macro-hangupcall,s,4)
-- Executing [s@macro-hangupcall:4] GotoIf("DAHDI/4-1", "1?skipblkvm") in new stack
-- Goto (macro-hangupcall,s,7)
-- Executing [s@macro-hangupcall:7] GotoIf("DAHDI/4-1", "1?theend") in new stack
-- Goto (macro-hangupcall,s,9)
-- Executing [s@macro-hangupcall:9] Hangup("DAHDI/4-1", "") in new stack
== Spawn extension (macro-hangupcall, s, 9) exited non-zero on 'DAHDI/4-1' in macro 'hangupcall'
== Spawn extension (from-did-direct, h, 1) exited non-zero on 'DAHDI/4-1'
-- Hungup 'DAHDI/4-1'
2) Pour freepbx, il y a un problème. Lorsque je change le fichier extensions_custom.conf, rien ne change...
dialplan show from-pstn-custom
[ Context 'from-pstn-custom' created by 'pbx_config' ]
-= 0 extensions (0 priorities) in 1 context. =-
pourtant, j'ai bien ça dedans:
[from-pstn-custom]
exten => _X.,n,Set(CALLERID(num)=0${CALLERID(num)})
exten => _X.,n,Goto(from-pstn,${EXTEN},1)
Tu n'as pas repondu a une question judicieuse de Cedric.
-- Accepting call from '664XXXXXX' to '3933' on channel 0/1, span 2
-- Executing [3933@from-pstn:1] Set("DAHDI/4-1", "__FROM_DID=3933") in new stackOn voit bien que c'est from-pstn qui est executé.
Le plus simple est de mettre le contexte entrant de dahdi à from-moncontexteamoipourlecli par exemple et tu renommes ton contexte avec from-moncontexteamoipourlecli si tu ne veux pas creer de boucle avec ton contexte actuel.
Verifie bien qu'un dahdi show channels fait appaitre le bon contexte.
Corrige aussi ton contexte avec
[from-moncontexteamoipourlecli]
exten => _X.,1,Set(CALLERID(num)=0${CALLERID(num)})
exten => _X.,n,Goto(from-pstn,${EXTEN},1)Avec ces modifs, ca devrait aller mieux...;)
Fastm3.
A MAIS OUI!
désolé si je ne me suis pas bien exprimé, mais j'avais bien fais comme cedric m'avait indiqué.
Par contre, là où j'ai encore fais un truc de blond, c'est ta dernière remarque:
Corrige aussi ton contexte
J'avais pas du tout remarqué que j'avais mi un "n" au lieu d'un 1 dans mon dialplan. Merci beaucoup du coup d'oeil!
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions, Inc. Tous droits réservés