INVITE method has no number set

Tags: #<Tag:0x00007f7029300ea8> #<Tag:0x00007f7029300930>

(virtexultra) #1


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/2.0
    From: <>
    To: <>
    Contact: <sip:USERNAME_SIP@ExternalIPAddr:5062>
    P-Preferred-Identity: <>
    User-Agent: FPBX-
    Proxy-Authorization:  Auth data with nonce and so on
    Route: <>
    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.

(virtexultra) #2

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.

(system) closed #3

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