Error creating SIP participant
I am getting this error while creating a participant for an outbound call:
Error creating SIP participant: TwirpError(code=invalid_argument, message=twirp error unknown: INVITE failed: sip status: 400 (BAD_REQUEST), status=400, metadata={'error_details': 'CAMSLElOVklURSBmYWlsZWQ6IHNpcCBzdGF0dXM6IDQwMCAoQkFEX1JFUVVFU1QpGiwKJXR5cGUuZ29vZ2xlYXBpcy5jb20vbGl2ZWtpdC5TSVBTdGF0dXMSAwiQAw==', 'sip_status': 'SIP_STATUS_BAD_REQUEST', 'sip_status_code': '400'})
I am setting the following parameters for CreateSIPParticipantRequest
- room_name
- sip_trunk_id
- sip_call_to
- participant_identity
- participant_name
- wait_until_answered
It seems I am not sending correct parameters. I am not able to figure out what is wrong with the ones I am currently passing or if something needs to be added or removed.
I could really use some guidance here. Thanks in Advance!
it's likely you passed in the wrong parameters. it's difficult to help because you didn't indicate what they were
Hi,
I am passing the values like this -
participant_config = {"room_name": room.name,
"sip_trunk_id": outbound_trunk.sip_trunk_id,
"sip_call_to": call_config.to_number,
"participant_identity": str(call_config.to_number),
"participant_name": "test caller",
"wait_until_answered": True,
}
If I comment the last two (participant_name and wait_until_answered), the error goes away.