Re: [asterisk-users] when we try to add CURL code to file channel.c we get an error - undefined reference to curl_easy_init

2008-03-03 Thread Prashant Sharma
Hi Greyman,

Thank you very much for reply.
But unfortunately even after adding these lines in the file 'channel.c'
didn't help me. It gives 'undefined reference' for all curl functions.
Should I check availability of any other file for these errors?


Thanks

 Regards

Prashant Sharma

On Mon, Mar 3, 2008 at 2:53 PM, Grey Man [EMAIL PROTECTED] wrote:

 On Mon, Mar 3, 2008 at 6:27 AM, Prashant Sharma [EMAIL PROTECTED]
 wrote:
  Hi Tilghman,
 
  Thanks for taking interest in my problem.
 
  I just want to send a http post request to my website without changing
 the
  dial plan. So I have added slightly modified http post code and some
 other
  code to channel.c got from curl/curl.h.
  After adding the code I compiled the asterisk code and got the error:
 
  channel.o(.text+0x): channel.c:: undefined reference to
  'curl_global_init'
 
 

 Try adding the following above the first include in channel.c. It's
 what I've done in app_dial.c to get the Curl library to link properly.

 /*** MODULEINFO
dependCurl/depend
  ***/

 Regards,

 Greyman.

 ___
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --

 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 --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] when we try to add CURL code to file channel.c we get an error - undefined reference to curl_easy_init

2008-03-03 Thread Prashant Sharma
Hi,


I'm trying to make asterisk detect some DTMF digits during a call and post
them (can't use WaitExten or Features.conf).
Regards,

Prashant

On Mon, Mar 3, 2008 at 6:23 PM, Tilghman Lesher 
[EMAIL PROTECTED] wrote:

 On Monday 03 March 2008 00:27:32 Prashant Sharma wrote:
  I just want to send a http post request to my website without changing
 the
  dial plan.

 This doesn't make any sense.  The dialplan is among the easiest and least
 bug-prone ways of adding a curl POST call.  Why would you want to code
 this
 directly into channel.c, where it does not belong, instead of making a
 very
 simple change to your dialplan?

 Don't explain the mechanics.  Explain why you're doing it.

 --
 Tilghman

 ___
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --

 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 --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] when we try to add CURL code to file channel.c we get an error - undefined reference to curl_easy_init

2008-03-03 Thread Prashant Sharma
Hi,


Thanks but using the logger.c approach will allow the IVR to receive the
digits in case 's' extension answers the call. That might result in the dial
plan dialing an extension or going to the 'i' extension and hanging up.

Ssorry about the confusion.



Thanks  Regards

Prashant Sharma


On Mon, Mar 3, 2008 at 10:43 PM, Tilghman Lesher 
[EMAIL PROTECTED] wrote:

 On Monday 03 March 2008 07:18, Prashant Sharma wrote:
  I'm trying to make asterisk detect some DTMF digits during a call and
 post
  them (can't use WaitExten or Features.conf).

 I would suggest that you implement that in logger.c and configure a line
 to
 send logs to an HTTP POST (via logger.conf), with the
 pbx_substitute_variables_helper function, using the ${CURL()} function
 directly.  You may need to preload = func_curl.so in modules.conf, but
 that will work well.

 --
 Tilghman

 ___
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --

 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 --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] when we try to add CURL code to file channel.c we get an error - undefined reference to curl_easy_init

2008-03-02 Thread Prashant Sharma
Hi Tilghman,

Thanks for taking interest in my problem.

I just want to send a http post request to my website without changing the
dial plan. So I have added slightly modified http post code and some other
code to channel.c got from curl/curl.h.
After adding the code I compiled the asterisk code and got the error:

channel.o(.text+0x): channel.c:: undefined reference to
'curl_global_init'


Thanks

Regards,

Prashant Sharma


On Friday 29 February 2008 08:10:40 Prashant Sharma wrote:
* When I try to add CURL code to file channel.c we get an error - undefined
** reference to curl_easy_init.
** I've added #include curl/curl.h so the code compiles fine.
** this error is generated by the linker, even though func_curl.c is
compiled
** and linked with no errors
** My asterisk machine have curl and curl-devel 7.12 installed.
** Asterisk version i am using is 1.4.17.
*
Let's start with, why are you adding curl code to channel.c?

