Hello, I registered my OVH sip trunk in pjsip with the [from-external] context and my users with the [from-internal] context. I am looking for my users to be able to call each other with numbers as it only has names like user01, user02. Then I need them to make outgoing calls. Can you tell me what is wrong or give me a solution?
exten => 1001,1,Dial(PJSIP/${user01})
exten => 1001,2,Voicemail(1001@boite-vocale)
exten => 1001,3,hangup
exten => 1002,1,Dial(PJSIP/${user02})
exten => 1002,2,Voicemail(1002@boite-vocale)
exten => 1002,3,hangup
exten => 1003,1,Dial(PJSIP/${user03})
exten => 1003,2,Voicemail(1003@boite-vocale)
exten => 1003,3,hangup
exten => 1004,1,Dial(PJSIP/user04,15,tTr)
exten => 1004,2,Voicemail(1004@boite-vocale)
exten => 1004,3,hangup
exten => 888,1,VoiceMailMain(s${CALLERID(num)})
exten => _XXXXX.,1,Answer
same => n,MixMonitor(/var/spool/asterisk/monitor/${UNIQUEID}.wav,b)
same => n,Set(CDR(recordingpath)=/var/spool/asterisk/monitor/${UNIQUEID}.wav)
same => n,Dial(PJSIP/from-external/${EXTEN})
same => n,Hangup
exten => 10,1,Goto(agent-login,s,1)
exten => 20,1,Goto(agent-logout,s,1)
[from-external]
include => from-internal
exten => s,1,Ringing(1)
exten => s,2,Answer
exten => s,3,Goto(hotline,s,1)
exten => s,4,Hangup(16)
[agent-login]
exten => s,1,Answer()
exten => s,n,AddQueueMember(support)
exten => s,n,Playback(agent-loginok)
exten => s,n,Hangup()
[agent-logout]
exten => s,1,Answer()
exten => s,n,RemoveQueueMember(support)
exten => s,n,Playback(agent-loggedoff)
exten => s,n,Hangup()
[hotline]
exten => s,1,Answer()
same => n,Set(CHANNEL(tonezone)=fr)
same => n,Set(CHANNEL(language)=fr)
same => n,Set(TIMEOUT(digit)=5)
same => n,Set(TIMEOUT(response)=10)
same => n,MixMonitor(/var/spool/asterisk/monitor/${UNIQUEID}.wav,b)
same => n,Set(CDR(recordingpath)=/var/spool/asterisk/monitor/${UNIQUEID}.wav)
exten => s,3,Queue(support,tTwW)
;exten => s,4,Background(/var/lib/asterisk/sounds/fr/recorded)
:exten => s,5,WaitExten()