[asterisk-users] Dial multiple extensions and know who picks up call

Kyle Kienapfel doctor.whom at gmail.com
Tue Feb 2 18:11:54 CST 2010


Any updates on this? It looks like I can't update CDR(userfield) from
inside such a macro and have it written to the cdr record.

[macro-pstn-trigger]
exten => s,1,noop()
;exten => s,n,DumpChan()
exten => s,n,verbose(${DIALEDPEERNUMBER})
exten => s,n,verbose(cdr userfield ${CDR(userfield)})
exten => s,n,verbose(${CHANNEL(channeltype)} ${CHANNEL(peername)}
${CALLERID(num)})
exten => s,n,Set(CDR(userfield)="DIALEDPEERNUMBER=${DIALEDPEERNUMBER}")
exten => s,n,verbose(cdr userfield ${CDR(userfield)})

the change shows up on the last line.

I might have to write to a file inside my macro?


On Wed, Sep 9, 2009 at 11:14 PM, Patrick <asterisk-users at ict-synergy.be> wrote:
> Thank you Jim, I'll check what I can find from the DumpChan() and keep
> the mailing list posted.
>
> Best regards,
> Patrick
>
> On Wed, Sep 9, 2009 at 16:57, Jim Dickenson <dickenson at cfmc.com> wrote:
>> Depending on version you are using you could use the M option on the
>> Dial command. I use 1.6.0.x and it works there. This causes a macro to
>> be executed when someone answers the call. There you have access to
>> many channel variables. Use DumpChan() to see what is available and go
>> from there.
>> --
>> Jim Dickenson
>> mailto:dickenson at cfmc.com
>>
>> CfMC
>> http://www.cfmc.com/
>>
>>
>>
>> On Sep 9, 2009, at 7:29 AM, Patrick wrote:
>>
>>> Thanks a lot Danny but isn't it another "production proof" way of
>>> doing this ?
>>>
>>> I've given a very simple example but in production, I can call up to
>>> 10 destinations simutaneously and there could have more than 30
>>> concurrent calls, meaning that this solution doesn't sounds very
>>> reliable in my case.
>>>
>>> Is there any other way to retrieve the information ? Channel
>>> variable ?
>>> What a CDR(dst) returns after the Dial ? All destination or only the
>>> destination that has answered ?
>>>
>>> Thanks in advance
>>> Patrick
>>>
>>>
>>>
>>>
>>> On Wed, Sep 9, 2009 at 16:15, Danny Nicholas<danny at debsinc.com> wrote:
>>>> You could strip it out of a "core show channels" command.  When 100
>>>> picks up
>>>> the call, the command will show an active call on 100.  Of course
>>>> this
>>>> wouldn't be accurate if 101 also was on another call.  You could do
>>>> an AGI
>>>> to start before the Dial and it could monitor and return the pickup
>>>> extension using AMI.
>>>>
>>>> -----Original Message-----
>>>> From: asterisk-users-bounces at lists.digium.com
>>>> [mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Patrick
>>>> Sent: Wednesday, September 09, 2009 9:08 AM
>>>> To: asterisk-users at lists.digium.com
>>>> Subject: [asterisk-users] Dial multiple extensions and know who
>>>> picks up
>>>> call
>>>>
>>>> Dear,
>>>>
>>>> I'm currently using a Dial command with multiple destinations and
>>>> channels
>>>> eg: Dial(SIP/100&SIP/101)
>>>>
>>>> I simply would like to know, in real time during the call (from dial
>>>> plan or AGI), who has picked up the call.
>>>> Can I find this information in a variable somewhere ?
>>>>
>>>> Thank you for your help
>>>> Patrick
>>>>
>>>> _______________________________________________
>>>> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>>>>
>>>> AstriCon 2009 - October 13 - 15 Phoenix, Arizona
>>>> Register Now: http://www.astricon.net
>>>>
>>>> asterisk-users mailing list
>>>> To UNSUBSCRIBE or update options visit:
>>>>   http://lists.digium.com/mailman/listinfo/asterisk-users
>>>>
>>>>
>>>> _______________________________________________
>>>> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>>>>
>>>> AstriCon 2009 - October 13 - 15 Phoenix, Arizona
>>>> Register Now: http://www.astricon.net
>>>>
>>>> asterisk-users mailing list
>>>> To UNSUBSCRIBE or update options visit:
>>>>   http://lists.digium.com/mailman/listinfo/asterisk-users
>>>>
>>>
>>> _______________________________________________
>>> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>>>
>>> AstriCon 2009 - October 13 - 15 Phoenix, Arizona
>>> Register Now: http://www.astricon.net
>>>
>>> asterisk-users mailing list
>>> To UNSUBSCRIBE or update options visit:
>>>   http://lists.digium.com/mailman/listinfo/asterisk-users
>>
>>
>> _______________________________________________
>> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>>
>> AstriCon 2009 - October 13 - 15 Phoenix, Arizona
>> Register Now: http://www.astricon.net
>>
>> asterisk-users mailing list
>> To UNSUBSCRIBE or update options visit:
>>   http://lists.digium.com/mailman/listinfo/asterisk-users
>>
>
> _______________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> AstriCon 2009 - October 13 - 15 Phoenix, Arizona
> Register Now: http://www.astricon.net
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>   http://lists.digium.com/mailman/listinfo/asterisk-users
>



More information about the asterisk-users mailing list