-- 
Tilghman
___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

[asterisk-users] when we try to add CURL code to file channel.c we get an error - undefined reference to curl_easy_init

2008-02-29 Thread Prashant Sharma
 Hi all,

When I try to add CURL code to file channel.c we get an error - undefined
reference to curl_easy_init.
I've added #include curl/curl.h so the code compiles fine.
this error is generated by the linker, even though func_curl.c is compiled
and linked with no errors
My asterisk machine have curl and curl-devel 7.12 installed.
Asterisk version i am using is 1.4.17.

Any help will be appriciated.


Thanks  Regards

Prashant Sharma
___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

[asterisk-users] How to get called number in featuremap

2008-01-30 Thread Prashant Sharma
Hi,

I am new to asterisk configuration.
I want to get called number in features.conf.
I am defining a feature in features.conf and that feature got executed on
pressing a particular DTMF key sequence.
As I want to execute my own application on pressing that key which will use
called number.

testfeature = 3,peer,AGI,StoreNumber|CalledNumber

Here I want to use called number in place of CalledNumber tag. When I use
any variable *${DIALEDPEERNUMBER} *then it does not resolve the variable in
features.conf.

if i use following then it does not work.

testfeature = 3,peer,AGI,StoreNumber|*${DIALEDPEERNUMBER}

*StoreNumber is my own application that stores the number.
*
Any idea as how I can use CalledNumber in features.conf?


Please help.

Thanks in Advance

Regards

Prashant
___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

[asterisk-users] Incoming calls on PSTN trunk not disconnected (bsnl, india)

2008-01-16 Thread Prashant Sharma
I am trying to configure Asterisk for BSNL, india network.
I have successfully configured it for outgoing calls.

When any outside number make any call to trunk then it receives the call
properly but when the call is disconnected by inside extension then outside
phone does not get a busy tone.

Asterisk incoming call log:

-- Executing [EMAIL PROTECTED]:2] Dial(Zap/4-1, Zap/1) in new stack
-- Called 1
-- Zap/1-1 is ringing
-- Zap/1-1 is ringing
[Jan 17 11:53:54] WARNING[5030]: chan_zap.c:4153 zt_handle_event: Didn't
finish Caller-ID spill.  Cancelling.
-- Zap/1-1 is ringing
-- Zap/1-1 is ringing
-- Zap/1-1 is ringing
-- Zap/1-1 answered Zap/4-1
-- Native bridging Zap/4-1 and Zap/1-1
-- Hungup 'Zap/1-1'
  == Spawn extension (incoming, s, 2) exited non-zero on 'Zap/4-1'
-- Hungup 'Zap/4-1'


My system information is as follows:

OS and components:

CentOS 4.5
Asterisk 1.4.17
Zaptel 1.4.7.1
Libpri 1.4.3

extensions.conf
[globals]
OUTBOUNDTRUNK=Zap/4

[incoming]
; incoming calls from FXO
exten = s,1,Dial(Zap/1)

[outbound-dialing]
;Outbound dialing
exten = _X.,1,Verbose(1|Outside number|${EXTEN})
exten = _X.,n,Dial(${OUTBOUNDTRUNK}/${EXTEN})

[phones]
include = outbound-dialing

zaptel.conf file:

fxsks=4
fxoks=1
loadzone=in
defaultzone=in

# /sbin/ztcfg -vv this linux command gives following output:

Zaptel Version: 1.4.7.1
Echo Canceller: MG2
Configuration
==

Channel map:

Channel 01: FXO Kewlstart (Default) (Slaves: 01)
Channel 04: FXS Kewlstart (Default) (Slaves: 04)

2 channels to configure.

zapata.conf file looks like:
[trunkgroups]
; Define

[channels]
;hardware channels
;default
usecallerid=yes
hidecallerid=no
echocancel=yes
echotraining=yes
callwaiting=no
immediate=no
cidstart=ring
cidsignalling=dtmf

;define channels
signalling=fxo_ks ;Use FXO signaling for FXS channel
context=phones
channel = 1

signalling=fxs_ks ;Use FXS signaling for FXO channel
context=incoming
channel = 4
Any sort of help will be appreciated.

Thanks in advance

Prashant
___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users