I’ve made some progress and I was so delighted the first time after quite a few trial and error attempts the deskphon rang with the call…
so I’ve got this code sitting on the server waiting for a click from our intranet site which would look like http://192.168.1.5/call.php?exten=52&number=07391325541.
This is great and it works. My deskphone (52) rings, when I answer the call, it starts dialling my mobile 07391325541 (changed for the forum).
HOWEVER, what I’d like to happen instead is for Asterisk to ring the mobile number provided in the link (there’s no ‘need’ for an extension to be involved) and for the call to to go straight to a context in extensions_custom.conf…
[outboundmsg1]
exten => s,1,Set(TIMEOUT(digit)=5) ; Set Digit Timeout to 5 seconds
exten => s,2,Set(TIMEOUT(response)=10) ; Set Response Timeout to 10 seconds
exten => s,3,Answer
exten => s,4,Wait(1)
exten => s,5,Background(outboundmsgs/msg1) ; "play outbound msg"
exten => s,6,Background(outboundmsgs/how_to_ack) ; "Press 1 to replay or 2 to acknowledge receiving this message"
exten => 1,1,Goto(s,5) ; replay message
exten => 2,1,Goto(msgack,s,1) ; acknowledge message
exten => t,1,Playback(vm-goodbye)
exten => t,2,Hangup
I tried to modify line 16 in the call.php
1. $strContext = "from-internal";
to
1. $strContext = "outboundmsg1";
but (I wasn’t that surprised) it just stopped the whole thing from working.
I’m still pretty childishly exhilerated that I’ve got this far, with creating a new asterisk manager user and making the necessary changes to get my PJSIP extension to ring rather than a SIP one. Progress! Small steps but happy steps. But yeah…my call file looks like this
Channel: Local/[email protected]
Callerid: 7022340175
MaxRetries: 5
RetryTime: 300
WaitTime: 45
Context: outboundmsg1
Extension: s
Priority: 1
As you all can see, this calls extension 20 and then goes to the outboundmsg1 context. Works a treat. I’d like to make this an outbound/external call I ‘start’ via a link on our intranet.
Thanks!