1228 Generating the Request

本文详细介绍了SIP请求中必须包含的基本头部字段:To、From、CSeq、Call-ID、Max-Forwards 和 Via,这些字段是SIP消息的基础组成部分。文章还探讨了如何设置初始Request-URI以及在特定情况下路由集对Request-URI的影响。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

   A valid SIP request formulated by a UAC MUST, at a minimum, contain

   the following header fields: To, From, CSeq, Call-ID, Max-Forwards,

   and Via; all of these header fields are mandatory in all SIP

   requests.  These six header fields are the fundamental building

   blocks of a SIP message, as they jointly provide for most of the

   critical message routing services including the addressing of

   messages, the routing of responses, limiting message propagation,

   ordering of messages, and the unique identification of transactions.

   These header fields are in addition to the mandatory request line,

   which contains the method, Request-URI, and SIP version.

The initial Request-URI of the message SHOULD be set to the value of

   the URI in the To field.

   In some special circumstances, the presence of a pre-existing route

   set can affect the Request-URI of the message.  A pre-existing route

   set is an ordered set of URIs that identify a chain of servers, to

   which a UAC will send outgoing requests that are outside of a dialog.

   Commonly, they are configured on the UA by a user or service provider

   manually, or through some other non-SIP mechanism.  When a provider

   wishes to configure a UA with an outbound proxy, it is RECOMMENDED

   that this be done by providing it with a pre-existing route set with

   a single URI, that of the outbound proxy.

Inside the OS code, the task scheduler can decide if context switching should be carried out. The operations shown in Figure 10.6 assume that the OS kernel execution is triggered by a SysTick exception, and each time it decides to switch to a different task. If an interrupt request (IRQ) takes place before the SysTick exception, the SysTick exception might preempt the IRQ handler. In this case, the OS should not carry out the context switching. Otherwise, the IRQ handler process will be delayed (Figure 10.7). And for the Cortex -M3 and Cortex-M4 processors, by default the design does not allow return to Thread mode when there is an active interrupt service (but there is an exception e see Non-base Thread Enable description in section 23.5). If the OS attempts to return to the Thread mode with an active interrupt service running, it triggers a Usage fault exception. In some OS designs, this problem is solved by not carrying out context switching if an interrupt service is running. This can easily be done by checking the stacked xPSR from the stack frame, or checking the interrupt active status registers in the NVIC (see section 7.8.4). However, this might affect the performance of the system, especially when an interrupt source keeps generating requests around the SysTick triggering time, which can prevent context switching from happening. The PendSV exception solves the problem by delaying the context-switching request until all other IRQ handlers have completed their processing. To do this, the PendSV is programmed as the lowest-priority exception. If the OS decides that context switching is needed, it sets the pending status of the PendSV, and carries out the context switching within the PendSV exception, as shown in Figure 10.8 show an example sequence of context switching using PendSV with the following event sequence. Figure 10.8 show an example sequence of context switching using PendSV with the following event sequence: 指出要是想进行时间片调度,systick优先级>用户优先级
03-08
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值