[asterisk-users] Function IMPORT

Tilghman Lesher tilghman at mail.jeffandtilghman.com
Wed Jun 17 14:29:34 CDT 2009


On Wednesday 17 June 2009 03:45:54 Olivier wrote:
> 2009/6/15 Tilghman Lesher <tilghman at mail.jeffandtilghman.com>
>
> > On Monday 15 June 2009 04:03:48 am Olivier wrote:
> > > I've just discovered IMPORT function existence.
> > > It can be use to import values from channel's Variable section but
> > > unfortunately, il can't be use to access to values from Info section
> > > (I'm referring here to sections Info and Variables dumped by DumpChan
> > > application).
> >
> > You're mistaken.
> >
> > > Is there a way to work around this and access from one channel for
> >
> > instance
> >
> > > to another channel's CallerIDNum variable ?
> >
> > ${IMPORT(SIP/foo-abcd1234,CALLERID(num))} works fine.
>
> Yes, you're right, this works fine.
>
> The reason why I was wrong is because I closely followed DumpChan output
> like this :
> - DumpChan output is :
> Dumping Info For Channel: SIP/7530-082f6160:
> ===========================================================================
>===== Info:
> Name=               SIP/7530-082f6160
> Type=               SIP
> UniqueID=           1245227926.4
> CallerIDNum=        7530
> CallerIDName=       Michele
> DNIDDigits=         7531
> RDNIS=              (N/A)
> ...
>
> I then tried :
> ${IMPORT(SIP/7530-082f6160,CallerIDNum)} which fails
>
> Maybe, it should be preferable to teach DumpChan to output data like this :
>
> Dumping Info For Channel: SIP/7530-082f6160:
> ===========================================================================
>===== Info:
> Name=               SIP/7530-082f6160
> Type=               SIP
> UniqueID=           1245227926.4
> CALLERID(num)=        7530
> CALLERID(name)=       Michele

Actually, that would be:
Name                                 ...
CHANNEL(channeltype)     ...
CHANNEL(uniqueid)           ...
CALLERID(num)                  ...
CALLERID(name)                ...
CALLERID(dnid)                  ...
CALLERID(rdnis)                 ...

It's certainly a possibility.  If you wanted to dedicate the time to putting
that patch together and submitting it on the issue tracker, I don't really
see a reason why it wouldn't be committed.

-- 
Tilghman



More information about the asterisk-users mailing list