To and From fields in SIP OPTIONS
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
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@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@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@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@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
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@gmail.com <mailto:ssinyagin@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@freeswitch.org <mailto:consulting@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@lists.freeswitch.org <mailto:FreeSWITCH-users@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@freeswitch.org <mailto:brian@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@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@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
The vendor seems to expect a valid username in To field. At the moment we had to disable pings, because the remote side replied with Forbidden and put our address to a blacklist. I will dig for more details. On Feb 23, 2015 5:05 PM, "Brian West" <brian@freeswitch.org> 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@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@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@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@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@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@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
I have a vendor gateway that also does this. While we're going to be making a feature request that it accepts pings to the gateway address, currently their pings only respond if you ping an extension that actually exists on the gateway. On 23 February 2015 at 19:14, Stanislav Sinyagin <ssinyagin@gmail.com> wrote:
The vendor seems to expect a valid username in To field. At the moment we had to disable pings, because the remote side replied with Forbidden and put our address to a blacklist. I will dig for more details. On Feb 23, 2015 5:05 PM, "Brian West" <brian@freeswitch.org> 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@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@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@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@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@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@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@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@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
participants (4)
-
Brian West
-
Stanislav Sinyagin
-
Steven Ayre
-
Victor Chukalovskiy