flutter-webrtc / dart-sip-ua

A dart-lang version of the SIP UA stack.
MIT License
329 stars 255 forks source link

dart-sip-ua with FreeSwitch #369

Open mohbadar opened 1 year ago

mohbadar commented 1 year ago

I’ve been attempting to connect with FreeSWITCH using the provided example in this repo, but without success. Has anyone tested this in production?

KunjKanani commented 1 year ago

Hello, @mohbadar Yes, It's working for me on Freewitch. Try double-checking your credential for registration. if possible you can share some screenshots here.

mohbadar commented 1 year ago

Thanks for your response.

This is the registration message:

REGISTER sip:XXXXXX SIP/2.0
Via: SIP/2.0/WSS qcf439d200y5.invalid;branch=z9hG4bK297386310
Max-Forwards: 69
To: <sip:XXX@XXXXX>
From: "SIP UA" <sip:XXX@XXXXXX>;tag=4024709218
Call-ID: 9153u6xpa981au24ktpe33
CSeq: 2 REGISTER
Authorization: Digest algorithm=MD5, username="XXX", realm="XXX", nonce="c57e7909-b51f-43a0-9993-a5a09a229863", uri="sip:XXX", response="61af2ae183f18494ed16fcaf2b31f1e4", qop=auth, cnonce="xraa4646kc3g", nc=00000001
Contact: <sip:50294864@qcf439d200y5.invalid;transport=wss>;+sip.ice;reg-id=1;+sip.instance="<urn:uuid:74d980ab-de44-49c3-88e3-d51d696f188d>";expires=600
Expires: 600
Allow: INVITE,ACK,CANCEL,BYE,UPDATE,MESSAGE,OPTIONS,REFER,INFO,NOTIFY
Supported: path,gruu,outbound
User-Agent: 221
Content-Length: 0

Response from server:

SIP/2.0 403 Forbidden
Via: SIP/2.0/WSS qcf439d200y5.invalid;branch=z9hG4bK297386310;received=X.X.X.X;rport=59774
From: "SIP UA" <sip:XXX@XXXX>;tag=4024709218
To: <sip:XXX@XXXX>;tag=2p3H6FHpZHp3F
Call-ID: 9153u6xpa981au24ktpe33
CSeq: 2 REGISTER
User-Agent: FreeSWITCH
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER, REFER, NOTIFY, PUBLISH, SUBSCRIBE
Supported: timer, path, replaces
Content-Length: 0

Can you assist on this ? @KunjKanani

Or can you share a working sample?

yusuf-umarr commented 1 year ago

use the following guide to connect your freeswitch // Replace this IP address with your FreeSWITCH IP address uri: '1000@127.0.0.1',

// Replace this IP address with your FreeSWITCH IP address // and replace the port with your FreeSWITCH port ws_servers: 'ws://127.0.0.1:7443',

// FreeSWITCH Default Username authorizationUser: '1000',

// FreeSWITCH Default Password password: '1234' };