Hello guys,<br><br>many thanks, you were right :)<br><br>I changed the PAI and the RPID stuff and it works ...<br><br>-- KAMAILIO --<br><br># flag 9 = clir<br>if (is_avp_set("$avp(s:caller_cli)/s") && !isflagset(9))<br>
{<br> if (is_present_hf("P-Asserted-Identity"))<br> { remove_hf("P-Asserted-Identity"); }<br><br> if (is_present_hf("Remote-Party-ID"))<br> { remove_hf("Remote-Party-ID"); }<br>
<br> append_hf("P-Asserted-Identity: $avp(s:caller_cli) <sip:$avp(s:caller_cli)@$fd>\r\n");<br> append_hf("Remote-Party-ID: $avp(s:caller_cli) <sip:$avp(s:caller_cli)@$si>;party=caller;privacy=none;screen=yes\r\n");<br>
}<br><br>Do you have a better solution to have the best rpid and pai coding way ?<br>And, is the P-Preferred-Identity really necessary for PSTN ?<br><br><br>log in the gateway :<br><br>-- AUDIOCODES --<br><br>4d:15h:33m:43s ( lgr_flow)(51994 ) ---- Incoming SIP Message from <a href="http://77.246.81.132:5060">77.246.81.132:5060</a> ----<br>
<br>INVITE sip:0663128505@77.246.81.136:5062;transport=udp SIP/2.0<br>Record-Route: <sip:<a href="http://77.246.81.132">77.246.81.132</a>;lr=on;ftag=a4143abfbda0611ao0;nat=yes><br>Via: SIP/2.0/UDP <a href="http://77.246.81.132">77.246.81.132</a>;branch=z9hG4bK89df.da4cd5e2.0<br>
Via: SIP/2.0/UDP 192.168.0.113:5060;rport=15170;received=<a href="http://77.246.81.162">77.246.81.162</a>;branch=z9hG4bK-8a13206a<br>From: "Sam" <<a href="mailto:sip%3A0123451010@sip.720.fr">sip:0123451010@sip.720.fr</a>>;tag=a4143abfbda0611ao0<br>
To: <<a href="mailto:sip%3A0663128505@sip.720.fr">sip:0663128505@sip.720.fr</a>><br>Call-ID: <a href="mailto:ced89363-47d540c6@192.168.0.113">ced89363-47d540c6@192.168.0.113</a><br>CSeq: 102 INVITE<br>Max-Forwards: 49<br>
Contact: "Sam" <<a href="http://sip:0123451010@77.246.81.162:15170">sip:0123451010@77.246.81.162:15170</a>><br>Expires: 240<br>User-Agent: Linksys/SPA941-5.1.8<br>Content-Length: 281<br>Allow: ACK, BYE, CANCEL, INFO, INVITE, NOTIFY, OPTIONS, PRACK, REFER<br>
Supported: 100rel, replaces<br>Content-Type: application/sdp<br>P-Asserted-Identity: 0123451010 <<a href="mailto:sip%3A0123451010@sip.720.fr">sip:0123451010@sip.720.fr</a>><br>Remote-Party-ID: 0123451010 <<a href="mailto:sip%3A0123451010@77.246.81.162">sip:0123451010@77.246.81.162</a>>;party=caller;privacy=none;screen=yes<br>
<br>v=0 o=- 28033614 28033614 IN IP4 <a href="http://192.168.0.113">192.168.0.113</a><br>s=-<br>c=IN IP4 <a href="http://77.246.81.133">77.246.81.133</a><br>t=0 0<br>m=audio 35056 RTP/AVP 18 0 8 101<br>a=rtpmap:18 G729a/8000<br>
a=rtpmap:0 PCMU/8000<br>a=rtpmap:8 PCMA/8000<br>a=rtpmap:101 telephone-event/8000<br>a=fmtp:101 0-15<br>a=ptime:30<br>a=sendrecv<br>a=nortpproxy:yes [Time: 15:33:43]<br><br>( lgr_flow)(51996 ) | | new GetNewSIPCall created - #357 [Time: 15:33:43]<br>
( sip_stack)(51997 ) new AcSIPCallAPI created - #285 [Time: 15:33:43]<br>( lgr_stk_mngr)(51998 ) Resource StackSession <#285> Allocated [Time: 15:33:43]<br>( lgr_flow)(51999 ) | |(SIPTU#357)INVITE State:Idle() [Time: 15:33:43]<br>
( sip_stack)(52000 ) SIPCall(#357) changes state from Idle to Invited [Time: 15:33:43]<br>( lgr_flow)(52001 ) | | | #285:SIP_SETUP_EV(<a href="mailto:ced89363-47d540c6@192.168.0.113">ced89363-47d540c6@192.168.0.113</a>) [Time: 15:33:43]<br>
( lgr_callf)(52002 ) new Call created - #285 [Time: 15:33:43]<br>( lgr_stk_ses)(52003 ) SIPStackSession::HandleStackSetupEV - NEWCALL: SrcPN=0 [Time: 15:33:43]<br>( lgr_stk_ses)(52004 ) <SESSION #285> SendToCall - event: NEW_CALL_EV m_Call = 108260848 [Time: 15:33:43]<br>
<br>( lgr_flow)(52033 ) ---- Incoming SIP Message from <a href="http://77.246.81.132:5060">77.246.81.132:5060</a> ---- [Time: 15:33:43]<br><br>ACK sip:0663128505@77.246.81.136:5062;transport=udp SIP/2.0<br>Via: SIP/2.0/UDP <a href="http://77.246.81.132">77.246.81.132</a>;branch=z9hG4bK89df.da4cd5e2.0<br>
From: "Sam" <<a href="mailto:sip%3A0123451010@sip.720.fr">sip:0123451010@sip.720.fr</a>>;tag=a4143abfbda0611ao0<br>Call-ID: <a href="mailto:ced89363-47d540c6@192.168.0.113">ced89363-47d540c6@192.168.0.113</a><br>
To: <<a href="mailto:sip%3A0663128505@sip.720.fr">sip:0663128505@sip.720.fr</a>>;tag=1c249703390<br>CSeq: 102 ACK<br>Max-Forwards: 70<br>User-Agent: kamailio 1.4.2 - 720 DEGRES<br>Content-Length: 0<br><br>( sip_stack)(52035 ) UdpRtxMngr::Remove 404 Response 102 INVITE [Time: 15:33:43]<br>
( lgr_flow)(52036 ) | |(SIPTU#357)ACK State:Disconnected(<a href="mailto:ced89363-47d540c6@192.168.0.113">ced89363-47d540c6@192.168.0.113</a>) [Time: 15:33:43]<br><br><br>Again, thanks guys :)<br><br>.Sam.<br><br><br><br>
<br><div class="gmail_quote">On Thu, Dec 4, 2008 at 1:35 PM, Klaus Darilion <span dir="ltr"><<a href="mailto:klaus.mailinglists@pernau.at">klaus.mailinglists@pernau.at</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Further, the log message does not have an empty line between SIP headers and the body. Either you have forgotten to add \r\n when adding the header or this is just not diplays correctly in the logfile.<br>
<br>
klaus<br>
<br>
Raj Jain schrieb:<div><div></div><div class="Wj3C7c"><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
It seems that the P-Asserted-Identity header is not correctly<br>
formatted in the INVITE. It must be a sip, sips, or tel URI. This<br>
would be something that your proxy is adding to the INVITE. Here is a<br>
quote from section RFC 3325.<br>
<br>
<br>
9.1 The P-Asserted-Identity Header<br>
<br>
The P-Asserted-Identity header field is used among trusted SIP<br>
entities (typically intermediaries) to carry the identity of the user<br>
sending a SIP message as it was verified by authentication.<br>
<br>
PAssertedID = "P-Asserted-Identity" HCOLON PAssertedID-value<br>
*(COMMA PAssertedID-value)<br>
PAssertedID-value = name-addr / addr-spec<br>
<br>
A P-Asserted-Identity header field value MUST consist of exactly one<br>
name-addr or addr-spec. There may be one or two P-Asserted-Identity<br>
values. If there is one value, it MUST be a sip, sips, or tel URI.<br>
<br>
--<br>
Raj Jain<br>
<br>
On Thu, Dec 4, 2008 at 6:41 AM, Samuel Muller <<a href="mailto:sml@720.fr" target="_blank">sml@720.fr</a>> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hello all,<br>
<br>
I recently add a classical Audiocodes Mediant 2000 with 2x 8E1, the purpose<br>
is to have several interconnections with PSTN.<br>
<br>
I configured it like this :<br>
<br>
Audiocodes registers as a gateway to the Kamailio, using a dedicated port<br>
(5062).<br>
Registration seems to be OK, and the pstn gw uses OPTIONS method to ping the<br>
proxy.<br>
I can attack the Audiocodes with a SIP phone behind Kamailio, no pbm.<br>
<br>
But the audiocodes returns some errors about SIP headers sent by Kamailio :<br>
<br>
( sip_stack)(44732 ) AcSIPParser: Problem in SIP Message Headers [Time:<br>
12:30:26]<br>
( sip_stack)(44733 ) !! [ERROR] AcSIPParser: Parse Error. Unexpected symbol<br>
'0' in scheme. ALPHA expected<br>
<br>
Here you have the example of an INVITE from a SIP phone to the PSTN :<br>
<br>
** audiocodes debug **<br>
<br>
4d:12h:30m:26s ( lgr_flow)(44730 ) ---- Incoming SIP Message from<br>
<a href="http://77.246.81.132:5060" target="_blank">77.246.81.132:5060</a> ----<br>
<br>
INVITE sip:0323719001@77.246.81.136:5062;transport=udp SIP/2.0<br>
Record-Route: <sip:<a href="http://77.246.81.132" target="_blank">77.246.81.132</a>;lr=on;ftag=71078b346a20fb3eo0;nat=yes><br>
Via: SIP/2.0/UDP <a href="http://77.246.81.132" target="_blank">77.246.81.132</a>;branch=z9hG4bKdace.1ab1d59.0<br>
Via: SIP/2.0/UDP<br>
192.168.0.113:5060;rport=15170;received=<a href="http://77.246.81.162" target="_blank">77.246.81.162</a>;branch=z9hG4bK-b432f96<br>
From: "Sam" <<a href="mailto:sip%3A0123451010@sip.720.fr" target="_blank">sip:0123451010@sip.720.fr</a>>;tag=71078b346a20fb3eo0<br>
To: <<a href="mailto:sip%3A0323719001@sip.720.fr" target="_blank">sip:0323719001@sip.720.fr</a>><br>
Call-ID: <a href="mailto:944d8aec-27503ee6@192.168.0.113" target="_blank">944d8aec-27503ee6@192.168.0.113</a><br>
CSeq: 102 INVITE<br>
Max-Forwards: 49<br>
Contact: "Sam" <<a href="http://sip:0123451010@77.246.81.162:15170" target="_blank">sip:0123451010@77.246.81.162:15170</a>><br>
Expires: 240<br>
User-Agent: Linksys/SPA941-5.1.8<br>
Content-Length: 281<br>
Allow: ACK, BYE, CANCEL, INFO, INVITE, NOTIFY, OPTIONS, PRACK, REFER<br>
Supported: 100rel, replaces<br>
Content-Type: application/sdp<br>
P-Asserted-Identity: <0123451010><br>
Remote-Party-ID: <0123451010>;party=caller;privacy=none;screen=yes<br>
v=0<br>
o=- 26933860 26933860 IN IP4 <a href="http://192.168.0.113" target="_blank">192.168.0.113</a><br>
s=-<br>
c=IN IP4 <a href="http://77.246.81.133" target="_blank">77.246.81.133</a><br>
t=0 0<br>
m=audio 35038 RTP/AVP 18 0 8 101<br>
a=rtpmap:18 G729a/8000<br>
a=rtpmap:0 PCMU/8000<br>
a=rtpmap:8 PCMA/8000<br>
a=rtpmap:101 telephone-event/8000<br>
a=fmtp:101 0-15<br>
a=ptime:30<br>
a=sendrecv<br>
a=nortpproxy:yes<br>
<br>
( sip_stack)(44732 ) AcSIPParser: Problem in SIP Message Headers [Time:<br>
12:30:26]<br>
( sip_stack)(44733 ) !! [ERROR] AcSIPParser: Parse Error. Unexpected symbol<br>
'0' in scheme. ALPHA expected<br>
( sip_stack)(44734 ) !! [ERROR] Message type: INVITE [Time: 12:30:26]<br>
( sip_stack)(44735 ) !! [ERROR] Source header: [Time: 12:30:26]<br>
( sip_stack)(44736 ) !! [ERROR] Line: 17. Column: 23 [Time: 12:30:26]<br>
<br>
<br>
The outgoing INVITE from Kamailio is exactly the same received by the<br>
AudioCodes.<br>
When I searched over Google, I just found 2 answers about Asterisk /<br>
Audiocodes unsolved problem, but no more informations.<br>
<br>
I supposed that the problem is as indicated : " s=- " where source is empty<br>
in place of "NULL" / "0" or something like this ...<br>
Someone can confirm or already met the problem ?<br>
<br>
Many thanks all :)<br>
<br>
.Sam.<br>
<br>
<br>
<br>
<br>
<br>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.kamailio.org" target="_blank">Users@lists.kamailio.org</a><br>
<a href="http://lists.kamailio.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.kamailio.org/cgi-bin/mailman/listinfo/users</a><br>
<br>
<br>
</blockquote>
<br>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.kamailio.org" target="_blank">Users@lists.kamailio.org</a><br>
<a href="http://lists.kamailio.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.kamailio.org/cgi-bin/mailman/listinfo/users</a><br>
</blockquote>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Samuel MULLER<br>Ingénieur Reseaux & Telecom<br>720 DEGRES<br>+33 (0)663 128 505<br><a href="mailto:sml@720.fr">sml@720.fr</a><br>