[Freeswitch-users] Extracting headers from REFER in dialplan?

Brian West brian at freeswitch.org
Thu Nov 11 11:31:19 PST 2010


put a bounty in jira I guess...

/b

On Nov 11, 2010, at 1:12 PM, Marc Lewis wrote:

> 
> Is there any way to extract additional headers from the dialplan when FS 
> receives a REFER message?
> 
> The application I'm working on takes an incoming call, bridges it to 
> another SIP server.  The SIP server does some things with the call, then 
> sends a REFER message back to FS with an extra header that I would like 
> to use in the dialplan.  The header shows in a trace, but not in any of 
> the variables that I have access to.
> 
> For example, the REFER message looks something like this (numbers and 
> addresses changed to protect the innocent):
> 
>    REFER 
> sip:gw+testserver at 192.168.1.95:5060;tport=tcp;transport=tcp;gw=testserver SIP/2.0
>    FROM: <sip:4255551212 at 192.168.1.155>;epid=D4A38B23EF;tag=81a8713cf
>    TO: <sip:testserver at 192.168.1.155;transport=tcp>;tag=UNBQ363BgNvHa
>    CSEQ: 1 REFER
>    CALL-ID: b1aaff2e-6869-122e-53b9-001b216b53af
>    MAX-FORWARDS: 70
>    VIA: SIP/2.0/TCP 192.168.1.155:5060;branch=z9hG4bK606d7bc
>    CONTACT: 
> <sip:testing01:5060;transport=Tcp;maddr=192.168.1.155;ms-opaque=eaed293d6f65e314>;automata
>    CONTENT-LENGTH: 0
>    REFER-TO: <sip:14255551213 at 192.168.1.95>
>    REFERRED-BY: <sip:4255551212 at 192.168.1.155>
>    X-Information: my dog has fleas
> 
> 
> I would then like to have something like this in the 4255551213 extension:
> 
> <action application="eval" 
> data="${chat(jingle|testing at fs.jabber.server|agent at another.jabber.server|${caller_id_number} 
> to Queue - ${variable_sip_h_X-Information})}"/>
> 
> The problem is the "X-Information" header is not exported by sofia as 
> far as I can tell.
> 
> Is there any way to get this variable via the XML dialplan?
> 
> Thanks in advance.
> 
>  - Marc
> 
> 
> _______________________________________________
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org




More information about the FreeSWITCH-users mailing list