0

我想用星号替换我的 SPA2102。如何修改标头,例如 From、To 和 Contact?我需要替换标题,例如

From: "asterisk" <sip:XXXX174264@ip.ip.ip.6>;tag=as1ea48bca

到标头,例如 SPA2102。

我的 SPA2102 发送它就像

"XXXX174264" <sip:XXXX174264@ip.ip.ip.6>

如何

#  tcpdump -nAieth0 port 5060 and net ip.ip.ip.0/24

10:47:55.801914 IP 10.37.93.21.5060 > ip.ip.ip.6.5060: SIP, length: 906
E....j..@...
%].............INVITE sip:474264@ip.ip.ip.6 SIP/2.0
Via: SIP/2.0/UDP 10.37.93.21:5060;branch=z9hG4bK20d7bc88
Max-Forwards: 70
From: "asterisk" <sip:XXXX174264@ip.ip.ip.6>;tag=as1ea48bca
To: <sip:474264@ip.ip.ip.6>
Contact: <sip:XXXX174264@10.37.93.21:5060>
Call-ID: 6b4c893e70628a626286cd0a748f93de@ip.ip.ip.6
CSeq: 102 INVITE
User-Agent: Linksys/SPA2102-5.2.5
Date: Wed, 16 Jan 2013 04:47:55 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Content-Type: application/sdp
Content-Length: 333

v=0
o=- 233070007 233070007 IN IP4 10.37.93.21
s=Asterisk PBX 11.2.0
c=IN IP4 10.37.93.21
t=0 0
m=audio 10004 RTP/AVP 0 8 3 111 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:3 GSM/8000
a=rtpmap:111 G726-32/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -
a=ptime:20
a=sendrecv

10:47:55.822359 IP ip.ip.ip.6.5060 > 10.37.93.21.5060: SIP, length: 348
E..x..@.>.#.....
%]......d.CSIP/2.0 100 Trying
Via: SIP/2.0/UDP 10.37.93.21:5060;branch=z9hG4bK20d7bc88
From: "asterisk" <sip:XXXX174264@ip.ip.ip.6>;tag=as1ea48bca
To: <sip:474264@ip.ip.ip.6>
Call-ID: 6b4c893e70628a626286cd0a748f93de@ip.ip.ip.6
CSeq: 102 INVITE
Contact: <sip:474264@ip.ip.ip.6:5060>
Server: MERA MVTS3G v.4.3.0-38t
Content-Length: 0

我尝试使用 SPA 和 Asterisk 拨打电话。两者都注册成功。但是 Asterisk 不能打电话。这是来自 SPA 的 tcpdump:

00:58:00.778565 IP 10.37.93.23.5060 > ip.ip.ip.6.5060: SIP, length: 892
Eh..........
%].............INVITE sip:474264@ip.ip.ip.6 SIP/2.0
Via: SIP/2.0/UDP 10.37.93.23:5060;branch=z9hG4bK-9b906813
From: XXXX174264 <sip:XXXX174264@ip.ip.ip.6>;tag=e9377d83dbc079fo0
To: <sip:474264@ip.ip.ip.6>
Remote-Party-ID: XXXX174264 <sip:XXXX174264@ip.ip.ip.6>;screen=yes;party=calling
Call-ID: 27e34e53-cdeded0f@10.37.93.23
CSeq: 101 INVITE
Max-Forwards: 70
Contact: XXXX174264 <sip:XXXX174264@10.37.93.23:5060>
Expires: 240
User-Agent: Linksys/SPA2102-5.2.5
Content-Length: 268
Allow: ACK, BYE, CANCEL, INFO, INVITE, NOTIFY, OPTIONS, REFER
Supported: x-sipura, replaces
Content-Type: application/sdp

v=0
o=- 93383 93383 IN IP4 10.37.93.23
s=-
c=IN IP4 10.37.93.23
t=0 0
m=audio 16186 RTP/AVP 8 0 18 4 100
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:18 G729a/8000
a=rtpmap:4 G723/8000
a=rtpmap:100 NSE/8000
a=fmtp:100 192-193
a=ptime:20
a=sendrecv

00:58:00.782580 IP ip.ip.ip.6.5060 > 10.37.93.23.5060: SIP, length: 342
....E..r..@.>.#.....
%]......^..SIP/2.0 100 Trying
Via: SIP/2.0/UDP 10.37.93.23:5060;branch=z9hG4bK-9b906813
From: "XXXX174264" <sip:XXXX174264@ip.ip.ip.6>;tag=e9377d83dbc079fo0
To: <sip:474264@ip.ip.ip.6>
Call-ID: 27e34e53-cdeded0f@10.37.93.23
CSeq: 101 INVITE
Contact: <sip:474264@ip.ip.ip.6:5060>
Server: MERA MVTS3G v.4.3.0-38t
Content-Length: 0


