VoIP Mailing List Archives
Mailing list archives for the VoIP community |
|
View previous topic :: View next topic |
Author |
Message |
anuragrana31189 at gma... Guest
|
Posted: Thu Jun 26, 2014 10:19 am Post subject: [asterisk-users] Executing an AGI python script in Asterisk |
|
|
Hi All,
There is an option of starting the recording of call after the call is bridged. [ b option].
Is there any way of running an AGI script only if call is bridged otherwise not.
Thanks
--
Anurag Rana
http://newbie42.blogspot.in/
On the trampoline of life's experiences, Striving towards a saintly life in the midst of these materialistic turbulences. |
|
Back to top |
|
|
visser.rafael at gmail... Guest
|
Posted: Thu Jun 26, 2014 12:42 pm Post subject: [asterisk-users] Executing an AGI python script in Asterisk |
|
|
Hi Anurag.
I didn't undertand much you question. But you have a dial option to a macro when b answers
example...
exten => _+2XX!,n,Dial(SIP/sip.XX/+${DESTINO},20,rgM(acceptcall^${SESSIONID})S(${MAXCALLTIME}))
[macro-acceptcall]
; this macro is executed when b answers, requesting b if is interested to pay the bill
exten => s,1,AGI(your-agi-program.pl)
exten => s,2,others...
Regards..
rv
2014-06-26 11:19 GMT-04:00 Anurag Rana <anuragrana31189@gmail.com (anuragrana31189@gmail.com)>:
Quote: | Hi All,
There is an option of starting the recording of call after the call is bridged. [ b option].
Is there any way of running an AGI script only if call is bridged otherwise not.
Thanks
--
Anurag Rana
http://newbie42.blogspot.in/
On the trampoline of life's experiences, Striving towards a saintly life in the midst of these materialistic turbulences.
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
|
|
|
Back to top |
|
|
anuragrana31189 at gma... Guest
|
Posted: Thu Jun 26, 2014 12:57 pm Post subject: [asterisk-users] Executing an AGI python script in Asterisk |
|
|
Thanks Rafeal. This is what I needed.
But first line i.e.
exten => _+2XX!,n,Dial(SIP/sip.XX/+${DESTINO},20,rgM(acceptcall^${SESSIONID})S(${MAXCALLTIME}))
is very complicated.
I have very simple plan which is as below.
[context-demo]
exten=>1111,1,AGI ( pythonscript.py )
exten=>1111,1,Dial(SIP/1111)
that all.
Now can you please explain me in simpler form.
I am sorry. I am a newbie.
On Thu, Jun 26, 2014 at 11:12 PM, Rafael Visser <visser.rafael@gmail.com (visser.rafael@gmail.com)> wrote:
Quote: | Hi Anurag.
I didn't undertand much you question. But you have a dial option to a macro when b answers
example...
exten => _+2XX!,n,Dial(SIP/sip.XX/+${DESTINO},20,rgM(acceptcall^${SESSIONID})S(${MAXCALLTIME}))
[macro-acceptcall]
; this macro is executed when b answers, requesting b if is interested to pay the bill
exten => s,1,AGI(your-agi-program.pl)
exten => s,2,others...
Regards..
rv
2014-06-26 11:19 GMT-04:00 Anurag Rana <anuragrana31189@gmail.com (anuragrana31189@gmail.com)>:
Quote: | Hi All,
There is an option of starting the recording of call after the call is bridged. [ b option].
Is there any way of running an AGI script only if call is bridged otherwise not.
Thanks
--
Anurag Rana
http://newbie42.blogspot.in/
On the trampoline of life's experiences, Striving towards a saintly life in the midst of these materialistic turbulences.
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello
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 --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
|
--
Anurag Rana
http://newbie42.blogspot.in/
On the trampoline of life's experiences, Striving towards a saintly life in the midst of these materialistic turbulences. |
|
Back to top |
|
|
visser.rafael at gmail... Guest
|
Posted: Thu Jun 26, 2014 1:27 pm Post subject: [asterisk-users] Executing an AGI python script in Asterisk |
|
|
Ok.
in this link you will find some easy macro
http://www.voip-info.org/wiki/view/Asterisk+cmd+Dial
Explanation
exten => _+2XX!,n,Dial(SIP/sip.XX/+${DESTINATION},20,rgM(acceptcall^${SESSIONID})S(${MAXCALLTIME}))
Dial comand
to number DESTINATION
with timout of 20 seconds
r=ring sound
g= when hungs, continue with the dialplan (keep alive de application)
M=execute macro acceptcall passing the value SESSIONID
acceptcall=name of the macro
MAXCALLTIME is a value in second that the call is allowed to (prepaid)
So maybe you have to think somethin like this
exten=>1111,1,Dial(SIP/1111,,rgM(mymacro))
and at the end of your dialplan
[macro-mymacro]
exten=>s,1,AGI ( pythonscript.py )
It's not easy...
Good Luck.
2014-06-26 13:57 GMT-04:00 Anurag Rana <anuragrana31189@gmail.com (anuragrana31189@gmail.com)>:
Quote: | Thanks Rafeal. This is what I needed.
But first line i.e.
exten => _+2XX!,n,Dial(SIP/sip.XX/+${DESTINO},20,rgM(acceptcall^${SESSIONID})S(${MAXCALLTIME}))
is very complicated.
I have very simple plan which is as below.
[context-demo]
exten=>1111,1,AGI ( pythonscript.py )
exten=>1111,1,Dial(SIP/1111)
that all.
Now can you please explain me in simpler form.
I am sorry. I am a newbie.
On Thu, Jun 26, 2014 at 11:12 PM, Rafael Visser <visser.rafael@gmail.com (visser.rafael@gmail.com)> wrote:
Quote: | Hi Anurag.
I didn't undertand much you question. But you have a dial option to a macro when b answers
example...
exten => _+2XX!,n,Dial(SIP/sip.XX/+${DESTINO},20,rgM(acceptcall^${SESSIONID})S(${MAXCALLTIME}))
[macro-acceptcall]
; this macro is executed when b answers, requesting b if is interested to pay the bill
exten => s,1,AGI(your-agi-program.pl)
exten => s,2,others...
Regards..
rv
2014-06-26 11:19 GMT-04:00 Anurag Rana <anuragrana31189@gmail.com (anuragrana31189@gmail.com)>:
Quote: | Hi All,
There is an option of starting the recording of call after the call is bridged. [ b option].
Is there any way of running an AGI script only if call is bridged otherwise not.
Thanks
--
Anurag Rana
http://newbie42.blogspot.in/
On the trampoline of life's experiences, Striving towards a saintly life in the midst of these materialistic turbulences.
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello
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 --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
|
--
Anurag Rana
http://newbie42.blogspot.in/
On the trampoline of life's experiences, Striving towards a saintly life in the midst of these materialistic turbulences.
|
|
|
Back to top |
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|