[asterisk-users] Asterisk + hinting presence + macro

Eric "ManxPower" Wieling eric at fnords.org
Thu Jun 28 23:15:04 CDT 2007


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.



More information about the asterisk-users mailing list