Sponsor: VoiceMeUp - Corporate & Wholesale VoIP Services

VoIP Mailing List Archives
Mailing list archives for the VoIP community
 SearchSearch 

[asterisk-users] Call a subroutine via Originate?


 
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> Asterisk Users
View previous topic :: View next topic  
Author Message
johnkiniston at gmail.com
Guest





PostPosted: Tue May 03, 2016 4:24 pm    Post subject: [asterisk-users] Call a subroutine via Originate? Reply with quote

Howdy everyone,


I'm writing a little click to dial type tool and I've run into a snag where my Originate command needs to call a Sub routine to do a database lookup and some other stuff.


I can't seem to get the syntax right to call Gosub with Originate


Just testing with the command line I've been unable to make it work with any of these attempts:

originate PJSIP/johntest application Gosub sub-callout s,1

originate PJSIP/johntest application Gosub sub-callout(s,1)


originate PJSIP/johntest application Gosub (sub-callout,s,1)


What Syntax should I be using?


And if it helps I'll be calling this via AMI over https.


Thanks!
--
A human being should be able to change a diaper, plan an invasion, butcher a hog, conn a ship, design a building, write a sonnet, balance accounts, build a wall, set a bone, comfort the dying, take orders, give orders, cooperate, act alone, solve equations, analyze a new problem, pitch manure, program a computer, cook a tasty meal, fight efficiently, die gallantly. Specialization is for insects.
---Heinlein
Back to top
bferrell at baywinds.org
Guest





PostPosted: Tue May 03, 2016 4:34 pm    Post subject: [asterisk-users] Call a subroutine via Originate? Reply with quote

use the macro construct and return from the macro

On 5/3/16 2:24 PM, John Kiniston wrote:

Quote:
Howdy everyone,


I'm writing a little click to dial type tool and I've run into a snag where my Originate command needs to call a Sub routine to do a database lookup and some other stuff.


I can't seem to get the syntax right to call Gosub with Originate


Just testing with the command line I've been unable to make it work with any of these attempts:

originate PJSIP/johntest application Gosub sub-callout s,1

originate PJSIP/johntest application Gosub sub-callout(s,1)


originate PJSIP/johntest application Gosub (sub-callout,s,1)


What Syntax should I be using?


And if it helps I'll be calling this via AMI over https.


Thanks!
--
A human being should be able to change a diaper, plan an invasion, butcher a hog, conn a ship, design a building, write a sonnet, balance accounts, build a wall, set a bone, comfort the dying, take orders, give orders, cooperate, act alone, solve equations, analyze a new problem, pitch manure, program a computer, cook a tasty meal, fight efficiently, die gallantly. Specialization is for insects.
---Heinlein












Back to top
Display posts from previous:   
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> Asterisk Users All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
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

VoiceMeUp - Corporate & Wholesale VoIP Services