[Asterisk-Dev] Asterisk Manager and app_dial challenge.

Zac Wolfe zacw at safisys.com
Tue Oct 12 14:23:50 MST 2004


That's exactly the issue I ran into while working on Jasterisk. My solution
was to modify pbx.ast_request to take an additional optional parameter that
could act as a call identifier and set a predefined variable in the newly
created channel to that variable.  Then, when I receive a "newchannel" or
"newstate" event, I can find the channel and check to see if it's already
associated with a "call" object.  Or, I suppose you could modify the event
to include a "Call_UID" field so you wouldn't have to grab the variable from
the channel directly (hey why didn't I do that?).

Zac
  -----Original Message-----
  From: Brian Roy [mailto:b.t.roy at brianandkelly.ws]
  Sent: Tuesday, October 12, 2004 1:43 PM
  To: asterisk-dev at lists.digium.com
  Subject: [Asterisk-Dev] Asterisk Manager and app_dial challenge.


  All,



  Any suggestions you might have would be appreciated.



  I have written a pre-alpha Call Data Server in Java for Asterisk. It is
designed to provide similar functionality to circuit switch CTI solutions
(like Genesys) including maintaining call state, extension state, and most
importantly - carry user specified data elements with the call for Screen
Pop. The challenge I have run into is with the functionality of the Dial
command and the Link, Unlink, Ring and Ringing events.



  In order to properly perform screen pop, ideally the event Ringing on the
target (or all targets) extension rings. The challenge is that there is no
linkage between the new calls ringing the target extensions and the original
inbound call that has the call data associated. Not until the target
extension answers and the LINK event is fired can those two calls be
associated.



  I have reviewed the code for both pbx.c and app_dial.c and can find no way
to modify the code to accomplish it. Ideally, I would like a new event
"PRELINK" which, when the Dial command is fired is set to the manager with
the same format as a LINK event:



  Line: 0: Event: Link

  Line: 1: Channel1: SIP/147.135.0.129-0816e408

  Line: 2: Channel2: SIP/4403-2871

  Line: 3: Uniqueid1: 1097608761.39

  Line: 4: Uniqueid2: 1097608761.40

  Line: 9:



  The PRELINK should be fired once for each target of the Dial Command
allowing "pop" for all of those clients.



  Thoughts?



  Brian Roy

  b.t.roy at brianandkelly.ws
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-dev/attachments/20041012/76a77fc7/attachment.htm


More information about the asterisk-dev mailing list