INVITE method has no number set

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:[email protected] SIP/2.0
    From: <sip:[email protected]>
    To: <sip:[email protected]>
    Contact: <sip:[email protected]:5062>
    P-Preferred-Identity: <sip:[email protected]>
    User-Agent: FPBX-14.0.13.40(13.36.0)
    Proxy-Authorization:  Auth data with nonce and so on
    Route: <sip:[email protected]>
    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.

Hello again,

I’ve found the solution. For my understanding, the use of an proxy makes the difference. You have to add the loose routing option to the outbound_proxy parameter.

Like “outbound_proxy = sip:192.168.0.1” to “outbound_proxy = sip:192.168.0.1;lr”. This is all documented in the wiki:

https://wiki.asterisk.org/wiki/display/AST/PJSIP+with+Proxies

Hope this helps someone else.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.