[Freeswitch-users] To and From fields in SIP OPTIONS
Victor Chukalovskiy
victor.chukalovskiy at gmail.com
Mon Feb 23 19:56:25 MSK 2015
Hello,
I should add that FS OPTIONS indeed cause trouble to some far-end
implementations.
Not just because they only contain domains as indicated by Stanislav.
But also because it's always the same domain both in From: and To:
headers. Example:
From: <sip:*5.6.7.8*>;tag=ZZZ1Na2KacXcm
To: <sip:*5.6.7.8*>"
While this is probably standard-complaint, some implementations expect
From: header to contain FS own IP. Example:
From: <sip:*1.2.3.4*>;tag=ZZZ1Na2KacXcm
To: <sip:*5.6.7.8*>"
Moreover, SIP gateway param "from-domain" has no effects on OPTIONS
request From: header.... this param seem to be only parsed for INVITE &
REGISTER requests.
Presently I don't have time for JIRA / feature request, so putting it
here in case someone struggles with the same.
Maybe someone will be able to go ahead and improve this.
Cheers,
-Victor
On 15-02-23 11:04 AM, Brian West wrote:
> Those are perfectly valid OPTIONS packets, how exactly is the vendor
> claiming it breaks them?
>
> On Mon, Feb 23, 2015 at 4:14 AM, Stanislav Sinyagin
> <ssinyagin at gmail.com <mailto:ssinyagin at gmail.com>> wrote:
>
> It appears that in the OPTIONS ping packet, To and From fields contain
> only the domain name.
>
> In sofia.c:
>
> if (ping_freq) {
> if (ping_freq >= 5) {
> gateway->ping_freq = ping_freq;
> gateway->ping_max = ping_max;
> gateway->ping_min = ping_min;
> gateway->ping_monitoring = ping_monitoring;
> gateway->ping = switch_epoch_time_now(NULL) +
> ping_freq;
> gateway->options_to_uri =
> switch_core_sprintf(gateway->pool, "<sip:%s>",
> !zstr(from_domain) ? from_domain : proxy);
> gateway->options_from_uri =
> gateway->options_to_uri;
> } else {
> switch_log_printf(SWITCH_CHANNEL_LOG,
> SWITCH_LOG_ERROR, "ERROR: invalid ping!\n");
> }
> }
>
>
>
> Is there a reason why To and From fields don;t contain the register
> username? This seems to break some other vendor gateways.
>
>
> thanks,
> stan
>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org <mailto:consulting at freeswitch.org>
> http://www.freeswitchsolutions.com
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://confluence.freeswitch.org
> http://www.cluecon.com
>
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> <mailto: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
>
>
>
>
> --
>
> */Brian West/*
> brian at freeswitch.org <mailto:brian at freeswitch.org>
>
>
> */Twitter: @FreeSWITCH , @briankwest/*
> http://www.freeswitchbook.com
> http://www.freeswitchcookbook.com
>
> *T:*+19184209001 | *F:*+19184209002 | *M:*+1918424WEST (9378)
> *iNUM:*+883 5100 1420 9001 | *ISN:*410*543 | *Skype:*briankwest
>
>
>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> http://www.freeswitchsolutions.com
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://confluence.freeswitch.org
> http://www.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
> http://www.freeswitch.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20150223/68692b04/attachment.html
Join us at ClueCon 2016 Aug 8-12, 2016
More information about the FreeSWITCH-users
mailing list