00:58:02.479539 IP ip.ip.ip.6.5060 > 10.37.93.23.5060: SIP, length: 683
....E.....@.>."p....
%].......<.SIP/2.0 180 Ringing
Via: SIP/2.0/UDP 10.37.93.23:5060;branch=z9hG4bK-9b906813
From: "XXXX174264" <sip:XXXX174264@ip.ip.ip.6>;tag=e9377d83dbc079fo0
To: <sip:474264@ip.ip.ip.6>;tag=109877804-3792792162-4082950052-3026001148
Call-ID: 27e34e53-cdeded0f@10.37.93.23
CSeq: 101 INVITE
Contact: <sip:474264@ip.ip.ip.6:5060>
Content-Type: application/sdp
Server: MERA MVTS3G v.4.3.0-38t
Content-Length:   258

v=0
o=- 1358621882 1358621882 IN IP4 ip.ip.ip.5
s=-
c=IN IP4 ip.ip.ip.5
t=0 0
m=audio 39878 RTP/AVP 8 0 18
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=ptime:20
a=sendrecv
a=silenceSupp:off - - - -

00:58:30.832778 IP 10.37.93.23.5060 > ip.ip.ip.6.5060: SIP, length: 339
Eh.o........
%]..........[O.CANCEL sip:474264@ip.ip.ip.6 SIP/2.0
Via: SIP/2.0/UDP 10.37.93.23:5060;branch=z9hG4bK-9b906813
From: XXXX174264 <sip:XXXX174264@ip.ip.ip.6>;tag=e9377d83dbc079fo0
To: <sip:474264@ip.ip.ip.6>
Call-ID: 27e34e53-cdeded0f@10.37.93.23
CSeq: 101 CANCEL
Max-Forwards: 70
User-Agent: Linksys/SPA2102-5.2.5
Content-Length: 0


00:58:30.836782 IP ip.ip.ip.6.5060 > 10.37.93.23.5060: SIP, length: 385
....E.....@.>.#.....
%].......7.SIP/2.0 200 OK
Via: SIP/2.0/UDP 10.37.93.23:5060;branch=z9hG4bK-9b906813
From: "XXXX174264" <sip:XXXX174264@ip.ip.ip.6>;tag=e9377d83dbc079fo0
To: <sip:474264@ip.ip.ip.6>;tag=109877804-3792792162-4082950052-3026001148
Call-ID: 27e34e53-cdeded0f@10.37.93.23
CSeq: 101 CANCEL
Contact: <sip:474264@ip.ip.ip.6:5060>
Server: MERA MVTS3G v.4.3.0-38t
Content-Length: 0


00:58:30.838775 IP ip.ip.ip.6.5060 > 10.37.93.23.5060: SIP, length: 450
....E.....@.>.#Y....
%].........SIP/2.0 487 Request Terminated
Via: SIP/2.0/UDP 10.37.93.23:5060;branch=z9hG4bK-9b906813
From: "XXXX174264" <sip:XXXX174264@ip.ip.ip.6>;tag=e9377d83dbc079fo0
To: <sip:474264@ip.ip.ip.6>;tag=109877804-3792792162-4082950052-3026001148
Call-ID: 27e34e53-cdeded0f@10.37.93.23
CSeq: 101 INVITE
Contact: <sip:474264@ip.ip.ip.6:5060>
Server: MERA MVTS3G v.4.3.0-38t
Reason: SIP;cause=487;text="Request Terminated"
Content-Length: 0


00:58:30.845777 IP 10.37.93.23.5060 > ip.ip.ip.6.5060: SIP, length: 437
Eh.........&
%].............ACK sip:474264@ip.ip.ip.6 SIP/2.0
Via: SIP/2.0/UDP 10.37.93.23:5060;branch=z9hG4bK-9b906813
From: XXXX174264 <sip:XXXX174264@ip.ip.ip.6>;tag=e9377d83dbc079fo0
To: <sip:474264@ip.ip.ip.6>;tag=109877804-3792792162-4082950052-3026001148
Call-ID: 27e34e53-cdeded0f@10.37.93.23
CSeq: 101 ACK
Max-Forwards: 70
Contact: XXXX174264 <sip:XXXX174264@10.37.93.23:5060>
User-Agent: Linksys/SPA2102-5.2.5
Content-Length: 0

和来自 Asterisk 的 tcpdump:

