[asterisk-users] PhpAgi call generation
Nasir Iqbal
nasir at ictinnovations.com
Tue Jul 31 11:49:42 CDT 2007
Oh,
you need Dial application instead of origination.
so no need to AGI Script simply add
the dialplan called for ".call" should look like this
exten => yourexten,1,BackGround(your_menu_ivr)
exten => yourexten,n,WaitExten()
exten => 1,1,Dial(SIP/xo-out/$supervisor_num) ;for Supervisor
exten => 2,1,Dial(SIP/xo-out/$manager_num) ;for Manager
exten => 3,1,Voicemail(your_voice_mail_box)
Regards
Nasir Iqbal
On Tue, 2007-07-31 at 12:21 -0400, Nitesh Divecha wrote:
> Thanks Nasir,
>
> By putting "'Exten'=> your_extensions_here" it will create a new channel
> to that extension, correct?
>
> What I want to do is to join two channels... Join the User A channel
> which is active with supervisor.
>
> Cheers,
> Nitesh
>
>
>
> Nasir Iqbal wrote:
> > Hi Nitesh,
> >
> > you are missing Extension
> > try with
> >
> > $call = $asm->send_request('Originate',
> > array('Channel'=>"SIP/xo-out/$supervisor_num",
> > 'Context'=>'default',
> > 'Exten'=> your_extensions_here,
> > 'Priority'=>1,
> > 'Callerid'=>$cid));
> >
> > or you must put an "s" extensions in your desired context in this case
> > it is "default".
> >
> > Regards
> >
> > Nasir Iqbal
> >
> > On Tue, 2007-07-31 at 10:08 -0400, Nitesh Divecha wrote:
> >
> >> Hello All,
> >>
> >> Can anyone help me with this... This is what my program does: -
> >>
> >> 1) At certain time the system generates a ".call" and make a call to User A.
> >>
> >> 2) When User A picks up the phone call, system will play a menu select
> >> option.
> >> a) Press 1 to call your supervisor.
> >> b) Press 2 to call your manager.
> >> c) Press 3 to leave a voice message.
> >>
> >> 3) When the User A press 1 to call his supervisor... The system has to
> >> put the User A on hold and place a call to the supervisor.
> >>
> >> 4) Once the supervisor picks up the call, User A has to be in session
> >> with his supervisor.
> >>
> >> Now I have already got part 1 and 2 done... but I am stuck with part 3
> >> and 4.
> >>
> >> This is how I generate my call to the supervisor: -
> >> ===================================
> >> if($asm->connect())
> >> {
> >> $call = $asm->send_request('Originate',
> >> array('Channel'=>"SIP/xo-out/$supervisor_num",
> >> 'Context'=>'default',
> >> 'Priority'=>1,
> >> 'Callerid'=>$cid));
> >> $asm->disconnect();
> >> }
> >>
> >> One the *CLI I do see the call, but its failing: -
> >>
> >> AGI Rx << STREAM FILE
> >> /var/spool/asterisk//tmp//text2wav_e08db16aede0af38ebb90a1c69ee19e3 "" 0
> >> AGI Tx >> 200 result=0 endpos=26224
> >> == Parsing '/etc/asterisk/manager.conf': Found
> >> == Manager 'phpagi' logged on from 127.0.0.1
> >> > Channel SIP/xo-out-08f8ae10 was answered.
> >> == Starting SIP/xo-out-08f8ae10 at default,,1 failed so falling back
> >> to exten 's'
> >> == Manager 'phpagi' logged off from 127.0.0.1
> >> AGI Rx << STREAM FILE goodbye "" 0
> >>
> >> Can anyone put some light what I am missing here... Why the call is
> >> dropped on both end...?
> >>
> >> Cheers,
> >> Nitesh
> >>
> >>
> >>
> >> _______________________________________________
> >> --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
> >>
> >
> >
> > _______________________________________________
> > --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
> >
> >
>
More information about the asterisk-users
mailing list