Re: [asterisk-users] retry loop in ansible ?

2024-01-08 Thread Axel Rau
Hi,

> Am 08.01.2024 um 18:16 schrieb C. Maj :
> 
> On 12/6/23 02:08, Axel Rau wrote:
>> I have a simple config with some phones ringing simultaneously.
>> Some of them are softphones (zoiper apps on iPhone w/o push notification).
>> If such an app did bot register in time, it has no chance to pick up the 
>> call.
>> If I could configure a retry loop checking for registered candidates,
>> say once a second until one phone takes the call, this would allow me
>> to pick up the call with zoiper app registered late.
>> How could this be done in ansible?
> 
> Did you mean asterisk ?
Yes. 
> 
> If so, then you might look into the While()/EndWhile() applications, combined 
> with timeouts to Dial() application, starting with something very basic such 
> as the following:
> 
> same = n,Set(tries=0)
> same = n,While($[${INC(tries)}<99])
> same = n,Set(PUSH(team,&)=${PJSIP_DIAL_CONTACTS(1234)})
> same = n,Set(PUSH(team,&)=${PJSIP_DIAL_CONTACTS(5678)})
> same = n,Dial(${team},10)
> same = n,Wait(1)
> same = n,EndWhile()
> 
> ...at most that would be 11 seconds in between registration of x5678 and the 
> next time it gets called when x1234 is not answering.
Thanks a lot for this example.

> 
> Other approaches might involve Queue()'s with some ChannelRedirect()'s or 
> even Bridge()'s, maybe AGI/ARI, etc.
> 
> BTW the Asterisk Forums are a great place to post these kinds of questions in 
> the future: https://community.asterisk.org

I will try this in the future,

Regards, Axel
—
PGP-Key: CDE74120  ☀ mobile: +49 160 7568212
computing @ chaos claudius

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] retry loop in ansible ?

2024-01-08 Thread C. Maj

On 12/6/23 02:08, Axel Rau wrote:

I have a simple config with some phones ringing simultaneously.
Some of them are softphones (zoiper apps on iPhone w/o push notification).
If such an app did bot register in time, it has no chance to pick up the call.
If I could configure a retry loop checking for registered candidates,
say once a second until one phone takes the call, this would allow me
to pick up the call with zoiper app registered late.

How could this be done in ansible?


Did you mean asterisk ?

If so, then you might look into the While()/EndWhile() applications, 
combined with timeouts to Dial() application, starting with something 
very basic such as the following:


same = n,Set(tries=0)
same = n,While($[${INC(tries)}<99])
same = n,Set(PUSH(team,&)=${PJSIP_DIAL_CONTACTS(1234)})
same = n,Set(PUSH(team,&)=${PJSIP_DIAL_CONTACTS(5678)})
same = n,Dial(${team},10)
same = n,Wait(1)
same = n,EndWhile()

...at most that would be 11 seconds in between registration of x5678 and 
the next time it gets called when x1234 is not answering.


Other approaches might involve Queue()'s with some ChannelRedirect()'s 
or even Bridge()'s, maybe AGI/ARI, etc.


BTW the Asterisk Forums are a great place to post these kinds of 
questions in the future: https://community.asterisk.org


Regards,

--
鸞 C. Maj, TechnoCaptain
 Penguin PBX Solutions
 Denver 720-32-42-72-9
 Beyond 1-833-PNGN-PBX
 http://PeNGuiNPBX.com


--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
 https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] SIP_HEADER GET_TRANSFERRER_DATA chan_pjsip

2024-01-08 Thread Joshua C. Colp
On Mon, Jan 8, 2024 at 12:07 PM marek  wrote:

> hi,
>
> we are moving our asterisk from chan_sip to chan_pjsip
>
> we are using SIP_HEADER with GET_TRANSFERRER_DATA for headers from
> REFER   (asterisk - other pbbx - SIP REFER - asterisk)
>
>
> https://github.com/ca4ti/asterisk/commit/4b58609c331c013845a0a61d946cbbc82092170e
>
> is it supported in pjsip too? or is there other way?
>

Looking at the REFER implementation[1] it seems like no. You can submit a
feature request here[2].

[1] https://github.com/asterisk/asterisk/blob/20/res/res_pjsip_refer.c
[2] https://github.com/asterisk/asterisk-feature-requests

-- 
Joshua C. Colp
Director of Engineering | Asterisk Project Lead
Sangoma Technologies
Check us out at www.sangoma.com and www.asterisk.org
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

[asterisk-users] SIP_HEADER GET_TRANSFERRER_DATA chan_pjsip

2024-01-08 Thread marek

hi,

we are moving our asterisk from chan_sip to chan_pjsip

we are using SIP_HEADER with GET_TRANSFERRER_DATA for headers from 
REFER   (asterisk - other pbbx - SIP REFER - asterisk)


https://github.com/ca4ti/asterisk/commit/4b58609c331c013845a0a61d946cbbc82092170e

is it supported in pjsip too? or is there other way?

thanks

Marek



--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
 https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users