asterisk at phreaknet.org
2023-Jul-22 21:40 UTC
[asterisk-users] Parallel dialoog with different Alert-Info headers
On 7/22/2023 4:51 PM, Dirk-Willem van Gulik wrote:> We have a couple of parallel ring settings (and this has worked well for eons). > > Either in the form of > > same => n,Dial(SIP/1001 & SIP/1002 & SIP/1003 …..) > > Or via a subroutine (below) that has a bit of extra logic: > > FOO = 1010 & 1019 & 1017 & 1033 > ... > same => n,gosub(sub-callout,s,1,(${FOO},”Ringing all class FOO telefons")) > > Now I have two types of phones (different) era’s that require slightly different Alert-Info headers. > > How can one introduce a layer of indirection at phone (extension) level that adds those headers ?I'm assuming you mean at the device level, and that you want to send only the relevant header to each device? Use pre-dial handlers; a unique handler runs on each destination channel. With PJSIP, you're forced to do this anyways, but SIPAddHeader adds these to the calling channel first, which explains the problem you have now. How you determine the right header to send on each channel is something you still need to do. For example, you could detect the user agent in your pre-dial handler and add the appropriate header. This is a common enough scenario for things like setting the ring cadence that I wrote an application to handle this for me.
Dirk-Willem van Gulik
2023-Jul-23 16:32 UTC
[asterisk-users] Parallel dialoog with different Alert-Info headers
> On 22 Jul 2023, at 23:40, asterisk at phreaknet.org wrote: > > On 7/22/2023 4:51 PM, Dirk-Willem van Gulik wrote: >> We have a couple of parallel ring settings (and this has worked well for eons). >> >> Either in the form of >> >> same => n,Dial(SIP/1001 & SIP/1002 & SIP/1003 …..) >> >> Or via a subroutine (below) that has a bit of extra logic: >> >> FOO = 1010 & 1019 & 1017 & 1033 >> ... >> same => n,gosub(sub-callout,s,1,(${FOO},”Ringing all class FOO telefons")) >> >> Now I have two types of phones (different) era’s that require slightly different Alert-Info headers. >> >> How can one introduce a layer of indirection at phone (extension) level that adds those headers ? > I'm assuming you mean at the device level, and that you want to send only the relevant header to each device? > Use pre-dial handlers; a unique handler runs on each destination channel. With PJSIP, you're forced to do this anyways, but SIPAddHeader adds these to the calling channel first, which explains the problem you have now.Aye - problem is - I have some 79XX phones for which I am very reliant on functionality from https://usecallmanager.nz/documentation-overview.html that is not in PJSIP.> How you determine the right header to send on each channel is something you still need to do. For example, you could detect the user agent in your pre-dial handler and add the appropriate header. This is a common enough scenario for things like setting the ring cadence that I wrote an application to handle this for me.OK - that is not quite as neat as I had hoped - but perfectly doable. And easy to wrap. Thanks, Dw. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20230723/79301074/attachment.html>
Possibly Parallel Threads
- Parallel dialoog with different Alert-Info headers
- Parallel dialoog with different Alert-Info headers
- Parallel dialoog with different Alert-Info headers
- [patch] Updated patch for pkcs#11 smartcard readers that have a protected PIN path
- [Bug 2240] New: Secure PIN entry for smartcards through the keypad on the reader (patch)