[transport-udp]
type = transport
protocol = udp
bind = 0.0.0.0
[trunk]
type = aor
contact = sip:XX.XX.XX.XX
qualify_frequency = 30
[trunk]
type = identify
endpoint = trunk
match = XX.XX.XX.XX
[trunk]
type = endpoint
context = from-trunk
dtmf_mode = rfc4733
disallow = all
allow = ulaw
allow = alaw
direct_media = no
aors = trunk
Hi,
Incoming and outgoing calls are working fine. But for outgoing calls PJSIP gives “CHANUNAVAIL” status for those calls which callers are rejecting(BUSY).
Not a direct answer, but the channel drivers actually return a simulated ISDN cause code (unless they are real ISDN ones), so it is likely to be useful to know what HANGUPCAUSE was actually returned, as the issue with translation could be either incoming or outgoing.
You haven’t provided the outgoing leg signalling, so I can’t tell whether 19 is the correct code based on the received status, or are you saying the call wasn’t attempted at all, which would normally indicate a more serious problem than subscriber busy.
app_dial will not set a DIALSTATUS of BUSY unless it has seen at least one cause 17, so I don’t see how you can get 19 and busy, unless another destination was called in parallel and returned busy.
In that case the RFC says it should be translated to 18 (no user responding).
The channel drivers do not set DIALSTATUS. That is done by the Dial application, and the expected DIALSTATUS for all but a few specific case is CHANUNAVAIL, as that is the fallback.
It does appear that chan_sip translate 480 to no answer, but I think that should cause a NOANSWER DIALSTATUS, not a BUSY one, according to my reading of the code.
Incidentally, DIALSTATUS is only a crude categorisation. In most serious use cases you need to look at HANGUPCAUSE.
It looks to me that both drivers have chosen to diverge from the RFC.
I am dialing on my own mobile number and hanging call withing first ring.
In that case, I’d say the mobile network or your ITSP have already mistranslated the code, as I would reckon the mobile network should have sent cause 21, with a user originate indication, which the ITSP should have translated to 603. That probably comes back as CHANUNAVAIL, as app_dial doesn’t specifically recognize it, so it would fall back to CHANUNAVAIL.
Incidentally 31, appears to be a catch all code, rather than true normal clearing.