On Tue, Nov 4, 2014 at 5:45 AM, Olivier <[email protected]> wrote:
> Hello,
>
> If I'm not mistaken, numbered placeholders are not supported by
> dialplan's SPRINTF function.
> Though this is strictly not blocking, having them would allow concise
> expressions such as:
>
> Dial(${SPRINTF(${PJSIPFORMAT},mytrunk,123456789)})
>
> with :
>
> Set(PJSIPFORMAT="PJSIP/%2$s@%1$s")
> Set(SIPFORMAT="SIP/%2$s@%1$s")
> or
> Set(DAHDIFORMAT="DAHDI/%1$s/%2$s")
>
> What do you think of this ?
>

Well, that's definitely more of a PHP approach to things, and I think
the original implementation was focussed much more on a traditional
mechanism for formatting arguments.

I don't think there's anything wrong necessarily with that approach
per se. I would recommend writing some tests for the function if you
decide to write a patch for that feature.

-- 
Matthew Jordan
Digium, Inc. | Engineering Manager
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at: http://digium.com & http://asterisk.org

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

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

Reply via email to