<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-15">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hello,<br>
<br>
I tried to connect two astrisks ( 13.0.2 ) with sip trunking.<br>
When phone a at asterisk-a called phone b at asterisk-b , phone b
showed the name of "fromuser" <br>
instead of phone number of phone a or the call doesn't go through.<br>
I just thought it mayd be possible to get the correct Calling Party
to the display ( ec. E164 ) of phone b for call back, but it is not
easy.<br>
In my simply example it should be the access code of the sip trunk
(80) followed by the phone number of phone a (43) ( = 8043).<br>
The roule to modify the calling party should by something like
caller-id(num)=80${caller-id(num)}. But that ist not the problem.<br>
<br>
phone a ( 42 ) --- asterisk-a ( 81 ) --- sip-trunk --- ( 80 )
asterisk-b --- ( 43 ) phone b <br>
<br>
In my example 42 ( registered to asterisk-a ) called 8143.<br>
<br>
My configuration when caller-id(num) has wrong content but Digest
Authentication went well, phone b rung.<br>
<br>
from sip.conf:<br>
<br>
- Asterisk-A:<br>
<br>
[Asterisk-b] ; Trunk to Asterisk-B<br>
host=192.0.2.31<br>
.<br>
fromuser=<b>asterisk-B</b><br>
username=Asterisk-a<br>
<br>
- Asterisk-B:<br>
<br>
[Asterisk-a]<br>
host=192.0.2.30<br>
fromuser=asterisk-A<br>
username=Asterisk-b<br>
<br>
- Console Asterisk-B:<br>
<br>
"Caller-ID(num) : <b>asterisk-B</b>") in new stack<br>
"Caller-ID(name): Tel. 42") in new stack<br>
<br>
SIP trace ( tshark on Asterisk-B ):<br>
<br>
INVITE <a class="moz-txt-link-freetext" href="sip:43@192.0.2.31:5060">sip:43@192.0.2.31:5060</a> SIP/2.0<br>
Via: SIP/2.0/UDP 192.0.2.30:5060;branch=z9hG4bK2f083335<br>
Contact: <a class="moz-txt-link-rfc2396E" href="sip:asterisk-B@192.0.2.30:5060"><sip:asterisk-B@192.0.2.30:5060></a><br>
<br>
SIP/2.0 401 Unauthorized<br>
<br>
INVITE <a class="moz-txt-link-freetext" href="sip:43@192.0.2.31:5060">sip:43@192.0.2.31:5060</a> SIP/2.0<br>
From: "Tel. 42" <a class="moz-txt-link-rfc2396E" href="sip:asterisk-B@192.0.2.30"><sip:asterisk-B@192.0.2.30></a>;tag=as79667d97<br>
Authorization: Digest username="Asterisk-a", realm="asterisk-b",
algorithm=MD5, uri=<a class="moz-txt-link-rfc2396E" href="sip:43@192.0.2.31:5060">"sip:43@192.0.2.31:5060"</a>, nonce="1f136267",
response="8a263a2c955b3e870e2b9e7e2374b38c"<br>
<br>
<br>
<br>
My configuration when call doesn't go through, Digest Authentication
does not fit:<br>
<br>
from sip.conf:<br>
<br>
- Asterisk-A:<br>
<br>
[Asterisk-b]<br>
host=192.0.2.31<br>
.<br>
; fromuser=asterisk-B<br>
username=<b>Asterisk-a</b><br>
<br>
- Asterisk-B:<br>
<br>
[Asterisk-a]<br>
host=192.0.2.30<br>
.<br>
fromuser=asterisk-A<br>
username=Asterisk-b<br>
<br>
- Console Asterisk-B:<br>
<br>
username mismatch, have <<b>42</b>>, digest has <<b>Asterisk-a</b>><br>
Failed to authenticate device "Tel. 42" <a class="moz-txt-link-rfc2396E" href="sip:42@192.0.2.30"><sip:42@192.0.2.30></a>;<br>
<br>
SIP trace ( tshark on Asterisk-B ):<br>
<br>
INVITE <a class="moz-txt-link-freetext" href="sip:43@192.0.2.31:5060">sip:43@192.0.2.31:5060</a> SIP/2.0<br>
Via: SIP/2.0/UDP 192.0.2.30:5060;branch=z9hG4bK31bb05ad<br>
Contact: <a class="moz-txt-link-rfc2396E" href="sip:42@192.0.2.30:5060"><sip:42@192.0.2.30:5060></a><br>
<br>
SIP/2.0 401 Unauthorized<br>
<br>
INVITE <a class="moz-txt-link-freetext" href="sip:43@192.0.2.31:5060">sip:43@192.0.2.31:5060</a> SIP/2.0<br>
From: "Tel. 42" <a class="moz-txt-link-rfc2396E" href="sip:42@192.0.2.30"><sip:42@192.0.2.30></a>;tag=as3a5bded9<br>
Authorization: Digest username="<b>Asterisk-a</b>",
realm="asterisk-b", algorithm=MD5, uri=<a class="moz-txt-link-rfc2396E" href="sip:43@192.0.2.31:5060">"sip:43@192.0.2.31:5060"</a>,
nonce="7e6fd65f", response="484fc7fde1937a955f65ddce751c374c"<br>
<br>
<br>
</body>
</html>