[asterisk-dev] Custome Header reader in Asterisk-12

Jehanzaib Younis jehanzaib_kiani at hotmail.com
Mon Nov 11 16:17:34 CST 2013


Hi,
by the way here was the error i had, i had the error on the other console still opened :)

In file included from res_sip_auto_answer.c:6:
/usr/src/asterisk-12.0.0-beta1/include/asterisk/res_pjsip_session.h:138: error: expected declaration specifiers or ‘...’ before ‘pjmedia_sdp_session’
In file included from res_sip_auto_answer.c:6:
/usr/src/asterisk-12.0.0-beta1/include/asterisk/res_pjsip_session.h:340: error: expected declaration specifiers or ‘...’ before ‘pjsip_inv_session’
/usr/src/asterisk-12.0.0-beta1/include/asterisk/res_pjsip_session.h:490: warning: ‘enum ast_sip_session_refresh_method’ declared inside parameter list
/usr/src/asterisk-12.0.0-beta1/include/asterisk/res_pjsip_session.h:490: warning: its scope is only this definition or declaration, which is probably not what you want
res_sip_auto_answer.c: In function ‘auto_answer_outgoing_request’:
res_sip_auto_answer.c:48: warning: implicit declaration of function ‘pjsip_generic_hdr_create’
res_sip_auto_answer.c:48: warning: assignment makes pointer from integer without a cast
make[1]: *** [res_sip_auto_answer.o] Error 1
make: *** [res] Error 2


Date: Mon, 11 Nov 2013 15:15:28 -0600
From: mjordan at digium.com
To: asterisk-dev at lists.digium.com
Subject: Re: [asterisk-dev] Custome Header reader in Asterisk-12


On Mon, Nov 11, 2013 at 3:11 PM, Jehanzaib Younis <jehanzaib_kiani at hotmail.com> wrote:




Thank you for the reply.
I dont get any error.
Actually there are 2 issues here, by default i cant see res_sip_session.h file anywhere 
can you please test the asterisk 12? i am sure its not working for any one. espacially the link https://wiki.asterisk.org/wiki/display/AST/Writing+a+SIP+Session+Supplement

the script is not compiled because dependencies are not installed. can you please please have a look?



Well, you should get an error if you're compiling the sample code on that wiki page. gcc should be complaining that it can't find "res_sip_session", as it should be "res_pjsip_session.h", not "res_sip_session.h". The code on the wiki page wasn't updated after the great sip -> pjsip migration of 2013; it probably needs a few other minor tweaks.

That being said, while someone will be along to make those updates, you should be able to get the sample code there compiling with a few minor adjustments. A few of the other public functions used in that sample code will need similar name changes - as an exercise, you should compare the public function calls in that sample code with the actual function calls in res_pjsip_session.h. That should help you explore some of the API available to you.

Matt
-- 
Matthew Jordan
Digium, Inc. | Engineering Manager445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at: http://digium.com & http://asterisk.org


-- 
_____________________________________________________________________
-- 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/20131112/63a51516/attachment.html>


More information about the asterisk-dev mailing list