Hello,
when I try to make an outbound call via a pjsip trunk with provider sipgate, the capture of wireshark shows that in the request line there is no number transmitted.
Session Initiation Protocol (INVITE)
Request-Line: INVITE sip:sipconnect.sipgate.de SIP/2.0
Should be: INVITE sip:CalledNumber@sipconnect.sipgate.de SIP/2.0
From: <sip:USERNAME_SIP@sipgate.de>
To: <sip:CalledNumber@sipconnect.sipgate.de>
Contact: <sip:USERNAME_SIP@ExternalIPAddr:5062>
P-Preferred-Identity: <sip:OWN_Number@sipconnect.sipgate.de>
User-Agent: FPBX-14.0.13.40(13.36.0)
Proxy-Authorization: Auth data with nonce and so on
Route: <sip:CalledNumber@sipconnect.sipgate.de>
Content-Type: application/sdp
Content-Length: 264
Message Body
As a result of this the provider sipgate is responding with 404 not found.
On another trunk the number is transferred, I’ve found no real differences between the two trunks - only that the other trunk has an Client-URI for registration, but this is not necessary for sipgate.
Incoming calls are working.
To set the P-Preferred-Identity as required by the provider I use the following:
[macro-dialout-trunk-predial-hook]
s,n,ExecIF($["${OUT_${DIAL_TRUNK}_SUFFIX}"!=""]?Set(trunk_name=${OUT_${DIAL_TRUNK}_SUFFIX}):Set(trunk_name=${OUT_${DIAL_TRUNK}}))
exten => s,n,GoSubIf($["${trunk_name}"="@Sipgate_Trunk"]?func-set-sipheader,s,1(P-Preferred-Identity,<sip:${CALLERID(number)}@sipconnect.sipgate.de>))
exten => s,n,MacroExit
Same problem also described here:
Maybe somebody can give me a hint how to specify the format of the request line in pjsip.
Thanks in advance.