python-sdks icon indicating copy to clipboard operation
python-sdks copied to clipboard

Error creating SIP participant

Open harshjoshi16 opened this issue 5 months ago • 2 comments

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!

harshjoshi16 avatar Jul 31 '25 05:07 harshjoshi16

it's likely you passed in the wrong parameters. it's difficult to help because you didn't indicate what they were

davidzhao avatar Aug 18 '25 04:08 davidzhao

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.

harshjoshi16 avatar Aug 19 '25 03:08 harshjoshi16