E...W,..@.      .
%].............INVITE sip:474264@ip.ip.ip.6 SIP/2.0
Via: SIP/2.0/UDP 10.37.93.21:5060;branch=z9hG4bK6422ee1e
Max-Forwards: 70
From: "asterisk" <sip:XXXX174264@ip.ip.ip.6>;tag=as43ada6c8
To: <sip:474264@ip.ip.ip.6>
Contact: <sip:XXXX174264@10.37.93.21:5060>
Call-ID: 6e8b22967d9c55ea349abb636c0e5263@ip.ip.ip.6
CSeq: 102 INVITE
User-Agent: Linksys/SPA2102-5.2.5
Date: Sat, 19 Jan 2013 18:49:27 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Content-Type: application/sdp
Content-Length: 333

v=0
o=- 413424664 413424664 IN IP4 10.37.93.21
s=Asterisk PBX 11.2.0
c=IN IP4 10.37.93.21
t=0 0
m=audio 10008 RTP/AVP 0 8 3 111 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:3 GSM/8000
a=rtpmap:111 G726-32/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -
a=ptime:20
a=sendrecv

00:49:27.073977 IP ip.ip.ip.6.5060 > 10.37.93.21.5060: SIP, length: 348
E..x..@.>.#.....
%]......d..SIP/2.0 100 Trying
Via: SIP/2.0/UDP 10.37.93.21:5060;branch=z9hG4bK6422ee1e
From: "asterisk" <sip:XXXX174264@ip.ip.ip.6>;tag=as43ada6c8
To: <sip:474264@ip.ip.ip.6>
Call-ID: 6e8b22967d9c55ea349abb636c0e5263@ip.ip.ip.6
CSeq: 102 INVITE
Contact: <sip:474264@ip.ip.ip.6:5060>
Server: MERA MVTS3G v.4.3.0-38t
Content-Length: 0


00:49:27.100102 IP ip.ip.ip.6.5060 > 10.37.93.21.5060: SIP, length: 478
E.....@.>.#?....
%].........SIP/2.0 603 Subscriber account disabled
Via: SIP/2.0/UDP 10.37.93.21:5060;branch=z9hG4bK6422ee1e
From: "asterisk" <sip:XXXX174264@ip.ip.ip.6>;tag=as43ada6c8
To: <sip:474264@ip.ip.ip.6>;tag=179071226-3792791650-4082950052-3026001148
Call-ID: 6e8b22967d9c55ea349abb636c0e5263@ip.ip.ip.6
CSeq: 102 INVITE
Contact: <sip:474264@ip.ip.ip.6:5060>
Server: MERA MVTS3G v.4.3.0-38t
Reason: Centrex;cause=179;text="Subscriber account disabled"
Content-Length: 0


00:49:27.100295 IP 10.37.93.21.5060 > ip.ip.ip.6.5060: SIP, length: 433
E...W-..@.
.
%]...........#,ACK sip:474264@ip.ip.ip.6 SIP/2.0
Via: SIP/2.0/UDP 10.37.93.21:5060;branch=z9hG4bK6422ee1e
Max-Forwards: 70
From: "asterisk" <sip:XXXX174264@ip.ip.ip.6>;tag=as43ada6c8
To: <sip:474264@ip.ip.ip.6>;tag=179071226-3792791650-4082950052-3026001148
Contact: <sip:XXXX174264@10.37.93.21:5060>
Call-ID: 6e8b22967d9c55ea349abb636c0e5263@ip.ip.ip.6
CSeq: 102 ACK
User-Agent: Linksys/SPA2102-5.2.5
Content-Length: 0
4

3 回答 3

1

尝试更改 sip.conf 如下:

[general]
realm=yourprovider-domain-here
useragent = Linksys/PAP2T-5.1.6(LS)
sdpsession= Linksys/PAP2T-5.1.6(LS)
于 2013-01-18T21:50:26.230 回答
1

你可以在拨号方案中使用 SipAddHeader,比如

SipAddHeader(P-Preferred-Identity: <sip:XXXXXX@10.0.10.10>
于 2016-04-10T17:56:49.403 回答
0

有两个地方可以更改这些标题。

从某种意义上说,在您的 PBX 中,PBX -> SPA您应该像这样修改您的sip.conf文件:

[general]
...
realm = my_realm.com ; This will substitute From: "asterisk"

在您的 SPA2102 通话中,SPA -> PBX您必须输入 SPA 配置并更改您的订阅者信息。这是本指南的第 5 步:http ://www.voipvoip.com/spa-2101/其中显示“显示名称”

于 2013-01-16T09:25:56.547 回答