Ok, thanks! Le mar. 27 oct. 2020 à 21:52, Šindelka Pavel <sinde...@ttc.cz> a écrit :
> Exactement. > > P. > Dne 27.10.2020 v 21:21 Olivier Thomas napsal(a): > > Hi Pawel ! > > You means something like that : > > <nop> > <action> > <!-- $enabled=true if [field0]=1 --> > <test assign_to="enabled" variable="[field0]" compare="equal" > value="1" /> > </action> > </nop> > > *<!-- Send INVITE with SDP with Header P-My-Header-->* > <send retrans="500" start_rtd="PDD" *condexec="enabled"*> > <![CDATA[ > > INVITE sip:[service]@[remote_ip] SIP/2.0 > Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch] > From: <sip:[field0]@[local_ip]:[local_port]> > ;tag=[pid]SIPpTag00[call_number] > To: <sip:[service]@[remote_ip]> > Call-ID: [call_id] > P-Asserted-Identity: <tel:2245061> <2245061> > Supported: 100rel > User-Agent: SIPp-UAC > Allow: INVITE, OPTIONS, INFO, BYE, CANCEL, ACK, PRACK, UPDATE, REFER, > SUBSCRIBE, NOTIFY, PUBLISH > CSeq: 1 INVITE > Contact: <sip:[field0]@[local_ip]:[local_port]> > Max-Forwards: 70 > > * P-My-Header: myValue* > > Content-Type: application/sdp > Content-Length: [len] > > v=0 > o=uac [call_number] 2353687637 IN IP[local_ip_type] [local_ip] > s=- > c=IN IP[media_ip_type] [media_ip] > t=0 0 > m=audio [media_port] RTP/AVP 8 101 > a=rtpmap:8 PCMA/8000 > a=rtpmap:101 telephone-event/8000 > a=fmtp:101 0-15 > a=ptime:20 > > ]]> > </send> > > *<!-- Send INVITE with SDP without Header P-My-Header -->* > <send retrans="500" start_rtd="PDD"* condexec="enabled" > condexec_inverse="true"*> > <![CDATA[ > > INVITE sip:[service]@[remote_ip] SIP/2.0 > Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch] > From: <sip:[field0]@[local_ip]:[local_port]> > ;tag=[pid]SIPpTag00[call_number] > To: <sip:[service]@[remote_ip]> > Call-ID: [call_id] > P-Asserted-Identity: <tel:2245061> <2245061> > Supported: 100rel > User-Agent: SIPp-UAC > Allow: INVITE, OPTIONS, INFO, BYE, CANCEL, ACK, PRACK, UPDATE, REFER, > SUBSCRIBE, NOTIFY, PUBLISH > CSeq: 1 INVITE > Contact: <sip:[field0]@[local_ip]:[local_port]> > Max-Forwards: 70 > Content-Type: application/sdp > Content-Length: [len] > > v=0 > o=uac [call_number] 2353687637 IN IP[local_ip_type] [local_ip] > s=- > c=IN IP[media_ip_type] [media_ip] > t=0 0 > m=audio [media_port] RTP/AVP 8 101 > a=rtpmap:8 PCMA/8000 > a=rtpmap:101 telephone-event/8000 > a=fmtp:101 0-15 > a=ptime:20 > > ]]> > </send> > > *Olivier Thomas* > 18 rue Guyon de Guercheville > Hérouville Saint-Clair > Tél : 06 16 44 92 57 > olivier3.tho...@gmail.com > > > Le mar. 27 oct. 2020 à 20:16, Šindelka Pavel <sinde...@ttc.cz> a écrit : > >> Maybe there are other possibilities, but I would use two INVITE >> templates, with and without the P-My-Header, and send one ot the other >> depending on the variable setting. >> >> P. >> Dne 27.10.2020 v 20:01 Olivier Thomas napsal(a): >> >> Hello guys, >> >> Does someone know if there is a way to make a private header optional in >> a SIPp scenario ? >> >> I would like to add a private header "P-My-Header" in the INVITE requests >> only if a variable is set. >> >> For instance, I would like to add this header only if the [field0] from >> my input CSV file is equal to 0. >> If [field0] is equal to any other value, the header "P-My-Header" will >> not be added in INVITE requests. >> >> Or maybe do you know a better way to do the same thing... ? >> >> Thanks a lot for your help! >> Regards, >> >> *Olivier Thomas* >> olivier3.tho...@gmail.com >> >> >> _______________________________________________ >> Sipp-users mailing >> listSipp-users@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/sipp-users >> >> _______________________________________________ >> Sipp-users mailing list >> Sipp-users@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/sipp-users >> >
_______________________________________________ Sipp-users mailing list Sipp-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sipp-users