[asterisk-dev] Problem using the sip_header-function
    Michael Hirschbichler 
    sipp at hirschbichler.biz
       
    Thu May  8 10:21:26 CDT 2008
    
    
  
Watkins, Bradley schrieb:
> Michael Hirschbichler wrote:
> 
>> Yeah! You were right, the console output looks now this way:
>>   Executing [1226 at sip-incoming:2] NoOp("SIP/1226-081e44b0", 
>> "First Via: 
>> SIP/2.0/UDP 17.1.9.3:5060;branch=z9hG4bK8c22.c21cc2c2.0 Second Via: 
>> SIP/2.0/UDP 72.2.4.3;branch=z9hG4bK8c22.c21cc2c2.0 Third Via: 
>> SIP/2.0/UDP 
>> 17.1.7.1:5060;received=17.1.6.6;branch=z9hG4bK4ce3b398") in 
>> new stack
> 
> My only "solution" has been to grab the header(s) I need ASAP and store
> them in channel variables.  Then I can use them later whenever I
> actually need them.
> 
> This obviously may or may not work for you and your application, but
> it's the only thing I've got. :)
Hmm, as I am quite new to Asterisk, I do not really understand this 
timing problem:
In the extensions.conf, the lines look this way:
exten => 1226,1,NoOp(First Via: ${SIP_HEADER(VIA,1)} Second Via: 
${SIP_HEADER(VIA,2)} Third Via: ${SIP_HEADER(VIA,3)})
exten => 1226,n,agi,dosomething.pl|${SIP_HEADER(VIA,1)}
exten => 1226,n,agi,dosomething.pl|${SIP_HEADER(VIA,2)}
exten => 1226,n,agi,dosomething.pl|${SIP_HEADER(Via,3)}
so, in line 1, I still have the Vias available, in the following lines, 
they are gone?
Thanks and BR
Michael
    
    
More information about the asterisk-dev
mailing list