login | register
Fri 09 of May, 2008 [15:18 UTC]

voip-info.org

Search with Google
Search this site with Google. Results may not include recent changes.
 
Google Ads
Shoutbox
  • Nick Barnes, Fri 09 of May, 2008 [11:36 UTC]: Christopher - yesterday I tried an Asterisk install on a CentOS 5.1 box with stock GUI and it all worked fine. Sorry I can't help.
  • aero, Fri 09 of May, 2008 [08:20 UTC]: can someone help me out on this, i tried to play some sound files on my asterisk box and this is the error message i got. WARNING[4429]: format_wav.c:169 check_header: Unexpected freqency 22050 May 8 11:17:39 WARNING[4433]: codec_gsm.c:194 gsmtolin_fra
  • Christopher Faust, Thu 08 of May, 2008 [14:15 UTC]: I beleive that I may have to change something in the xserver configuration. Please advise
  • Christopher Faust, Thu 08 of May, 2008 [14:14 UTC]: Everything was perfect. In the bios I have increased the memory allocated Still receive input not supported on my display.
  • Christopher Faust, Thu 08 of May, 2008 [14:13 UTC]: This would not be my main box. I am doing some testing to see if I can install zaptel and asterisk 1.4 on a full centos 5.1 box with development software Its bizzare, because before I went through the asterisk and zaptel installation everything was perfe
  • Nick Barnes, Thu 08 of May, 2008 [13:44 UTC]: Christopher - I can't see any way in which an Asterisk installation would muck your GUI, but remember that it is advised not to use a GUI on an Asterisk box anyway.
  • Christopher Faust, Wed 07 of May, 2008 [15:28 UTC]: When I try to startx I ge input not supported. Though before installing asterisk I had no video issue to start the GUI
  • Christopher Faust, Wed 07 of May, 2008 [15:26 UTC]: Hi Nick, I got centos 5.1 and asterisk up But now I cannot start startx I have set the depth from 24 to 16 for the video i810 driver for the i845 on my netvista machine but I cannot start GNOME. Please advise
  • Nick Barnes, Wed 07 of May, 2008 [10:01 UTC]: Howard - You'll need to provide a lot more information if you really want help.
  • Nick Barnes, Wed 07 of May, 2008 [10:00 UTC]: Christopher - Search the Wiki and you'll find a page I wrote detailing exactly what you have to do for Asterisk 1.4 + CentOS 5.1.
Server Stats
  • Execution time: 0.35s
  • Memory usage: 2.24MB
  • Database queries: 29
  • GZIP: Disabled
  • Server load: 1.17

Asterisk Manager API Action Originate

Action: Originate
Parameters:
  • Channel: Channel on which to originate the call (The same as you specify in the Dial application command)
  • Context: Context to use on connect (must use Exten & Priority with it)
  • Exten: Extension to use on connect (must use Context & Priority with it)
  • Priority: Priority to use on connect (must use Context & Exten with it)
  • Timeout: Timeout (in milliseconds) for the originating connection to happen(defaults to 30000 milliseconds)
  • CallerID: CallerID to use for the call
  • Variable: Channels variables to set (max 32). Variables will be set for both channels (local and connected).
  • Account: Account code for the call
  • Application: Application to use on connect (use Data for parameters)
  • Data : Data if Application parameter is used
  • Async: For the origination to be asynchronous (allows multiple calls to be generated without waiting for a response)
  • ActionID: The request identifier. It allows you to identify the response to this request. You may use a number or a string. Useful when you make several simultaneous requests.

Sequence of events: first the Channel is rung. Then, when that answers, the Extension is dialled within the Context to initiate the other end of the call. Note that the Timeout only applies to the initial connection to the Channel; any timeout for the other end can be specified, for instance in a Dial command in the definition of the Context.

Example(Placing a call from a SIP channel to an extension, this will cause the outside call not to be placed until the SIP channel has picked up):


Action: Originate
Channel: SIP/101test
Context: default
Exten: 8135551212
Priority: 1
Callerid: 3125551212
Timeout: 30000
Variable: var1=23|var2=24|var3=25
ActionID: ABC45678901234567890

Where Extension 8135551212 is a local an outbound number
The above example also shows how to set channel variables in an Originate request.

Note: You might have heard that in Asterisk 1.2 variables are no longer separated by |, rather each one has its own line. Well that is not true or maybe it has been that way for a while. Asterisk 1.2 current source code suggests that variable must be separated with | (check the function astman_get_variables).

The above example will also hangup if the SIP/101test channel is not picked up in 30 seconds.



Example(Placing a call from an outgoing channel to a local extension, this will cause the local extension not to ring until the Zap channel has picked up):

Action: Originate
Channel: Zap/g2/8135551212
Context: default
Exten: 101
Priority: 1
Callerid: 3125551212

Where Extension 101 is a local SIP phone extension

Example (executing system command):

Action: Originate
Channel: Local/1@dummy
Application: System
Data: /path/to/script

Tip: if you want the Channel end to connect to an arbitrary extension and context, specify a Local channel.




Created by flobi, Last modification by Lawrence D'Oliveiro on Sat 26 of Apr, 2008 [12:31 UTC]

Comments Filter

Variable Length limitation

by asiby on Monday 28 of January, 2008 [06:20:10 UTC]
Beware of a limitation when passing multiple variables to the Originate Command. The length of the string var1=value1|var2=value2|...|varn=valuen is limited even if the number of variable is under 32. I haven't calculated its limit, but my agi scripts were acting strange and loosing some values with a variable string containing 250 characters. I hope this helps.

Account(code) available only on DESTINATION channel

by Mindaugas Kezys on Monday 21 of January, 2008 [12:39:38 UTC]
Testing shows that Account parameter is not available in SOURCE channel (Call Leg 1) but only in DESTINATION channel (Call Leg 2).

