[asterisk-dev] [Code Review]: adds a timeout argument to app_originate

sachin agarwal 1.sachinagarwal at gmail.com
Wed Jul 6 10:18:31 CDT 2011


hello


This is my first post and i don't know where to ask question. Please answer
my question.

Q. How we can make call parking multitenant for sccp line defined in
sccp.conf.

I have done that for SIP extensions and it is working fine.

Please help me.

Sachin






On Wed, Jul 6, 2011 at 8:39 PM, Tilghman Lesher <reviewboard at asterisk.org>wrote:

>    This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/1310/
>
> On July 6th, 2011, 8:35 a.m., *irroot* wrote:
>
>   /branches/1.8/CHANGES<https://reviewboard.asterisk.org/r/1310/diff/2/?file=17377#file17377line12> (Diff
> revision 2)
>
>   12
>
> --- Functionality changes from Asterisk 1.6.2 to Asterisk 1.8 ----------------
>
> 12
>
> --- Functionality changes from Asterisk 1.6.2 to Asterisk 1.8 ----------------
>
>  13
>
> ------------------------------------------------------------------------------
>
> 13
>
> ------------------------------------------------------------------------------
>
>  14
>
> 14
>
>  15
>
> SIP Changes
>
> 15
>
> SIP Changes
>
>  16
>
> -----------
>
> 16
>
> -----------
>
>    17
>
>  * Added extra argument to app_originate to set timeout
>
>   17
>
>  * Added preferred_codec_only option in sip.conf. This feature limits the joint
>
> 18
>
>  * Added preferred_codec_only option in sip.conf. This feature limits the joint
>
>   This should be under applications for 1.8 -> 1.10 :P made the same mistake recently
>
>  More correctly, the patch should be against trunk, not against the 1.8 branch.
>
>
>  On July 6th, 2011, 8:35 a.m., *irroot* wrote:
>
>   /branches/1.8/apps/app_originate.c<https://reviewboard.asterisk.org/r/1310/diff/2/?file=17378#file17378line128> (Diff
> revision 2)
>
> static int originate_exec(struct ast_channel *chan, const char *data)
>
>    128
>
> 	if (!ast_strlen_zero(args.timeout) && args.timeout > 0) {
>
>    129
>
> 		timeout = atoi(args.timeout);
>
>    130
>
> 		ast_log(LOG_NOTICE, "Timeout set to %d seconds.\n", timeout);
>
>    131
>
> 	}
>
>   perhaps a else if (...strlen_z...(...timeout)) and throw a warning if someone puts a invalid timeout ie alpha or neg
>
> rather use a debug or leave out the timeout set to mesasage
>
>  Please use sscanf to convert the argument to an integer.  This function can detect errors, whereas atoi() simply returns 0.  Additionally, the timeout should be limited to a positive non-zero value (or 0 switches to the 30 second default).
>
>
> - Tilghman
>
> On July 6th, 2011, 8:31 a.m., jacco wrote:
>   Review request for Asterisk Developers and irroot.
> By jacco.
>
> *Updated July 6, 2011, 8:31 a.m.*
> Description
>
> adds a timeout argument to app_originate
>
> This application originates an outbound call and connects it to a specified
> extension or application.  This application will block until the outgoing
> call fails or gets answered.  At that point, this application will exit with
> the status variable set and dialplan processing will continue.
> This application sets the following channel variable before exiting:
> ${ORIGINATE_STATUS}: This indicates the result of the call origination.
>     FAILED
>     SUCCESS
>     BUSY
>     CONGESTION
>     HANGUP
>     RINGING
>     UNKNOWN: In practice, you should never see this value.  Please report
>     it to the issue tracker if you ever see it.
>
> [Syntax]
> Originate(tech_data,type,arg1[,arg2[,arg3[,timeout]]])
>
> [Arguments]
> tech_data
>     Channel technology and data for creating the outbound channel.
>     For example, SIP/1234.
> type
>     This should be 'app' or 'exten', depending on whether the outbound
>     channel should be connected to an application or extension.
> arg1
>     If the type is 'app', then this is the application name.  If the
>     type is 'exten', then this is the context that the channel will be sent
>     to.
> arg2
>     If the type is 'app', then this is the data passed as arguments to
>     the application.  If the type is 'exten', then this is the extension that
>     the channel will be sent to.
> arg3
>     If the type is 'exten', then this is the priority that the channel
>     is sent to.  If the type is 'app', then this parameter is ignored.
> timeout
>     Timeout in seconds. Default is 30 seconds.
>
>   Diffs
>
>    - /branches/1.8/CHANGES (326468)
>    - /branches/1.8/apps/app_originate.c (326468)
>
> View Diff <https://reviewboard.asterisk.org/r/1310/diff/>
>
> --
> _____________________________________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> asterisk-dev mailing list
> To UNSUBSCRIBE or update options visit:
>   http://lists.digium.com/mailman/listinfo/asterisk-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20110706/0800c8b1/attachment.htm>


More information about the asterisk-dev mailing list