INVITE method has no number set


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/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-
    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:

exten => s,n,GoSubIf($["${trunk_name}"="@Sipgate_Trunk"]?func-set-sipheader,s,1(P-Preferred-Identity,<sip:${CALLERID(number)}>))
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:” to “outbound_proxy = sip:;lr”. This is all documented in the wiki:

Hope this helps someone else.

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