Sponsor: VoiceMeUp - Corporate & Wholesale VoIP Services

VoIP Mailing List Archives
Mailing list archives for the VoIP community
 SearchSearch 

[asterisk-users] How to obtain SIPCHANINFO variables within custom application?


 
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> Asterisk Users
View previous topic :: View next topic  
Author Message
mkezys at gmail.com
Guest





PostPosted: Tue Mar 25, 2008 12:44 pm    Post subject: [asterisk-users] How to obtain SIPCHANINFO variables within Reply with quote

Thank you!

You saved my day!

Regards,
Mindaugas Kezys
http://www.kolmisoft.com
Quote:
-----Original Message-----
From: asterisk-users-bounces at lists.digium.com [mailto:asterisk-users-
bounces at lists.digium.com] On Behalf Of Tilghman Lesher
Sent: Tuesday, March 25, 2008 5:43 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] How to obtain SIPCHANINFO variables
within custom application?

On Tuesday 25 March 2008 07:51:13 Mindaugas Kezys wrote:
Quote:
How can I get peerip, recvip, from, uri, useragent, peername,
t38passthrough variables in (within) my custom Asterisk application?

I can't use chan_sip.c internal structures (such as sip_pvt) in my
custom
Quote:
application, because there's no chan_sip.h and I can't include it
into my
Quote:
application (maybe there's other way?).

I can do like this:

exten => _X,1,Set(PEERIP=${SIPCHANINFO(peerip)})
exten => _X,2,custom_app

char buf[80];
pbx_substitute_variables_helper(chan, "${SIPCHANINFO(peerip)}", buf,
sizeof(buf));

BTW, this is exactly how res_config_curl works.

--
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
Back to top
Display posts from previous:   
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> Asterisk Users All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

VoiceMeUp - Corporate & Wholesale VoIP Services