Siman 104
Presented here for study, not as a practical ruling. The Shulchan Aruch rules by Sephardi custom, the Rema's glosses by Ashkenazi custom, and the Kitzur follows Ashkenazi custom. For a practical question, ask your rabbi.
א לֹא יַפְסִיק בִּתְפִלָּתוֹ. וַאֲפִלּוּ מֶלֶךְ יִשְׂרָאֵל שׁוֹאֵל בִּשְׁלוֹמוֹ, לֹא יְשִׁיבֶנּוּ; אֲבָל מֶלֶךְ א"ה, אִם אֶפְשָׁר לוֹ לְקַצֵּר דְּהַיְנוּ שֶׁיֹּאמַר תְּחִלַּת הַבְּרָכָה וְסוֹפָהּ קֹדֶם שֶׁיַּגִּיעַ אֵלָיו, יְקַצֵּר; אוֹ אִם אֶפְשָׁר לוֹ שֶׁיִּטֶּה מִן הַדֶּרֶךְ, יִטֶּה וְלֹא יַפְסִיק בְּדִבּוּר, וְאִם אִי אֶפְשָׁר לוֹ, יַפְסִיק.
1 To Not Interrupt In The [Middle Of The Amidah] Prayer. Containing 8 S'ifim: One may not interrupt during one's prayer [i.e. Amidah]. And even if a Jewish king is inquiring about one's well-being, one may not respond to him. But [regarding responding to] a king of the nations of the world, if one is able to shorten [one's prayer], meaning that one would say the beginning of the blessing and its end before the [king] reaches one, one should shorten it. Or if [one's on the road and] one is able to veer off the road, [then] one should veer off, but one may not interrupt by talking. And if it's impossible for one [to do so], one may interrupt.
ב הָיָה מִתְפַּלֵּל בַּדֶּרֶךְ וּבָאָה בְּהֵמָה אוֹ קָרוֹן כְּנֶגְדּוֹ, יִטֶּה מִן הַדֶּרֶךְ וְלֹא יַפְסִיק; אֲבָל בְּעִנְיָן אַחֵר, אֵין לָצֵאת מִמְּקוֹמוֹ עַד שֶׁיִּגְמֹר תְּפִלָּתוֹ, אֶלָּא אִם כֵּן הוּא בַּתַּחֲנוּנִים שֶׁלְּאַחַר הַתְּפִלָּה.
2 If one was praying on the road and an animal or a wagon approaches before one, one should veer from the road and not interrupt [by talking]. But for another matter, one should not go out from one's place until one finishes one's prayer, unless one is up to the supplications that are after the [Amidah] prayer.
ג וַאֲפִלּוּ נָחָשׁ כָּרוּךְ עַל עֲקֵבוֹ, לֹא יַפְסִיק, אֲבָל יָכוֹל לֵילֵךְ לְמָקוֹם אַחֵר כְּדֵי שֶׁיִּפֹּל הַנָּחָשׁ מֵרַגְלוֹ (הר"י רֵישׁ פֶּרֶק אֵין עוֹמְדִין); אֲבָל עַקְרָב, פּוֹסֵק, לְפִי שֶׁהוּא מוּעָד יוֹתֵר לְהַזִּיק, וְנָחָשׁ נָמֵי, אִם רָאָה שֶׁהוּא כָּעוּס וּמוּכָן לְהַזִּיק, פּוֹסֵק.
3 And even [if] a snake is coiled around one's heel, one should not interrupt, (but one may move to a different place so that the snake falls off one's leg) (the Ri at the beginning of Chapter "Ain Omdin" [Berachot 30b:14]). But [regarding] a scorpion - one interrupts, because it is more prone to do harm; and so too a snake, if one sees that it is angry and ready to do harm, one interrupts.
ד אִם רָאָה שׁוֹר בָּא כְּנֶגְדּוֹ, פּוֹסֵק, שֶׁמַּרְחִיקִין מִשּׁוֹר תָּם (פי' תָּם שֶׁאֵינוֹ רָגִיל לְהַזִּיק) נ' אַמּוֹת, וּמִמּוּעָד (פי' שֶׁרָגִיל לְהַזִּיק), מְלֹא עֵינָיו; וְאִם שְׁוָרִים שֶׁבַּמָּקוֹם הַהוּא מֻחְזָקִים שֶׁאֵינָם מַזִּיקִים, אֵינוֹ פּוֹסֵק.
4 If one saw an ox approaching one, one interrupts [one's prayer]. For we distance from a regular ox (i.e. one that is not accustomed to do harm) 50 cubits, and from a forewarned ox (i.e., that is accustomed to do harm] as far as one can see. And if oxen in that place are known not to do harm, one does not interrupt.
ה בְּכָל מָקוֹם שֶׁפּוֹסֵק, אִם שָׁהָה כְּדֵי לִגְמֹר אֶת כֻּלָּהּ, חוֹזֵר לְרֹאשׁ; וְאִם לָאו, חוֹזֵר לִתְחִלַּת הַבְּרָכָה שֶׁפָּסַק בָּהּ; וְאִם פָּסַק בְּג' רִאשׁוֹנוֹת, חוֹזֵר לְרֹאשׁ; וְאִם בָּאַחֲרוֹנוֹת, חוֹזֵר לִרְצֵה.
5 In any circumstance where one interrupted, if one delayed long enough to finish all of it [i.e. the Amidah prayer], one must return to the beginning; and if not, then one returns to the beginning of the blessing that one interrupted. And if one interrupted in one of the first three [blessings], one returns to the beginning; and if it was in one of the latter ones [i.e. three blessings], one returns to [the blessing of] "R'tzei".
ו הָא דְּאָמְרִינַן אִם שָׁהָה כְּדֵי לִגְמֹר אֶת כֻּלָּהּ, בְּקוֹרֵא מְשַׁעֲרִינָן. אִם שָׂח בַּתְּפִלָּה, דִּינוֹ לְעִנְיַן חֲזָרָה כְּדִין הַהַפְסָקוֹת הָאֲמוּרוֹת בְּסִימָן זֶה.
6 This [thing] that we said: "that if one delayed long enough to finish all of it [i.e. the Amidah prayer]", we calculate [that time] based on the speed of] the one reading (i.e. praying). If one conversed during the [Amidah] prayer, the law regarding the matter of returning [to an earlier part of the prayer] is like the law regarding interruptions mentioned in this siman.
ז אֵינוֹ פּוֹסֵק לֹא לְקַדִּישׁ וְלֹא לִקְדֻשָּׁה, אֶלָּא יִשְׁתֹּק וִיכַוֵּן לְמַה שֶּׁאוֹמֵר הַשְׁלִיחַ צִבּוּר, וִיהֵא כְּעוֹנֶה הָיָה עוֹמֵד בִּתְפִלָּה וּקְרָאוּהוּ לְסֵפֶר תּוֹרָה, אֵינוֹ פּוֹסֵק (ת"ה סי' קפ"ה).
7 One may not interrupt [the Amidah], not for [the responses in the] Kaddish and not for Kedusha. Rather, one should be silent and focus on what the prayer leader is saying and it will be [considered] like one is answering.(If one is standing during one's [Amidah] prayer and they called that person up [for an aliyah] to the Torah scroll, one does not interrupt.) (Rashb"a in Siman 185)
ח אַחַר שֶׁסִיֵּם י"ח בְּרָכוֹת, קֹדֶם אֱלֹהַי נְצֹר, יָכוֹל לַעֲנוֹת קְדֻשָּׁה וְקַדִּישׁ וּבָרְכוּ וע"ל סִימָן קכ"ב.
8 After one finished the eighteen blessings [of the Amidah], [but] before [one said] "Elokai, netzor", one may answer Kedusha, Kaddish, and Barchu. [And see below in Siman 122].