[OpenSIPS-Users] Add "DIVERSION" hdr

Max Mühlbronner mm at 42com.com
Thu Jul 28 15:24:18 CEST 2011


Hi,

sure, it is possible to add any header.

append_hf("Diversion: 
<tel:3950>;reason=no-answer;screen=no;privacy=off\r\n");

obviously it makes more sense to insert some variables from your script.
e.g: if there is a $var(diversion) set which contains "3950" you could 
use this instead :

append_hf("Diversion: 
<tel:$var(diversion)>;reason=no-answer;screen=no;privacy=off\r\n");



BR

Max M.


Am 28.07.2011 15:10, schrieb spady:
> Hi guys, I was wondering if opensips is able to add a "DIVERSION" header as
> can do Asterisk.
> I read on Forum about CPL module that can do something similar. Is there not
> a function into opensips's core?
> What i would like to achive is an invite like this:
>
> INVITE sip:3999 at 10.9.101.161:5065 SIP/2.0
> Via: SIP/2.0/TCP 172.16.52.123:5060;branch=z9hG4bK4b8d050a
> Max-Forwards: 70
> From: "6000"&lt;sip:6000 at 172.16.52.123&gt;;tag=as209a146a
> To:&lt;sip:3999 at 10.9.101.161:5065&gt;
> Contact:&lt;sip:6000 at 172.16.52.123:5060;transport=TCP&gt;
> Call-ID: 5aabc83c1d177184784b7c5d6c82a4ba at 172.16.52.123:5060
> CSeq: 102 INVITE
> User-Agent: FPBX-2.9.0(1.8.5.0)
> Date: Thu, 28 Jul 2011 13:05:33 GMT
> Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO,
> PUBLISH
> Supported: replaces, timer
> *Diversion:<tel:3950>;reason=no-answer;screen=no;privacy=off*
> Content-Type: application/sdp
> Content-Length: 420
>
> Is it possible??
>
> regards.
>
> --
> View this message in context: http://opensips-open-sip-server.1449251.n2.nabble.com/Add-DIVERSION-hdr-tp6629796p6629796.html
> Sent from the OpenSIPS - Users mailing list archive at Nabble.com.
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>




More information about the Users mailing list