I had to send ACCOUNTCODE using Variable parameter to SOURCE channel (Call Leg 1).

timeout not work.and how to detect hookoff

by leatarget on Sunday 30 of September, 2007 [05:31:50 UTC]
hi,
  I'm trying to use the originate command to make a auto-dial-out.
first.
I telnet host 5038.
my command is :
action: Originate
channel: ZAP/1/xxxxxxx
context: default1
exten: s
priority: 1
callerid: ss<804>
timeout: 30000
and the extension is
default1
exten=>s,1,playback(vm-goodbye)
exten =>s,n,hangup
the problem is whatever I set the timeout .it can't work.if i don't hookoff the phone.the extension always play.

Using Asterisk API to make a callback webpage

by kisecure on Saturday 07 of July, 2007 [18:20:55 UTC]
Hi,

I'm trying to use the originate command to make a web page with a "callback" field. The idea is that someone can enter is phone number to be automatically called by asterisk. Then, this call have to be placed in a queue. Every things work fine but, the only problem is that the music on hold in the queue doesn't start ... I don't know why.
The originate command sent trough the manager interface redirect the call to the context where I defined the queue.

Any ideas ?

Thanks
Benoit.


Using Asterisk API to duplicate the keyboard of a hw phone.

by Enrico Pasqualotto on Sunday 28 of January, 2007 [22:33:18 UTC]
Hi all, like a subject I want to duplicate the keyboard of one hw voip phone in a web browser using the asterisk API.
I do this with php script, user compose the number of second phone in your browser, the phone near PC ring and after picked up the cornet the call is make to second phone.

Exist a way to do this: User keep up the cornet before compose the number in the browser?
I don't want to make first phone ring, but I don't know how do this?

Any ideas?

Re: Matching Originate with Newchannel

by ubi on Wednesday 13 of December, 2006 [12:01:51 UTC]
Hi,
A possible method to match events with the Originate command: Create a unique ID, and pass it with a name to Variable parameter of Originate. When you handle the events you can use command GetVar for getting the value of your variable on the channel. You will find your ID in it, if they matched. You can get the value of your variable also in the dialplan.

Rubification

by Derek F. on Thursday 30 of November, 2006 [22:23:30 UTC]
Hey all, just wanted to post a little ruby script I wrote to originate calls to the outboundmsg1 context that is posted elsewhere in the wiki. Thought it may be of use to someone.


<code>
require "socket"

number=(if ARGV.length == 1; ARGV.shift; else exit; end)
STDOUT.flush
s = TCPsocket.open('localhost', 5038)

s.write <<EOF
Action: Login
Username: admin
Secret: <your admin secret defined in /etc/asterisk/manager.conf>

Action: Originate
Channel: Zap/g0/#{number}
MaxRetries: 5
RetryTime: 300
WaitTime: 45
Context: outboundmsg1
Extension: s
Priority: 1


Action: Logoff

EOF

s.close
</code>

Matching Originate with Newchannel

by Tigran on Monday 30 of October, 2006 [18:01:09 UTC]
Hi there,

Does anyone know how to match an Originate action with the corresponding Newchannel events. For example, when using asynchronous originate with ActionID set to some value OriginateFailure event does return the ActionID of the corresponding originate Action, but other evets for eg. Newchannel, Cdr etc. doesn't have ActionID so it is imposible to determine which Newchannel event was generated by which Originate action. Does anyone know how to solve this problem?

Thanks,
Tigran

Ping the server after login

by xutom2006 on Monday 30 of October, 2006 [10:24:07 UTC]
I have used the command "sendto(clifd, bufLogin, BUFFER_SIZE, 0, (struct sockaddr_in *)&servaddr, socklen))" in C program and the bufLogin is :"Action: login\r\nUsername: admin\r\nSecret: admin\r\n\r\n" , and the debug message(is "Response: Success
Message: Authentication accepted") of the remote asterisk server shows that i have logined on successfully. Now i again run another command "sendto(clifd, bufPing, strlen(bufPing), 0, (struct sockaddr_in *)&servaddr, socklen))" and the bufPing is "Action: Ping\r\nParameters: None\r\n\r\n" , this time i get the result :Response: Error
Message: Missing action in request" ,and my /var/log/asterisk/full contains the following message:"Oct 30 03:21:43 DEBUG2627 manager.c: Manager received command '' ",the ping command is NULL ? Why? Can someone help me?

thanks in advance... xutom

Ping the server after login

by xutom2006 on Monday 30 of October, 2006 [08:29:12 UTC]
I have used the command "sendto(clifd, bufLogin, BUFFER_SIZE, 0, (struct sockaddr_in *)&servaddr, socklen))" in C program and the bufLogin is :"Action: login\r\nUsername: admin\r\nSecret: admin\r\n\r\n" , and the debug message(is "Response: Success
Message: Authentication accepted") of the remote asterisk server shows that i have logined on successfully. Now i again run another command "sendto(clifd, bufPing, strlen(bufPing), 0, (struct sockaddr_in *)&servaddr, socklen))" and the bufPing is "Action: Ping\r\nParameters: None\r\n\r\n" , this time i get the result :Response: Error
Message: Missing action in request" ,and my /var/log/asterisk/full contains the following message:"Oct 30 03:21:43 DEBUG2627 manager.c: Manager received command '' ",the ping command is NULL ? Why? Can someone help me?

thanks in advance... xutom

Please update this page with new information, just login and click on the "Edit" or "Add Comment" button above. Get a free login here: Register Thanks! - support@voip-info.org

Page Changes | Comments

Sponsored by:

Terms of Service Privacy Policy
© 2003-2008 VOIP-Info.org LLC

Powered by bitweaver