Problem WIth DialOut

Hi,
I have problem with Dialing Out using the trunk. Unfortunatelly, have no support from operator in case of SIP conversation.
When I trying to call outside, I receive unknown phone number.

In My opinion, my header does not contain number in INVITE command.
How can I put ii? Communication looks like:
[2025-04-10 15:04:26] VERBOSE[160848] res_pjsip_logger.c: <— Transmitting SIP request (1222 bytes) to UDP:195.xxx.xxx.xxx:5060 —>
INVITE sip:195.xxx.xxx.xxx SIP/2.0^M
Via: SIP/2.0/UDP 212.xxx.xxx.xxx:5060;rport;branch=z9hG4bKPjc4d6a5a0-984f-4da8-8665-1636f518cee5^M
From: sip:[email protected];tag=f2661dbb-700d-479c-a353-73c7dfee3178^M
To: sip:[email protected]^M
Contact: sip:[email protected]:5060^M
Call-ID: 4a6bb29a-4860-4c11-85f6-eb5f379471df^M
CSeq: 7310 INVITE^M
Allow: OPTIONS, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INFO, MESSAGE, REFER^M
Supported: 100rel, timer, replaces, norefersub, histinfo^M
Session-Expires: 1800^M
Min-SE: 90^M
Max-Forwards: 70^M
User-Agent: FPBX-17.0.19.24(22.1.0)^M
Proxy-Authorization: Digest username=“motorstest”, realm=“195.xxx.xxx.xxx”, nonce=“67f7c1f8ebb02eb134d18ff408f2ff6fbbed07b0”, uri=“sip:195.xxx.xxx.xxx”, response=“cba5c86aa76f83b40d52df8f5dee2c7d”^M
Route: sip:[email protected]:5060^M
Content-Type: application/sdp^M
Content-Length: 288^M
^M
v=0^M
o=- 343881126 343881126 IN IP4 212.xxx.xxx.xxx^M
s=Asterisk^M
c=IN IP4 212.xxx.xxx.xxx^M
t=0 0^M
m=audio 10812 RTP/AVP 9 18 101^M
a=rtpmap:9 G722/8000^M
a=rtpmap:18 G729/8000^M
a=fmtp:18 annexb=no^M
a=rtpmap:101 telephone-event/8000^M
a=fmtp:101 0-16^M
a=ptime:20^M
a=maxptime:140^M
a=sendrecv^M

[2025-04-10 15:04:26] VERBOSE[1746] res_pjsip_logger.c: <— Received SIP response (401 bytes) from UDP:195.xxx.xxx.xxx:5060 —>
SIP/2.0 100 Trying^M
Via: SIP/2.0/UDP 212.xxx.xxx.xxx:5060;rport=5060;branch=z9hG4bKPjc4d6a5a0-984f-4da8-8665-1636f518cee5;received=212.xxx.xxx.xxx^M
From: sip:[email protected];tag=f2661dbb-700d-479c-a353-73c7dfee3178^M
To: sip:[email protected]^M
Call-ID: 4a6bb29a-4860-4c11-85f6-eb5f379471df^M
CSeq: 7310 INVITE^M
Server: Kamailio (1.4.4-notls (i386/linux))^M
Content-Length: 0^M
^M

[2025-04-10 15:04:26] VERBOSE[1746] res_pjsip_logger.c: <— Received SIP response (479 bytes) from UDP:195.xxx.xxx.xxx:5060 —>
SIP/2.0 404 Not Found^M
Via: SIP/2.0/UDP 212.xxx.xxx.xxx:5060;rport=5060;branch=z9hG4bKPjc4d6a5a0-984f-4da8-8665-1636f518cee5^M
From: sip:[email protected];tag=f2661dbb-700d-479c-a353-73c7dfee3178^M
To: sip:[email protected];tag=as62d9f9da^M
Call-ID: 4a6bb29a-4860-4c11-85f6-eb5f379471df^M
CSeq: 7310 INVITE^M
Server: HiperusC5^M
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH^M
Supported: replaces, timer^M
Content-Length: 0^M

The outbound proxy is wrongly specified, and, if this log has been consistently redacted, appears to be unnecessary.

Outbound proxy, in chan_pjsip, is handled as though it were received in a Record-Route header. For the INVITE to contain the final target, and not the outbound proxy, the lr parameter needs to be present. Some providers do not like Route headers, even when there is a real outbound proxy, so there is another parameter (which I think is non-standard), “hide”.

So, if you really do need an outbound proxy (i.e. if the first hop domain is not the final domain, or an explicit Route header is needed), you need:

sip:195.xxx.xxx.xxx\;lr

or

sip:195.xxx.xxx.xxx\;lr\;hide

depending on whether or not a Route header is tolerated or required. The backlash is because this goes into a .conf file, and ; starts a comment.

Without ;lr, the request URI is the first hop, and the Route header is a chain, ending in the final destination. With ;lr, he request URI is the final destination, and the Route header starts with the first hop, and doesn’t include the final destination.

1 Like

Than You very much! Yes, I had wrongly specified proxy server,
it was:
sip:195.xxx.xxx.xxx;lr,hidden - I added hidden parameter during tests
should be:
sip:195.xxx.xxx.xxx\;lr
there was no backslash after Proxy’s IP address.

Thank You again!
Krzysztof

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