[asterisk-users] func SHARED, how to use?

Dmitry Melekhov dm at belkam.com
Thu Sep 23 07:21:48 CDT 2010


23.09.2010 16:06, Philipp von Klitzing пишет:
> Hi!
>
>    
>>> And the third hit in my google result is this:
>>>
>>> http://lists.digium.com/pipermail/asterisk-users/2009-July/235288.html
>>>
>>> Since I mentioned in my previous message that you will find the answer
>>> in the archive of this list you could have found that even without
>>> google. gmane.org for example has a nice web UI for reading this list.
>>>        
>     >
>    
>> I'm sorry, but this is absolutely the same thing I see on voip-info.org.
>>      
> Indeed, I added that info to the Wiki yesterday to make it easier for you
> in case you would not succed with Google.
>
>    

Well, this doesn't make things simpler for me :-(

> Since you are not describing a concrete problem in detail (and illustrate
> that with some code) it is difficult to help you. For example you still
> do not tell us if the Zap/DAHDI channel is your first or second call leg,
> and you do not tell us which data you would like to access, and how it is
> failing in your current implementation.
>    

DAHDI is channel from which I call Dial, so it is only accessible in h.
Otherwise I'll not ask this question :-)
> - SIP/123 might be your Zap/DAHDI channel, which you could pass onto the
> second call leg either by a channel variable prefixed with an underscore
> (like _MYVAR), or by adding it as a Macro argument.
>
>    
There are 2 things I can't understand-
1. how can I know channel name? imho, this will be far easier to have 
something to name bridged channel...
But I guess it is very simple , I just don't know how...
2. where should I call this SHARED function? before Dial, after Dial?

Here is my calling code:
exten =>_10XXXX,n,Dial(SIP/${EXTEN:2}@peer,,g)
exten =>_10XXXX,n,Hangup()

...
and this is what I tried in h:

exten => h,1,Set(CDR(userfield)=${CHANNEL(rtpqos,audio,local_count)})

This can looks different, this is just a try :-)
But Channel is DAHDI, not SIP, so I want to use SHARED.

Thank you!





More information about the asterisk-users mailing list