No caller id transmitted on outbound calls

Hello,

I have installed asterisk 20 on a server connected to a trunk provided by sewan.fr.

All functionalities run as expected: inbound and outbound calls, internal calls, transfers… All but one, when I try to call an external phone, caller id is not transmitted and received shows “private callid” or “unknown” instead of SDA.

In pjsip.conf, I have written:

[SBSR]
        type=endpoint
        transport=tcp-transport
        context=sbsr
        disallow=all
        allow=alaw
        allow=ulaw
        allow=g722
        allow=gsm
        outbound_auth=SBSR_auth
        aors=SBSR
        from_user=trunk-sip
        from_domain=systella2.buroticstore.eu
        direct_media=no

All parameters are mandatory. For example, if I remove from_user or from_domain, trunk remains registered but all external calls fails with following error:

== Everyone is busy/congested at this time (1:0/0/1)

Thus, I have tried to modify dialplan:

        exten => _00[1-79]XXXXXXXX,1,Answer()
                same => n,Set(CALLERID(all)=My name <my phone number>)
                same => n,Dial(PJSIP/${EXTEN:1}@SBSR)
                same => n,Hangup()

Same result.

I have tried to add send_rpid=yes and send_pai=yes in context. With one or these options, outbound calls fail with busy status.

I suppose I have done a mistake somewhere. But where ?

Help will be welcome,

JB

Are you sending a caller ID that your provider has approved?

Of course. I have tried national callerid (05xxxxxxxx) or international (+335xxxxxxxx).

What do you get if you erase this line? It’s often not needed.

Always the same result. No callerid is shown on receiver side.

Try just setting the number:

…Set(CALLERID(num)=05xxxxxxxx…)

        exten => _00[1-79]XXXXXXXX,1,Answer()
                same => n,Set(CALLERID(num)=05xxxxxxxx)
                same => n,Dial(PJSIP/${EXTEN:1}@SBSR)
                same => n,Hangup()

Same result…

Are you sure that the number you set as CID is authorized by your provider ?

I’m sure.

can you post the INVITE you send to your provider

try Set(CALLERID(num)=00335xxxxxxxx) and Set(CALLERID(num)=335xxxxxxxx) and Set(CALLERID(num)=5xxxxxxxx)

If none of them are passed, I’m pretty sure there is a problem with your provider. I faced one time this problem with calls to France when the provider was using foreign gateways: they remove the callerid or insert a number from the gateway country.

and +335xxxxxx if that only want E.164

Perhaps your From: is not OK

Of course:

INVITE sip:0616018060@37.97.65.186:5070 SIP/2.0
Via: SIP/2.0/TCP 62.212.98.88:5060;rport;branch=z9hG4bKPjde812c86-2b06-415f-b815-f797a087fd21;alias
From: <sip:trunk-sip@systella2.buroticstore.eu>;tag=d14f9149-7ef7-481e-8ece-e30781aa5ea6
To: <sip:0616018060@37.97.65.186>
Contact: <sip:trunk-sip@62.212.98.88:5060;transport=TCP>
Call-ID: 5a05b5a2-b0c2-4024-960c-9a61a19cd114
CSeq: 16687 INVITE
Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, REFER, MESSAGE
Supported: 100rel, timer, replaces, norefersub, histinfo
Session-Expires: 1800
Min-SE: 90
Max-Forwards: 70
User-Agent: Asterisk PBX 20.3.0~dfsg+~cs6.13.40431413-1
Proxy-Authorization: Digest username="trunk-sip", realm="systella2.buroticstore.eu", nonce="4dae496c-d7ae-4512-916e-6d7706d2e731", uri="sip:0616018060@37.97.65.186:5070", response="5c49b4b97853587dc585468d10a9ca73", algorithm=MD5, cnonce="9cb59f410b0a41f1b5d83941c0225174", qop=auth, nc=00000001
Content-Type: application/sdp
Content-Length:   308

v=0
o=- 1869000328 1869000328 IN IP4 62.212.98.88
s=Asterisk
c=IN IP4 62.212.98.88
t=0 0
m=audio 17386 RTP/AVP 8 0 9 3 101
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:9 G722/8000
a=rtpmap:3 GSM/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:150
a=sendrecv

I have tried
00335xxxx
335xxxx
05xxxx
5xxxx
+335xxxx

Same result.

Unless you enable RPID or PAI, there is no way the caller ID will get sent, as from_user is overriding the default mechanism. There is no point in trying unless you can find an acceptable way of signalling it.

If they a require a header other than RPID or PAI, you will have to add that explicitly.

My guess is that the one that fails with the busy status is the correct one, and you need to experiment, or read the provider’s documentation, to find out what they will accept there.

2 Likes

Found and solved. Sewan has modified a parameter and now, I can remove from_user from pjsip.conf.

3 posts were split to a new topic: Callerid shows unknown

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