为什么Kamailio没有正确设置所有标头?
Kamailio路线摘录:
route[PSTN] {
...
# Set from user
$fU = "+34687XXXXXX";
# Set some info headers
append_hf("Remote-Party-ID: <$fu>\r\n");
append_hf("P-Preferred-Identity: <$fu>\r\n");
...
}
ngrep INVITE的结果:
U XXX.XXX.XXX.XXX:5060 -> XXX.XXX.XXX.XXX:5060
INVITE sip:+34951XXXXXX@XXX.XXX.XXX.XXX;transport=udp SIP/2.0.
Record-Route: <sip:XXX.XXX.XXX.XXX;lr>.
Via: SIP/2.0/UDP XXX.XXX.XXX.XXX;branch=z9hG4bKe235.4728a380ee70fc55cc0cecbb7919bee5.0.
Via: SIP/2.0/UDP XXX.XXX.XXX.XXX:38293;rport=38293;branch=z9hG4bK-d8754z-34c6ee584c5f95cd-1---d8754z-.
Max-Forwards: 69.
Contact: <sip:javier.valencia@XXX.XXX.XXX.XXX:38293;transport=UDP>.
To: <sip:951XXXXXX@XXX.XXX.XXX.XXX;transport=UDP>.
From: <sip:+34687XXXXXX@XXX.XXX.XXX.XXX;transport=UDP>;tag=666b4350.
Call-ID: MGY2ODBkZjQ4OWI3ZWFmN2ZiNWQwYzhiZWI5ZmRkYzk..
CSeq: 2 INVITE.
Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO, SUBSCRIBE.
Content-Type: application/sdp.
Supported: replaces, norefersub, extended-refer, timer, X-cisco-serviceuri.
Allow-Events: presence, kpml.
Content-Length: 163.
Remote-Party-ID: <sip:javier.valencia@XXX.XXX.XXX.XXX;transport=UDP>.
P-Preferred-Identity: <sip:javier.valencia@XXX.XXX.XXX.XXX;transport=UDP>.
User-Agent: voiper.es.
.
v=0.
o=Z 0 0 IN IP4 XXX.XXX.XXX.XXX.
s=Z.
c=IN IP4 XXX.XXX.XXX.XXX.
t=0 0.
m=audio 8000 RTP/AVP 8 101.
a=rtpmap:101 telephone-event/8000.
a=fmtp:101 0-15.
a=sendrecv.
发件人标题已正确设置,但远程参与方ID 和 P-Preferred-Identity 未正确设置。< / p>
我在Debian 8上运行Kamailio 4.2.0。
答案 0 :(得分:0)
$ fU特定于Kamailio语法中的FROM用户。您可以尝试将其放入局部变量并将其用于上述目的吗?
答案 1 :(得分:0)
你可以使用它:
$fU = "nway.com.cn";
msg_apply_changes();