[asterisk-users] multiple softphone clients and same/different account credentials

Greg Troxel gdt at lexort.com
Tue Nov 26 21:05:47 CST 2019


"C.Maj" <chris at PenguinPBX.com> writes:

> Another option for a patch would be to extend the PJSIP_DIAL_CONTACTS
> function with an argument such as 'please' to minimally return the
> endpoint name in a Dialable format when no reachable contacts are found
> eg. "PJSIP/bar" -- instead of the current empty string, which is not
> Dialable.

I thought of that also while considering if patching the way Dial
behaves was feasible.  I think you are right that having
PJSIP_DIAL_CONTACTS reduce to a single PJSIP/aor string will follow the
principle of least astonishment.

> Also the empty string is somewhat in conflict with the Synopsis "Return
> a dial string for dialing all contacts on an AOR." (Maybe add " Or
> returns empty string if no reachable contacts. Do not Dial directly." ?)
>
> Regardless of patch status, I'd recommend looking at the PUSH function
> to build up the dial list one line item at a time -- please pardon the
> AEL format on my example:
>
>   Set(rgrp=);
>   Set(PUSH(rgrp,&)=PJSIP/foo);
>   Set(PUSH(rgrp,&)=PJSIP/baz);
>   if( "${PJSIP_DIAL_CONTACTS(bar)}" != "" ) {
>     Set(PUSH(rgrp,&)=${PJSIP_DIAL_CONTACTS(bar)});
>   }
>   Dial(${rgrp});

That looks workable.  Is there a multiprocessing hazard here?  Could
${PJSIP_DIAL_CONTACTS(bar)} change between check and use.



More information about the asterisk-users mailing list