Does anybody have a sample for a call acceptance script? I want to ring 3 phones at the same time and force the user to hit '1' to accept the call. If they don't hit 1, it just continues to ring the other phones.
http://wiki.freeswitch.org/wiki/Freeswitch_IVR_Originate /b On Dec 24, 2007, at 10:09 AM, Peder @ NetworkOblivion wrote:
Does anybody have a sample for a call acceptance script? I want to ring 3 phones at the same time and force the user to hit '1' to accept the call. If they don't hit 1, it just continues to ring the other phones.
_______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Hi all - Got a bit of an issue with registering endpoints - these being phones - with FS, which is that the username used for authentication is not necessarily the same as the username used for call routing. This is fine if you can trust your users (and their endpoints) to set them to be the same, but I can't. To be specific, a dialplan entry such as a bridge to sofia/sip.foo.com/2000%sip.foo.com will call whoever has set their SIP username to be 2000, which might be different to who's authenticated using an authentication username of 2000. Less wordily, any user can get any other user's calls by changing their SIP username to match that user's. I've added a few lines to src/mod/endpoints/mod_sofia/sofia_reg.c (see attached) to allow the username for an endpoint to be forced to be something, in the same way as sip-force-contact allows the contact to be set. A directory entry might now look like: <section name="directory"> <domain name="testing"> <user id="2000"> <params> <param name="password" value="password" /> </params> <variables> <variable name="sip-force-user" value="2000" /> </variables> </user> </domain> </section> A couple of questions. Firstly, have I overlooked something blindingly obvious here and am I barking up completely the wrong tree? Assuming not, is this the right approach, or should we - instead of forcing the username to be something - verify that it is that something and refuse the registration if not? Cheers -- Dave *** 344,349 **** --- 344,350 ---- int network_port; int cd = 0; const char *call_id = NULL; + char *force_user; /* all callers must confirm that sip, sip->sip_request and sip->sip_contact are not NULL */ switch_assert(sip != NULL && sip->sip_contact != NULL && sip->sip_request != NULL); *************** *** 419,424 **** --- 420,433 ---- char *exp_var; register_gateway = switch_event_get_header(*v_event, "sip-register-gateway"); + + /* Allow us to force the SIP user to be something specific - needed if + * we - for example - want to be able to ensure that the username a UA can + * be contacted at is the same one that they used for authentication. + */ + if ((force_user = switch_event_get_header(*v_event, "sip-force-user"))) { + to_user = force_user; + } if ((v_contact_str = switch_event_get_header(*v_event, "sip-force-contact"))) { if (!strcasecmp(v_contact_str, "nat-connectile-dysfunction") || !strcasecmp(v_contact_str, "NDLB-connectile-dysfunction")) {
Brian West wrote:
On Dec 26, 2007, at 8:02 AM, David Knell wrote:
Less wordily, any user can get any other user's calls by changing their SIP username to match that user's.
How can they do that if auth calls is turned on? If you have blind reg on then sure someone could.
They can do it because their SIP username is not necessarily the same as the name used for authentication, and its the SIP username that's used for call routing. Here's a bit of a REGISTER: Via: SIP/2.0/UDP 192.168.0.103:42074;branch=z9hG4bK-d8754z-894af021546db132-1---d8754z-;rport Max-Forwards: 70 Contact: <sip:sipusername@75.71.186.17:42074;rinstance=65c73083353adf9d>;expires=0 To: "sipdisplayname"<sip:sipusername@78.129.143.200> From: "sipdisplayname"<sip:sipusername@78.129.143.200>;tag=b2127143 Call-ID: NjY0MmU5ZjhhMTJhZmFlYWJhMmM4MDY3NTVjZjlkYWI. CSeq: 3 REGISTER Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO User-Agent: eyeBeam release 1013t stamp 43070 Authorization: Digest username="sipauthname",realm="78.129.143.200",nonce="2da9c5ae-b512-11dc-92d4a9bf24bac484",uri="sip:78.129.143.200",response="c13fe382888ec016e234595b608caab0",cnonce="780c520efb22fe9fdf270fd8cd5e2a28",nc=00000002,qop=a Content-Length: 0 - note that sipdisplayname, sipusername and sipauthname are all distinct. --Dave
Are you talking inbound or outbound registrations from FreeSWITCh or to FreeSWITCH? /b On Dec 26, 2007, at 9:47 AM, David Knell wrote:
Brian West wrote:
On Dec 26, 2007, at 8:02 AM, David Knell wrote:
Less wordily, any user can get any other user's calls by changing their SIP username to match that user's.
How can they do that if auth calls is turned on? If you have blind reg on then sure someone could.
They can do it because their SIP username is not necessarily the same as the name used for authentication, and its the SIP username that's used for call routing. Here's a bit of a REGISTER:
Via: SIP/2.0/UDP 192.168.0.103:42074;branch=z9hG4bK- d8754z-894af021546db132-1---d8754z-;rport Max-Forwards: 70 Contact: <sip:sipusername@75.71.186.17:42074;rinstance=65c73083353adf9d
;expires=0 To: "sipdisplayname"<sip:sipusername@78.129.143.200> From: "sipdisplayname"<sip:sipusername@78.129.143.200>;tag=b2127143 Call-ID: NjY0MmU5ZjhhMTJhZmFlYWJhMmM4MDY3NTVjZjlkYWI. CSeq: 3 REGISTER Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO User-Agent: eyeBeam release 1013t stamp 43070 Authorization: Digest username="sipauthname",realm="78.129.143.200",nonce="2da9c5ae- b512-11dc-92d4a9bf24bac484",uri="sip: 78.129.143.200 ",response = "c13fe382888ec016e234595b608caab0 ",cnonce="780c520efb22fe9fdf270fd8cd5e2a28",nc=00000002,qop=a Content-Length: 0
- note that sipdisplayname, sipusername and sipauthname are all distinct.
--Dave
_______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Hi Brian, I'm talking phones registering with FreeSWITCH, and how calls are routed to them. I'll sit on the IRC channel for a bit - give me a shout if you've a moment. Cheers -- Dave
Are you talking inbound or outbound registrations from FreeSWITCh or to FreeSWITCH?
/b
On Dec 26, 2007, at 9:47 AM, David Knell wrote:
Brian West wrote:
On Dec 26, 2007, at 8:02 AM, David Knell wrote:
Less wordily, any user can get any other user's calls by changing their SIP username to match that user's.
How can they do that if auth calls is turned on? If you have blind reg on then sure someone could.
They can do it because their SIP username is not necessarily the same as the name used for authentication, and its the SIP username that's used for call routing. Here's a bit of a REGISTER:
Via: SIP/2.0/UDP 192.168.0.103:42074;branch=z9hG4bK- d8754z-894af021546db132-1---d8754z-;rport Max-Forwards: 70 Contact: <sip:sipusername@75.71.186.17:42074;rinstance=65c73083353adf9d
;expires=0
To: "sipdisplayname"<sip:sipusername@78.129.143.200> From: "sipdisplayname"<sip:sipusername@78.129.143.200>;tag=b2127143 Call-ID: NjY0MmU5ZjhhMTJhZmFlYWJhMmM4MDY3NTVjZjlkYWI. CSeq: 3 REGISTER Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO User-Agent: eyeBeam release 1013t stamp 43070 Authorization: Digest username="sipauthname",realm="78.129.143.200",nonce="2da9c5ae- b512-11dc-92d4a9bf24bac484",uri="sip: 78.129.143.200 ",response = "c13fe382888ec016e234595b608caab0 ",cnonce="780c520efb22fe9fdf270fd8cd5e2a28",nc=00000002,qop=a Content-Length: 0
- note that sipdisplayname, sipusername and sipauthname are all distinct.
--Dave
_______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- David Knell, Director, 3C Limited T: 020 8114 8901 F: 020 8692 0677 M: 07773 800623 http://www.3c.co.uk
FreeSWITCH isn't responsible for doing that. Your phone registered with FreeSWITCH gets the second invite and injects the beep for the call waiting locally on the phone itself. Or not.. some might.. It would be on the display. /b On Dec 26, 2007, at 4:36 PM, David Knell wrote:
Hi Brian,
I'm talking phones registering with FreeSWITCH, and how calls are routed to them. I'll sit on the IRC channel for a bit - give me a shout if you've a moment.
Cheers --
Dave
David, I think I got your response mixed up with the call waiting thread :P mybad, /b On Dec 26, 2007, at 4:42 PM, Brian West wrote:
FreeSWITCH isn't responsible for doing that. Your phone registered with FreeSWITCH gets the second invite and injects the beep for the call waiting locally on the phone itself. Or not.. some might.. It would be on the display.
/b
On Dec 26, 2007, at 4:36 PM, David Knell wrote:
Hi Brian,
I'm talking phones registering with FreeSWITCH, and how calls are routed to them. I'll sit on the IRC channel for a bit - give me a shout if you've a moment.
Cheers --
Dave
_______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
participants (3)
-
Brian West
-
David Knell
-
Peder @ NetworkOblivion