[Freeswitch-users] Unset variable in dialstring
Vallimamod Abdullah
vma at vallimamod.org
Thu Feb 6 11:50:19 UTC 2020
Hi,
If you want to handle Privacy and P-Asserted-Id headers manually, it is best to set sip_cid_type to "none".
Also, if you use the "{...}sofia/gateway/..." syntax, you don't need to add the "_nolocal_" prefix as the vars between the curly braces are only set for the b-leg.
Best Regards,
--
Vallimamod Abdullah
SIP Solutions
vma at sip.solutions
linkedin.com/in/vallimamod
.
> On 5 Feb 2020, at 10:52, Markus Bönke <mbodbg at gmx.net> wrote:
>
> I made a couple of more tests and found out that it depends on the cid_type.
> So if the sip_cid_type is set to rpid (or not set as the default is rpid)
> then the deletion of the Privacy header works:
>
>
> EXECUTE [depth=0] sofia/internal/+4999999999999 at 192.168.12.13 bridge({sip_cid_type=rpid,_nolocal_sip_h_Privacy=}sofia/gateway/asterisk/+4933333333332)
>
> INVITE sip:+4933333333332 at 192.168.12.18 SIP/2.0
> Via: SIP/2.0/UDP 192.168.12.2;rport;branch=z9hG4bK55vN1XK3UZNHQ
> Max-Forwards: 69
> From: "+4999999999999" <sip:+4999999999999 at 192.168.12.2>;tag=Fyr8m981N4Dea
> To: <sip:+4933333333332 at 192.168.12.18>
> Call-ID: 0f549364-c29d-1238-6baf-001c42a16581
> CSeq: 15893737 INVITE
> Contact: <sip:gw+asterisk at 192.168.12.2:5060;transport=udp;gw=asterisk>
> User-Agent: FreeSWITCH-mod_sofia/1.10.2-release-13-f7bdd3845a~64bit
> Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER, REFER, NOTIFY
> Supported: timer, path, replaces
> Allow-Events: talk, hold, conference, refer
> Content-Type: application/sdp
> Content-Disposition: session
> Content-Length: 220
> Remote-Party-ID: "+4999999999999" <sip:+4999999999999 at 192.168.12.2>;party=calling;screen=yes;privacy=off
>
>
> but when the cid_type is set to pid, setting "_nolocal_sip_h_Privacy=" has no effect, the Privacy header is kept.
>
> EXECUTE [depth=0] sofia/internal/+4999999999999 at 192.168.12.13 bridge({sip_cid_type=pid,_nolocal_sip_h_Privacy=}sofia/gateway/asterisk/+4933333333332)
>
>
> INVITE sip:+4933333333332 at 192.168.12.18 SIP/2.0
> Via: SIP/2.0/UDP 192.168.12.2;rport;branch=z9hG4bK2aHBvc1r44jSm
> Max-Forwards: 69
> From: "+4999999999999" <sip:+4999999999999 at 192.168.12.2>;tag=Dc6pHK7tUj18j
> To: <sip:+4933333333332 at 192.168.12.18>
> Call-ID: c34ec1cd-c29c-1238-6baf-001c42a16581
> CSeq: 15893673 INVITE
> Contact: <sip:gw+asterisk at 192.168.12.2:5060;transport=udp;gw=asterisk>
> User-Agent: FreeSWITCH-mod_sofia/1.10.2-release-13-f7bdd3845a~64bit
> Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER, REFER, NOTIFY
> Supported: timer, path, replaces
> Allow-Events: talk, hold, conference, refer
> Privacy: none
> Content-Type: application/sdp
> Content-Disposition: session
> Content-Length: 220
> P-Asserted-Identity: "+4999999999999" <sip:+4999999999999 at 192.168.12.2>
>
>
> Is this by design or a bug?
>
> Thanks
>
> Markus
>
>> Am 05.02.2020 um 07:15 schrieb Markus Bönke <mbodbg at gmx.net>:
>>
>> Perfect, that works!
>>
>> Thank you
>>
>> Markus
>>> Am 04.02.2020 um 23:20 schrieb Vallimamod Abdullah <vma at vallimamod.org>:
>>>
>>> Hi,
>>>
>>> For sip headers you need to set an empty value to remove them: {sip_h_Privacy=}
>>>
>>> or before the bridge:
>>>
>>> <action application="export" data="_nolocal_sip_h_Privacy="/>
>>>
>>> the "_nolocal_" (or "nolocal:") prefix tells freeswitch to set the var only on b-leg.
>>>
>>> Hope this helps.
>>>
>>>
>>>
>>> Best Regards,
>>> --
>>> Vallimamod Abdullah
>>> SIP Solutions
>>> vma at sip.solutions
>>> linkedin.com/in/vallimamod
>>> .
>>>
>>>
>>>> On 4 Feb 2020, at 20:44, Markus Bönke <mbodbg at gmx.net> wrote:
>>>>
>>>> Unfortunately I doesn’t work. I tried:
>>>>
>>>> <action application="bridge" data="{sip_h_Privacy=_undef_}sofia/gateway/asterisk/+4933333333332" />
>>>>
>>>> and see
>>>>
>>>> Privacy: _undef_
>>>>
>>>> In the sip INVITE message.
>>>>
>>>> Thanks
>>>>
>>>> Markus
>>>>
>>>>> Am 03.02.2020 um 16:48 schrieb Vallimamod Abdullah <vma at vallimamod.org>:
>>>>>
>>>>> Hi,
>>>>>
>>>>> You can try with _undef_, it works in dialplan as <action application="set" data="variable=_undef_"/>
>>>>>
>>>>>
>>>>> Best Regards,
>>>>> --
>>>>> Vallimamod Abdullah
>>>>> SIP Solutions
>>>>> vma at sip.solutions
>>>>> linkedin.com/in/vallimamod
>>>>> .
>>>>>
>>>>>
>>>>>> On 3 Feb 2020, at 16:07, Markus Bönke <mbodbg at gmx.net> wrote:
>>>>>>
>>>>>> Hello NG,
>>>>>>
>>>>>> I know it is possible to unset a variable in the dial plan by using the „unset“ application like:
>>>>>>
>>>>>> <application="unset" data="variable_name“>
>>>>>>
>>>>>> But is it also possible to unset a variable within a bridge command like:
>>>>>>
>>>>>> bridge({variable_name="_unset_"}sofia/gateway/mygateway/+49123456789)
>>>>>>
>>>>>> _unset_ does not work with FS 1.10.2 but maybe there is any other „special value“ to unset?
>>>>>>
>>>>>> Thanks and regards
>>>>>>
>>>>>> Markus
>>>>>>
>>>>>>
>>>>>>
>>>>>> _________________________________________________________________________
>>>>>>
>>>>>> The FreeSWITCH project is sponsored by SignalWire https://signalwire.com
>>>>>> Enhance your FreeSWITCH install with disruptive priced SMS and PSTN services.
>>>>>> Build your next product on our scalable cloud platform.
>>>>>>
>>>>>> Join our online community to chat in real time https://signalwire.community
>>>>>>
>>>>>> Professional FreeSWITCH Services
>>>>>> sales at freeswitch.com
>>>>>> https://freeswitch.com
>>>>>>
>>>>>> Official FreeSWITCH Sites
>>>>>> https://freeswitch.com/oss
>>>>>> https://freeswitch.org/confluence
>>>>>> https://cluecon.com
>>>>>>
>>>>>> 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
>>>>>> https://freeswitch.com
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> _________________________________________________________________________
>>>>>
>>>>> The FreeSWITCH project is sponsored by SignalWire https://signalwire.com
>>>>> Enhance your FreeSWITCH install with disruptive priced SMS and PSTN services.
>>>>> Build your next product on our scalable cloud platform.
>>>>>
>>>>> Join our online community to chat in real time https://signalwire.community
>>>>>
>>>>> Professional FreeSWITCH Services
>>>>> sales at freeswitch.com
>>>>> https://freeswitch.com
>>>>>
>>>>> Official FreeSWITCH Sites
>>>>> https://freeswitch.com/oss
>>>>> https://freeswitch.org/confluence
>>>>> https://cluecon.com
>>>>>
>>>>> 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
>>>>> https://freeswitch.com
>>>>
>>>> _________________________________________________________________________
>>>>
>>>> The FreeSWITCH project is sponsored by SignalWire https://signalwire.com
>>>> Enhance your FreeSWITCH install with disruptive priced SMS and PSTN services.
>>>> Build your next product on our scalable cloud platform.
>>>>
>>>> Join our online community to chat in real time https://signalwire.community
>>>>
>>>> Professional FreeSWITCH Services
>>>> sales at freeswitch.com
>>>> https://freeswitch.com
>>>>
>>>> Official FreeSWITCH Sites
>>>> https://freeswitch.com/oss
>>>> https://freeswitch.org/confluence
>>>> https://cluecon.com
>>>>
>>>> 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
>>>> https://freeswitch.com
>>>
>>>
>>> _________________________________________________________________________
>>>
>>> The FreeSWITCH project is sponsored by SignalWire https://signalwire.com
>>> Enhance your FreeSWITCH install with disruptive priced SMS and PSTN services.
>>> Build your next product on our scalable cloud platform.
>>>
>>> Join our online community to chat in real time https://signalwire.community
>>>
>>> Professional FreeSWITCH Services
>>> sales at freeswitch.com
>>> https://freeswitch.com
>>>
>>> Official FreeSWITCH Sites
>>> https://freeswitch.com/oss
>>> https://freeswitch.org/confluence
>>> https://cluecon.com
>>>
>>> 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
>>> https://freeswitch.com
>>
>>
>> _________________________________________________________________________
>>
>> The FreeSWITCH project is sponsored by SignalWire https://signalwire.com
>> Enhance your FreeSWITCH install with disruptive priced SMS and PSTN services.
>> Build your next product on our scalable cloud platform.
>>
>> Join our online community to chat in real time https://signalwire.community
>>
>> Professional FreeSWITCH Services
>> sales at freeswitch.com
>> https://freeswitch.com
>>
>> Official FreeSWITCH Sites
>> https://freeswitch.com/oss
>> https://freeswitch.org/confluence
>> https://cluecon.com
>>
>> 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
>> https://freeswitch.com
>
>
> _________________________________________________________________________
>
> The FreeSWITCH project is sponsored by SignalWire https://signalwire.com
> Enhance your FreeSWITCH install with disruptive priced SMS and PSTN services.
> Build your next product on our scalable cloud platform.
>
> Join our online community to chat in real time https://signalwire.community
>
> Professional FreeSWITCH Services
> sales at freeswitch.com
> https://freeswitch.com
>
> Official FreeSWITCH Sites
> https://freeswitch.com/oss
> https://freeswitch.org/confluence
> https://cluecon.com
>
> 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
> https://freeswitch.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20200206/b9116c4a/attachment-0001.html>
More information about the FreeSWITCH-users
mailing list