[asterisk-users] asterisk 16.9 function HINT with option n does not return anything

Nenad Radosavljevic nenadr at snr.rs
Wed Jun 3 10:23:04 CDT 2020


Thanks Joshua !

I was not aware that extension's hint in dialplan can have additional data
in the parentheses - it might be worth adding that info to wiki.

On Wed, Jun 3, 2020 at 10:08 AM Nenad Radosavljevic <nenadr at snr.rs>
wrote:

>
> > Hello !
> >
> > Is there something wrong with the function HINT(<extension number>,n) ?
> > Note the param n - it is supposed to get (as far as I understand the
> > documentation) CALLERID(name) of the extension (via extension's hint).
> >
>
> It does not get the caller id name. I believe if configured as such:
>
> exten => 10,hint,PJSIP/10(Bob)
>
> It would return the value Bob but I have not tested it.
>

I have just tested it and it is working just like you have described it.

> For PJSIP the PJSIP_ENDPOINT dialplan function[1] can be used to retrieve
> the configured callerid name.
>
> [1]
>
https://wiki.asterisk.org/wiki/display/AST/Asterisk+13+Function_PJSIP_ENDPOINT
>

I'm using that approach now, but I would like to switch to a more generic
one like this with a hint-name.

Thanks again.

Best regards,

             Nenad Radosavljevic

On Wed, Jun 3, 2020 at 3:06 PM Nenad Radosavljevic <nenadr at snr.rs> wrote:
>
> Hello !
>
> Is there something wrong with the function HINT(<extension number>,n) ?
> Note the param n - it is supposed to get (as far as I understand the
documentation) CALLERID(name) of the extension (via extension's hint).
>
> Example configuration:
>
> pjsip.conf:
>
> [10]
> type=endopoint
> .
> .
> callerid = Test extension <10>
> .
> .
> extensions.conf:
>
> [exts]
>
> exten => 10,hint,PJSIP/10
> exten => 10,1,Set(DEV=${HINT(10 at exts)})
> exten => 10,n,Set(DEVNAME=${HINT(10 at exts,n)})
> exten => 10,n,Noop(DEV is ${DEV})
> exten => 10,n,Noop(DEVNAME is ${DEVNAME})
>
> on asterisk 16.9.0:
>  - first noop prints:       DEV is PJSIP/10
>  - second noop prints: DEVNAME is
>
> Way I understand the documentation for function HINT, I would expect the
DEVNAME variable to be set to "Test extension".
>
> Any "light" on this topic would be much appreciated. Thanks.
>
> Regards,
>            Nenad Radosavljevic
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20200603/da007ef3/attachment.html>


More information about the asterisk-users mailing list