[asterisk-dev] SIP_HEADER in dialplan from different states of SIP dialog?

Alex Balashov abalashov at evaristesys.com
Mon Jul 7 17:06:02 CDT 2008


Greetings,

I've got a problem I was hoping someone from the developers' community 
could help me with.

I'm running outbound calls using a B2BUA product for call progress 
detection that sets the disposition of the call in the 200 OK sent back 
to Asterisk in response to its INVITE.

Is there some way I can get at this value either in the dial plan, or in 
AGI?

Of course, I realise that deep inspection of particular states of the 
SIP dialog aren't really meant to be possible from within something as 
high-level as the dial plan.  However, what I assumed was that if I punt 
the execution to a macro when the call is picked up using the M argument 
to Dial(), e.g.

    exten => ...,n,Dial(SIP/num at GW,M(outbound_macro))

Then, because, in practise that macro is called on pickup (i.e. 200 OK), 
I would have assumed that the message from which SIP_HEADER() is parsing 
the headers is the 200 OK.

But it's not.  My tests show it's still looking at the headers in the 
initial outgoing INVITE.

So, the question is - without hacking the code, is there some way I can 
read the value of a header that is returned in a 200 OK in an INVITE dialog?

Cheers,

-- Alex

-- 
Alex Balashov
Evariste Systems
Web    : http://www.evaristesys.com/
Tel    : (+1) (678) 954-0670
Direct : (+1) (678) 954-0671
Mobile : (+1) (706) 338-8599



More information about the asterisk-dev mailing list