I had one question. Is it possible to see in a PCA...
# telephony
c
I had one question. Is it possible to see in a PCAP if the call was made to an extenion - had a dtmf code? I am running into this issue where sometimes my CreateSIPParticipantRequest is connecting to the right dtmf code, but sometimes its not.
Copy code
[1:30 PM] request = CreateSIPParticipantRequest(
                sip_trunk_id=get_environment_variable("TELNYX_OUTBOUND_SIP_TRUNK_ID"),
                sip_call_to=destination.phone_number,
                sip_number=agent_number,
                room_name=room_name,
                participant_identity=f"transfer_{uuid.uuid4().hex[:8]}",
                participant_name="Human Agent",
                play_dialtone=False,
                wait_until_answered=True,
            )
            if destination.extension:
                request.dtmf = f"*{destination.extension}"
r
Telnyx should have PCAP files. What call id are you interested in? It will start with
SCL_
c
r
I don't think SIP PCAP will have DTMF, that is likely media layer.
But do do see for
SCL_APnx6eKrAYSk
-
forwarding dtmf to sip
c
The behavior is very intresting. Sometimes it transfers to the extension, but sometimes it just transfers to main number
Not sure why it happens
r
Is this how you are sending DTMF? https://docs.livekit.io/sip/dtmf/
c
I am sending it via request.dtmf = f"*{destination.extension}"
Like the code snippet above
r
Doe this send DTMF? Where did you find that?
request.dtmf =
If you scroll down to the dtmf field you can see it
r
So you are trying to transfer the call and then when it is answered you want to play DTMF ?
c
I am trying to transfer the call directly to an extension
And this seems to be the only way to do it
r
cold transfer?
c
I guess this would be a warm transfer right?
Ideally would like cold transfer
But couldn't find any solution for that
My goal is to basically be able to transfer to extension directly. As a workaround since cold transfer does not support it, I create an outbound call passing this extension in as a dtmf.
r
hmm, I am not sure about how to do that.
c
So passing in the dtmf seems to work
but for some reason for this extension it works sometimes and does not work other times
the extension 9903
not sure if it could be because of the length of the extension or something
r
I see on the two calls you shared above the DTMF was different
c
oh really
are you able to see what they were?
r
I was not quite sure why they looked the way they did. I think was was audio and the other was a control signal
But if you are using the same code I am not sure why they would be different.
I thought we have an example for something like this. I am looking for it.
🙏 1
c
SCL_dPj7XLWWnmrA - this one transferred to the correct one SCL_yemon2aktEU6 - this one did not
Here are two more examples
r
This one I do not see the DTMF
SCL_dPj7XLWWnmrA
Same for
SCL_yemon2aktEU6
They both look similar to me.
c
hmm
What does the DTMF field do under the hood?
r
Have you tried doing the DTMF like is described in the docs istead?
c
I have not
If i am understanding that correctly it physically presses the numbers for the extension?
r
maybe try what you are doing but add a
w
before the numbers. See if that helps with reliablity
c
Yea i did try that, not seeing anything sort of improvement
The code link you provided, how does it work?
r
That is the SIP outbound code you were asking about
I would say try this: https://docs.livekit.io/sip/dtmf/
c
Ah so this is what happens under the hood when passing in a code to the dtmf field?
r
This is the example I was thinking of: https://docs.livekit.io/sip/outbound-calls/#dtmf
That has the dtmf right in the body in stead of on the returned object
c
this is what I am doing right?
oh but your saying adding the dtmf directly to the object?
same behavior
Copy code
request = CreateSIPParticipantRequest(
                sip_trunk_id=get_environment_variable("TELNYX_OUTBOUND_SIP_TRUNK_ID"),
                sip_call_to=destination.phone_number,
                sip_number=agent_number,
                room_name=room_name,
                participant_identity=f"transfer_{uuid.uuid4().hex[:8]}",
                participant_name="Human Agent",
                play_dialtone=True,
                play_ringtone=True,
                wait_until_answered=True,
                dtmf = f"*{destination.extension}" if destination.extension else None
            )
Updated code
Got it to work
It was the * infront that was messing it up
👍 1
g
@cool-iron-91629 were you able to get it to work with a cold transfer. The desired solution would be that the person we transfer to would get the callerId of the person calling in.
p
@cool-iron-91629 - were you able to do a cold transfer to a specific SIP extension using TransferParticipantRequest without creating a new SIPParticipant via outbound trunk?