Sponsor: VoiceMeUp - Corporate & Wholesale VoIP Services

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

[asterisk-users] Problem using the sip_header-function


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





PostPosted: Wed May 07, 2008 9:24 am    Post subject: [asterisk-users] Problem using the sip_header-function Reply with quote

Hi all,

I want to get the first three Via-Header of an INVITE request to commit
them into an AGI script:
In the documentation is stated, that there are two possibilities to call
this function, the first one using only one parameter for the
SIP_HEADER-function is working:

exten => 1226,n,agi,checksomething.pl|${SIP_HEADER(VIA)}
I get the first Via-header:
---------------------------------------------------------
Executing [1226 at sip-incoming:2] AGI("SIP/1226-081d65f0",
"checksomething.pl|SIP/2.0/UDP
21.1.7.1:5060;branch=z9hG4bK845e.ce916cc.0") in new stack
-- Launched AGI Script /usr/share/asterisk/agi-bin/checksomething.pl
-- AGI Script checksomething.pl completed, returning 0
---------------------------------------------------------

The other possibility is to add a second parameter to define, which of
the Via-header I want:
exten => 1226,n,agi,checksomething.pl|${SIP_HEADER(VIA,1)}
exten => 1226,n,agi,checksomething.pl|${SIP_HEADER(VIA,2)}
exten => 1226,n,agi,checksomething.pl|${SIP_HEADER(VIA,3)}
This does not work, I get an empty string:
---------------------------------------------------------
-- Executing [1226 at sip-incoming:3] AGI("SIP/1226-081d65f0",
"checksomething.pl|") in new stack
-- Launched AGI Script /usr/share/asterisk/agi-bin/checksomething.pl
-- AGI Script checksomething.pl completed, returning 0
-- Executing [1226 at sip-incoming:4] AGI("SIP/1226-081d65f0",
"checksomething.pl|") in new stack
-- Launched AGI Script /usr/share/asterisk/agi-bin/checksomething.pl
-- AGI Script checksomething.pl completed, returning 0
-- Executing [1226 at sip-incoming:5] AGI("SIP/1226-081d65f0",
"checksomething.pl|") in new stack
-- Launched AGI Script /usr/share/asterisk/agi-bin/checksomething.pl
-- AGI Script checksomething.pl completed, returning 0
---------------------------------------------------------

What am I doing wrong?

I am using Asterisk 1.4.17~dfsg-2ubuntu1

br and thanks in advance
Michael
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