# Set timeout to curl function

**URL:** <https://community.asterisk.org/t/set-timeout-to-curl-function/42226>\
**Category:** Asterisk Support\
**Created:** [March 22, 2013, 2:50pm UTC](https://community.asterisk.org/t/set-timeout-to-curl-function/42226 "2013-03-22T14:50:52Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/asterisk/original/2X/4/475d0c889911cfb84ac4881ad6df8b523e3f9105.png) [@system](https://community.asterisk.org/u/system)\
**Post date:** [March 22, 2013, 2:50pm UTC](https://community.asterisk.org/t/set-timeout-to-curl-function/42226/1 "2013-03-22T14:50:52Z")

</div>

Hi

I use curl in may dialplan to acess web system,  
but when the comand fail , my call stop  
asterisk still trying execute curl at my web system and not continue with out curl response

soo Iḿ loking for a comand that sets timeout to curl system  
if curl don’t response at 10 second go to next dialplan line

some body can help-me ?

thanks

---

<div class="post-metadata">

**Author:** ![omid.mohajerani](https://sea1.discourse-cdn.com/asterisk/user_avatar/community.asterisk.org/omid.mohajerani/32/32_2.png) [@omid.mohajerani](https://community.asterisk.org/u/omid.mohajerani)\
**Post date:** [March 22, 2013, 3:33pm UTC](https://community.asterisk.org/t/set-timeout-to-curl-function/42226/2 "2013-03-22T15:33:38Z")

</div>

you can use PHPAGI and use work with URLS in PHP  
then you can set different types of timeouts in your application .  
[php.net/manual/en/function.curl-setopt.php](http://php.net/manual/en/function.curl-setopt.php)
