Rob Schall wrote: > Anthony Francis wrote: >> Eric "ManxPower" Wieling wrote: >> >>> Rob Schall wrote: >>> >>> >>>> Eric "ManxPower" Wieling wrote: >>>> >>>> >>>>> Rob Schall wrote: >>>>> >>>>> >>>>> >>>>>> I currently have about 50 polycom 501 phones on my asterisk setup. >>>>>> The dialplan is set to work with mysql (realtime), and all of the >>>>>> extensions for the phones route through the same macro (stdexten). >>>>>> This all works fine until I tried to set up notify status. >>>>>> >>>>>> On voip-info, they say do something like... >>>>>> >>>>>> 4444,hint,SIP/4444 >>>>>> 4444,1,Dial(SIP/4444) >>>>>> blah blah blah >>>>>> >>>>>> This functionality works fine. But what if you have a macro >>>>>> s,hint,SIP/${ARG1} >>>>>> s,1,Dial(SIP/${ARG1} >>>>>> >>>>>> this adds a "s" hint which obviously doesn't work, instead of a hint >>>>>> for 4444 as it should. >>>>>> >>>>>> >>>>>> >>>>> Yes. Put in the correct hint. There is no reason that >>>>> "4444,hint,SIP/4444" would not work in a macro. >>>>> >>>>> _______________________________________________ >>>>> --Bandwidth and Colocation Provided by http://www.api-digital.com-- >>>>> >>>>> asterisk-users mailing list >>>>> To UNSUBSCRIBE or update options visit: >>>>> http://lists.digium.com/mailman/listinfo/asterisk-users >>>>> >>>>> >>>>> >>>> So, if I understand you correctly, my macro would look something vaguely >>>> like... >>>> >>>> [macro-stdexten] >>>> ${ARG1},hint,SIP/${ARG1} >>>> s,1,Dial(${ARG1})? >>>> >>>> This will work? My understand was that by going into a macro, you were >>>> going to be using the "s" extension. I'm not sure how that hint would >>>> get called if its not inside the s extension. >>>> >>>> >>> I have no idea, but as I understand it, Hints are separate from extensions. >>> >>> I guess you could do something like: >>> >>> [macro-stdexten] >>> exten => s,1,Goto(${MACRO_EXTEN},1) >>> >>> exten => _XXXX,hint,SIP/${ARG1} >>> exten => _XXXX,1,Dial(${ARG1}) >>> >>> I do this sort of thing in many of my macros that Dial somewhere. I >>> seem to remember something about hints not working for pattern matching. >>> or working weirdly. >>> >>> _______________________________________________ >>> --Bandwidth and Colocation Provided by http://www.api-digital.com-- >>> >>> asterisk-users mailing list >>> To UNSUBSCRIBE or update options visit: >>> http://lists.digium.com/mailman/listinfo/asterisk-users >>> >>> >> Hints do not have to be part of the steps in a dialplan, and if you want >> devices to be listeners, they shouldn't be. Also you had stated you >> where using realtime, and the hint priority doesnt work in realtime, I >> submitted a bug about this and it was rejected as won't fix, but was >> explained as, not going to be fixed anytime soon. >> >> At an rate make a hint context that has devices mapped to extensions, >> [hint-context] >> 4444,hint,Sip/4444 >> 4445,hint,Sip/4445 >> >> and the like, then add that context in sip.conf for all devices both >> monitored and listeners, >> subscribecontext=hint-context >> >> Then ast will send update notifications about these devices to watchers >> properly. >> >> Hope this helps, >> >> Anthony >> >> >> _______________________________________________ >> --Bandwidth and Colocation Provided by http://www.api-digital.com-- >> >> asterisk-users mailing list >> To UNSUBSCRIBE or update options visit: >> http://lists.digium.com/mailman/listinfo/asterisk-users >> > Anthony, > > I didn't realize you could do hints like that. This will be very > interesting if I can make it work.... > > In extensions.conf, I added > > [hint-context] > 4444,hint,SIP/4444 > 5053,hint,SIP/5053 > > I think added an include to my main context (internal). I'm assuming > these need to be included. > > In sip.conf, I added: > subscribecontext = hint-context > notifyringing = yes > > and in the phone directories, I added: <bw>#</bw> to the corresponding > entries. > > However, the phones show as "offline" and using "show hints" from the > cli also says no hints. > > Any ideas? > > ------------------------------------------------------------------------ > > _______________________________________________ > --Bandwidth and Colocation Provided by http://www.api-digital.com-- > > asterisk-users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users I don't know about the phone directories you are using, but as long as those are the actual sip id's of the devices it should work, oh and to get it all to work after putting it in the dialplan you have to issue a reload command in the CLI.
Here is an example (real-world) where I am using it and showing sip pressence on a Aastra 55i. [rockynet-1000-hint] exten => 865,hint,SIP/7CEC9925-865&SIP/27E68FA6-865 exten => 3036292865,hint,SIP/5D03CB01-865 exten => 864,hint,SIP/B7AA2A4A-864 exten => 858,hint,SIP/27623324-858 exten => 861,hint,SIP/atabryan exten => 3036292861,hint,SIP/E30CD3F6-861 exten => 857,hint,SIP/F7D4BFD1-857 exten => 868,hint,SIP/B956285D-868 exten => 863,hint,SIP/625AB6D7-863 exten => 863,hint,SIP/625AB6D7-863 exten => 854,hint,SIP/CE74050E-854 exten => 866,hint,SIP/7CDF7A01-866 in sip.conf subribecontext=rockynet-1000-hint The device that is subscribing has to have that entry as well. This example works in production in a realtime environment now, it muust be noted that the context for hints cannot be in the DB so what I did is I created a file called hint.conf and # included it in the db so it would link it and load it. _______________________________________________ --Bandwidth and Colocation Provided by http://www.api-digital.com-- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users