Telephone Call(R)

本文列举了在电话沟通中常用的英语表达方式,包括接打电话的基本用语、留言、转达信息等场景,适合英语学习者及职场人士参考。

1.I am afraid, you have got the wrong number.

2.It is nice to hear your voice.

3.Hold on a minute, please?

4.Can I leave a message?

5.Hello, this is jack speaking.I'd like to speak to Betty.

6.Is this the first time you have been in this city?

7.I hope we will cooperate well.

8.Let me introduce you to each other.

北京大学oj题目,已提交AC。原题目如下: Description Businesses like to have memorable telephone numbers. One way to make a telephone number memorable is to have it spell a memorable word or phrase. For example, you can call the University of Waterloo by dialing the memorable TUT-GLOP. Sometimes only part of the number is used to spell a word. When you get back to your hotel tonight you can order a pizza from Gino's by dialing 310-GINO. Another way to make a telephone number memorable is to group the digits in a memorable way. You could order your pizza from Pizza Hut by calling their ``three tens'' number 3-10-10-10. The standard form of a telephone number is seven decimal digits with a hyphen between the third and fourth digits (e.g. 888-1200). The keypad of a phone supplies the mapping of letters to numbers, as follows: A, B, and C map to 2 D, E, and F map to 3 G, H, and I map to 4 J, K, and L map to 5 M, N, and O map to 6 P, R, and S map to 7 T, U, and V map to 8 W, X, and Y map to 9 There is no mapping for Q or Z. Hyphens are not dialed, and can be added and removed as necessary. The standard form of TUT-GLOP is 888-4567, the standard form of 310-GINO is 310-4466, and the standard form of 3-10-10-10 is 310-1010. Two telephone numbers are equivalent if they have the same standard form. (They dial the same number.) Your company is compiling a directory of telephone numbers from local businesses. As part of the quality control process you want to check that no two (or more) businesses in the directory have the same telephone number. Input The input will consist of one case. The first line of the input specifies the number of telephone numbers in the directory (up to 100,000) as a positive integer alone on the line. The remaining lines list the telephone numbers in the directory, with each number alone on a line. Each telephone number consists of a string composed of decimal digits, uppercase letters (excluding Q and Z) and hyphens. Exactly seven of the characters in the string will be digits or letters. Output Generate a line of output for each telephone number that appears more than once in any form. The line should give the telephone number in standard form, followed by a space, followed by the number of times the telephone number appears in the directory. Arrange the output lines by telephone number in ascending lexicographical order. If there are no duplicates in the input print the line: No duplicates. Sample Input 12 4873279 ITS-EASY 888-4567 3-10-10-10 888-GLOP TUT-GLOP 967-11-11 310-GINO F101010 888-1200 -4-8-7-3-2-7-9- 487-3279 Sample Output 310-1010 2 487-3279 4 888-4567 3
OK log level [7] recv 987 bytes from udp/[183.227.181.87]:3831 at 10:46:07.148120: ------------------------------------------------------------------------ INVITE sip:8888888@210.16.181.110:5088 SIP/2.0 Via: SIP/2.0/UDP 10.168.1.102:65268;rport;branch=z9hG4bKPj1511caf17b954bbf88131e44bf6a5193 Max-Forwards: 70 From: "0731" <sip:0731@210.16.181.110>;tag=a7ff8265ed564f91a83ef477e4f19988 To: <sip:8888888@210.16.181.110> Contact: "0731" <sip:0731@10.168.1.102:65268;ob> Call-ID: 707f8c9776d44d208d7d6ab389140dfd CSeq: 32074 INVITE Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS Supported: replaces, 100rel, timer, norefersub Session-Expires: 1800 Min-SE: 90 User-Agent: MicroSIP/3.20.6 Content-Type: application/sdp Content-Length: 339 v=0 o=- 3969081966 3969081966 IN IP4 10.168.1.102 s=pjmedia b=AS:84 t=0 0 a=X-nat:0 m=audio 4058 RTP/AVP 8 0 101 c=IN IP4 10.168.1.102 b=TIAS:64000 a=rtcp:4059 IN IP4 10.168.1.102 a=sendrecv a=rtpmap:8 PCMA/8000 a=rtpmap:0 PCMU/8000 a=rtpmap:101 telephone-event/8000 a=fmtp:101 0-16 a=ssrc:274405278 cname:79dc65070ed31ef6 2025-10-10 10:46:07.148069 99.90% [INFO:7f81d0a7f700] sofia.c:2421 receiving SIP event 1, call_id: 707f8c9776d44d208d7d6ab389140dfd 2025-10-10 10:46:07.148069 99.90% [NOTICE:7f81d0a7f700] switch_channel.c:1161 New Channel sofia/internal/0731@210.16.181.110 [707f8c9776d44d208d7d6ab389140dfd] 2025-10-10 10:46:07.148069 99.90% [INFO:7f81d0a7f700] sofia.c:2650 signal_data_queue push event 1, call_id: 707f8c9776d44d208d7d6ab389140dfd 2025-10-10 10:46:07.148069 99.90% [NOTICE:7f81cd13f700] switch_core_session.c:1730 Session 2 (sofia/internal/0731@210.16.181.110) Start 2025-10-10 10:46:07.148069 99.90% [INFO:7f81cd13f700] sofia.c:1496 our_sofia_event_callback 707f8c9776d44d208d7d6ab389140dfd 1 2025-10-10 10:46:07.148069 99.90% [INFO:7f81cd13f700] sofia.c:10507 sofia/internal/0731@210.16.181.110 receiving invite from 183.227.181.87:3831 version: 1.10.8 -release 64bit call-id: 707f8c9776d44d208d7d6ab389140dfd 2025-10-10 10:46:07.148069 99.90% [INFO:7f81cd13f700] mod_dialplan_xml.c:639 Processing 0731 <0731>->8888888 in context callin send 336 bytes to udp/[183.227.181.87]:3831 at 10:46:07.149791: ------------------------------------------------------------------------ SIP/2.0 100 Trying Via: SIP/2.0/UDP 10.168.1.102:65268;rport=3831;branch=z9hG4bKPj1511caf17b954bbf88131e44bf6a5193;received=183.227.181.87 From: "0731" <sip:0731@210.16.181.110>;tag=a7ff8265ed564f91a83ef477e4f19988 To: <sip:8888888@210.16.181.110> Call-ID: 707f8c9776d44d208d7d6ab389140dfd CSeq: 32074 INVITE Content-Length: 0 EXECUTE [depth=0] sofia/internal/0731@210.16.181.110 log(INFO sip_contact_saddr: ) 2025-10-10 10:46:07.148069 99.90% [INFO:7f81cd13f700] mod_dptools.c:1937 sip_contact_saddr: EXECUTE [depth=0] sofia/internal/0731@210.16.181.110 export(nolocal:execute_on_183_media_1=set_partner sip_with_sdp=true) EXECUTE [depth=0] sofia/internal/0731@210.16.181.110 set(check_sdp_before_hangup=true) EXECUTE [depth=0] sofia/internal/0731@210.16.181.110 set(hangup_after_bridge=true) EXECUTE [depth=0] sofia/internal/0731@210.16.181.110 export(continue_on_fail=true) EXECUTE [depth=0] sofia/internal/0731@210.16.181.110 lua(lua/selection_gateway.lua 8888888) 2025-10-10 10:46:07.148069 99.90% [INFO:7f81cd13f700] switch_cpp.cpp:1465 === selection_gateway.lua 开始执行 === 2025-10-10 10:46:07.148069 99.90% [INFO:7f81cd13f700] switch_cpp.cpp:1465 参数 - destination_number: 8888888 2025-10-10 10:46:07.148069 99.90% [INFO:7f81cd13f700] switch_cpp.cpp:1465 参数 - landing_value: nil 2025-10-10 10:46:07.148069 99.90% [INFO:7f81cd13f700] switch_cpp.cpp:1465 参数 - caller_value: nil 2025-10-10 10:46:07.148069 99.90% [WARNING:7f81cd13f700] switch_cpp.cpp:1465 获取地区信息: 号码长度不足11位: 8888888 2025-10-10 10:46:07.148069 99.90% [WARNING:7f81cd13f700] switch_cpp.cpp:1465 未获取到地区信息,将跳过地区匹配检查 2025-10-10 10:46:07.148069 99.90% [INFO:7f81cd13f700] switch_cpp.cpp:1465 被叫号码: 8888888, 主叫号码: 0731 2025-10-10 10:46:07.148069 99.90% [INFO:7f81cd13f700] switch_cpp.cpp:1465 成功匹配网关配置: 2025-10-10 10:46:07.148069 99.90% [INFO:7f81cd13f700] switch_cpp.cpp:1465 配置ID: 9525 2025-10-10 10:46:07.148069 99.90% [INFO:7f81cd13f700] switch_cpp.cpp:1465 匹配前缀: 0731 2025-10-10 10:46:07.148069 99.90% [INFO:7f81cd13f700] switch_cpp.cpp:1465 对接网关前缀: 101035,0731 2025-10-10 10:46:07.148069 99.90% [INFO:7f81cd13f700] switch_cpp.cpp:1465 落地扣费账户: GYS130003 2025-10-10 10:46:07.148069 99.90% [INFO:7f81cd13f700] switch_cpp.cpp:1465 对接扣费账户: KH101035 2025-10-10 10:46:07.148069 99.90% [INFO:7f81cd13f700] switch_cpp.cpp:1465 落地名称: 福建银融-上海郑州固话催收12分 2025-10-10 10:46:07.148069 99.90% [INFO:7f81cd13f700] switch_cpp.cpp:1465 主叫改写规则: 2025-10-10 10:46:07.148069 99.90% [INFO:7f81cd13f700] switch_cpp.cpp:1465 被叫改写规则: 2025-10-10 10:46:07.148069 99.90% [INFO:7f81cd13f700] switch_cpp.cpp:1465 IP地址: 210.16.181.105|210.16.181.106 2025-10-10 10:46:07.148069 99.90% [INFO:7f81cd13f700] switch_cpp.cpp:1465 网关并发范围: 0-0 2025-10-10 10:46:07.148069 99.90% [INFO:7f81cd13f700] switch_cpp.cpp:1465 时间段并发: {"week":"1,2,3,4,5","timeRanges":[{"time":"09:00-20:00","concurrent":1000}]} 2025-10-10 10:46:07.148069 99.90% [INFO:7f81cd13f700] switch_cpp.cpp:1465 允许城市: 2025-10-10 10:46:07.148069 99.90% [INFO:7f81cd13f700] switch_cpp.cpp:1465 禁止城市: 2025-10-10 10:46:07.148069 99.90% [INFO:7f81cd13f700] switch_cpp.cpp:1465 对接主叫允许前缀: 101035,0731 2025-10-10 10:46:07.148069 99.90% [INFO:7f81cd13f700] switch_cpp.cpp:1465 对接被叫允许前缀: 2025-10-10 10:46:07.148069 99.90% [INFO:7f81cd13f700] switch_cpp.cpp:1465 落地主叫允许前缀: 2025-10-10 10:46:07.148069 99.90% [INFO:7f81cd13f700] switch_cpp.cpp:1465 落地被叫允许前缀: 2025-10-10 10:46:07.148069 99.90% [INFO:7f81cd13f700] switch_cpp.cpp:1465 落地主叫禁止前缀: 2025-10-10 10:46:07.148069 99.90% [INFO:7f81cd13f700] switch_cpp.cpp:1465 落地被叫禁止前缀: 2025-10-10 10:46:07.148069 99.90% [INFO:7f81cd13f700] switch_cpp.cpp:1465 落地ip: 111.111.23.23:5564 2025-10-10 10:46:07.148069 99.90% [INFO:7f81cd13f700] switch_cpp.cpp:1465 落地id: 2927746 2025-10-10 10:46:07.148069 99.90% [INFO:7f81cd13f700] switch_cpp.cpp:1465 开始科技网关检查... 2025-10-10 10:46:07.148069 99.90% [INFO:7f81cd13f700] switch_cpp.cpp:1465 网关选择的主叫 0731 ... 2025-10-10 10:46:07.148069 99.90% [INFO:7f81cd13f700] switch_cpp.cpp:1465 === 开始时间并发和地区检查 === 2025-10-10 10:46:07.148069 99.90% [INFO:7f81cd13f700] switch_cpp.cpp:1465 主叫号码: 0731 2025-10-10 10:46:07.148069 99.90% [INFO:7f81cd13f700] switch_cpp.cpp:1465 检查网关: 福建银融-上海郑州固话催收12分 2025-10-10 10:46:07.148069 99.90% [INFO:7f81cd13f700] switch_cpp.cpp:1465 号码归属地: 2025-10-10 10:46:07.148069 99.90% [INFO:7f81cd13f700] switch_cpp.cpp:1465 被叫号码: 8888888 2025-10-10 10:46:07.148069 99.90% [INFO:7f81cd13f700] switch_cpp.cpp:1465 解析字符串格式的时间并发配置: {"week":"1,2,3,4,5","timeRanges":[{"time":"09:00-20:00","concurrent":1000}]} 2025-10-10 10:46:07.148069 99.90% [INFO:7f81cd13f700] switch_cpp.cpp:1465 成功解析时间并发配置 2025-10-10 10:46:07.148069 99.90% [INFO:7f81cd13f700] switch_cpp.cpp:1465 当前时间: 周5 10:46 (646分钟) 2025-10-10 10:46:07.148069 99.90% [INFO:7f81cd13f700] switch_cpp.cpp:1465 配置星期: 1,2,3,4,5 2025-10-10 10:46:07.148069 99.90% [INFO:7f81cd13f700] switch_cpp.cpp:1465 星期匹配通过 2025-10-10 10:46:07.148069 99.90% [INFO:7f81cd13f700] switch_cpp.cpp:1465 检查 1 个时间范围... 2025-10-10 10:46:07.148069 99.90% [INFO:7f81cd13f700] switch_cpp.cpp:1465 时间匹配成功: 09:00-20:00 2025-10-10 10:46:07.148069 99.90% [INFO:7f81cd13f700] switch_cpp.cpp:1465 开始并发检查,限制: 1000 2025-10-10 10:46:07.148069 99.90% [ERR:7f81cd13f700] switch_cpp.cpp:1465 ❌ 脚本执行错误: /usr/local/freeswitch/scripts/lua/modules/query_concurrent.lua:12: attempt to call method 'getGlobalVariable' (a nil value) 2025-10-10 10:46:07.148069 99.90% [INFO:7f81cd13f700] switch_cpp.cpp:1465 === selection_gateway.lua 执行结束,结果: fail === 2025-10-10 10:46:07.148069 99.90% [INFO:7f81cd13f700] switch_cpp.cpp:1465 返回结果为fail,设置SIP 404响应码并返回fail 2025-10-10 10:46:07.148069 99.90% [NOTICE:7f81cd13f700] switch_core_state_machine.c:385 sofia/internal/0731@210.16.181.110 has executed the last dialplan instruction, hanging up. 2025-10-10 10:46:07.148069 99.90% [NOTICE:7f81cd13f700] switch_core_state_machine.c:387 Hangup sofia/internal/0731@210.16.181.110 [CS_EXECUTE] [NORMAL_CLEARING] 2025-10-10 10:46:07.148069 99.90% [WARNING:7f81cd13f700] switch_core_state_machine.c:131 sofia/internal/0731@210.16.181.110 Missing call statistics! 2025-10-10 10:46:07.148069 99.90% [NOTICE:7f81cd13f700] switch_core_session.c:1768 Session 2 (sofia/internal/0731@210.16.181.110) Ended 2025-10-10 10:46:07.148069 99.90% [NOTICE:7f81cd13f700] switch_core_session.c:1772 Close Channel sofia/internal/0731@210.16.181.110 [CS_DESTROY] 2025-10-10 10:46:07.148069 99.90% [NOTICE:7f81d9b03700] mod_python3.c:231 Invoking py module: channel_hangup_complete send 630 bytes to udp/[183.227.181.87]:3831 at 10:46:07.162095: ------------------------------------------------------------------------ SIP/2.0 480 Temporarily Unavailable Via: SIP/2.0/UDP 10.168.1.102:65268;rport=3831;branch=z9hG4bKPj1511caf17b954bbf88131e44bf6a5193;received=183.227.181.87 Max-Forwards: 70 From: "0731" <sip:0731@210.16.181.110>;tag=a7ff8265ed564f91a83ef477e4f19988 To: <sip:8888888@210.16.181.110>;tag=etNa1F4aUBZrQ Call-ID: 707f8c9776d44d208d7d6ab389140dfd CSeq: 32074 INVITE Accept: application/sdp Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER, REFER, NOTIFY Supported: timer, path, replaces Allow-Events: talk, hold, conference, refer Reason: Q.850;cause=16;text="NORMAL_CLEARING" Content-Length: 0 2025-10-10 10:46:07.148069 99.90% [INFO:7f81d0a7f700] sofia.c:2395 msg_queue push: 7, QueueSize: 0 2025-10-10 10:46:07.148069 99.90% [INFO:7f81d0a7f700] sofia.c:2395 msg_queue push: 6, QueueSize: 0 2025-10-10 10:46:07.148069 99.90% [INFO:7f81d9b03700] switch_cpp.cpp:1465 {"date": "2025-10-10 10:46:07", "caller": "0731", "caller_id": "707f8c9776d44d208d7d6ab389140dfd", "caller_ip": "210.16.181.110", "callee": "8888888", "callee_id": "null", "callee_ip": "210.16.181.110", "callee_prefix": null, "codec": "null", "caller_pdd": 0, "callee_pdd": 0, "ringing_duration": 0, "l_sdp": "null", "r_sdp": "v=0\r\no=- 3969081966 3969081966 IN IP4 10.168.1.102\r\ns=pjmedia\r\nb=AS:84\r\nt=0 0\r\na=X-nat:0\r\nm=audio 4058 RTP/AVP 8 0 101\r\nc=IN IP4 10.168.1.102\r\nb=TIAS:64000\r\na=rtpmap:8 PCMA/8000\r\na=rtpmap:0 PCMU/8000\r\na=rtpmap:101 telephone-event/8000\r\na=fmtp:101 0-16\r\na=rtcp:4059 IN IP4 10.168.1.102\r\na=ssrc:274405278 cname:79dc65070ed31ef6\r\n", "create_time": "1760064367148069", "media_time": "0", "answered_time": "0", "hangup_time": "1760064367148069", "cause": "NORMAL_CLEARING", "hangup_status": "200", "media_hangup_cause": "null", "consumeruuid": "null", "has_media": 0, "asr_for_media": 0, "asr_for_answer": 0, "asr_server_ip": "null", "hostname": "192.168.8.117"} recv 366 bytes from udp/[183.227.181.87]:3831 at 10:46:07.192170: ------------------------------------------------------------------------ ACK sip:8888888@210.16.181.110:5088 SIP/2.0 Via: SIP/2.0/UDP 10.168.1.102:65268;rport;branch=z9hG4bKPj1511caf17b954bbf88131e44bf6a5193 Max-Forwards: 70 From: "0731" <sip:0731@210.16.181.110>;tag=a7ff8265ed564f91a83ef477e4f19988 To: <sip:8888888@210.16.181.110>;tag=etNa1F4aUBZrQ Call-ID: 707f8c9776d44d208d7d6ab389140dfd CSeq: 32074 ACK Content-Length: 0 就在这个里应该能查询出0731这个主叫前缀的并发数是1 但是没有
最新发布
10-11
在 `query_concurrent.lua` 脚本中出现 `'attempt to call method 'getGlobalVariable' (a nil value)'` 错误,表明 `session` 对象没有 `getGlobalVariable` 方法。在 FreeSWITCH 环境下,需要使用 FreeSWITCH 提供的 API 来替代。 以下是修改后的 `query_concurrent.lua` 脚本,用于正确查询主叫前缀 `0731` 的并发数: ```lua -- query_concurrent.lua -- 实际可行的并发统计方案 local M = {} -- 获取当前并发数 - 使用通道遍历的正确方法 function M.get_total_concurrency(prefixes) if type(prefixes) == "string" then prefixes = {prefixes} end -- 获取所有通话 local api = freeswitch.API() local result = api:executeString("show calls as csv") local calls = {} for line in result:gmatch("[^\r\n]+") do local fields = {} for field in line:gmatch('([^,]+)') do table.insert(fields, field) end if #fields > 0 then local call = { caller_id_number = fields[12] -- 假设 caller_id_number 在第 12 列,根据实际情况调整 } table.insert(calls, call) end end -- 定义要查询的主叫前缀 local concurrent_calls = {} for _, prefix in ipairs(prefixes) do concurrent_calls[prefix] = 0 end -- 统计每个前缀的并发量 for _, call in ipairs(calls) do local caller_id_number = call.caller_id_number for _, prefix in ipairs(prefixes) do if string.sub(caller_id_number, 1, #prefix) == prefix then concurrent_calls[prefix] = concurrent_calls[prefix] + 1 end end end -- 输出结果 for prefix, count in pairs(concurrent_calls) do freeswitch.consoleLog("info", "Prefix " .. prefix .. " has " .. count .. " concurrent calls.\n") end end return M ``` 可以通过以下方式调用该函数来查询主叫前缀 `0731` 的并发数: ```lua local query_concurrent = require("query_concurrent") query_concurrent.get_total_concurrency("0731") ```
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值