InnovateAsterisk / Browser-Phone

A fully featured browser based WebRTC SIP phone for Asterisk

Home Page:https://www.innovateasterisk.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

caller ID when blind transfer

vieridipaola opened this issue · comments

Hi,

When a Browser Phone webrtc client (A) picks up an incoming PSTN call with, say, caller ID "someone <1234567890>" and blindly transfers it to another local Browser Phone webrtc client (B), the expected caller ID is shown while the call is ringing in B (ie. "someone <1234567890>").

However, if A calls a number in PSTN (eg. "someone <1234567890>") and transfers it blindly to B, the latter sees "s <s>" as the caller.

I don't know how SIP REFER works in this case.

I'm not sure Browser Phone needs to do anything differently in this case.
However, I'm not finding anything useful in the Asterisk log.
All I see is that when the call comes in for B as REFER, the value of ${CALLERID(num)} is already 's'.

Any ideas?

[EDIT] Come to think of it, maybe it's expected to be this way on a blind transfer of an outgoing call (vs. incoming). However, I'd like to know if this can be changed/customized so that the caller ID data is that of A in my example above or maybe even that of the called party (depending on the use case).

The “s” extension is used when there is no known called number in the context used.

The “s” extension is used when starting a call. It is also used when defining a macro()

Incoming calls are always placed in a context in the dialplan, either one you specify in the channel configuration file, or the default context. If no other match exist for the call within the context, the s extension is activated.

Handling of Caller ID is normally the task of the PBX.

Correct.
I found that I was using "macro" Gosubs to call out the PSTN, and I was also using the "s" extension and using ARG1 as the called number.
I changed the gosub context to use _X. instead of s and ARG1.
I can now transfer calls as described before and the caller number is maintained as expected.
Thank you very much for the tip!