03-21-2007, 03:07 AM | #21 | |
Member
Join Date: Mar 2006
Posts: 96
Thanks: 8 Thanked 26 Times in 19 Posts |
workaround using udp_echo
Quote:
I did this by slightly modifying Christopher Brewer's "udpserv: A simple UDP echo server" program. http://www.gomorgan89.com/winsock/udpserv.html The added bits are: Code:
struct sockaddr_in dest_client; /* Info about the destination client */ ... char *buffer_ptr; ... dest_client.sin_family = AF_INET; dest_client.sin_port = htons((unsigned short)6080); dest_client.sin_addr.s_addr = inet_addr("192.168.11.1"); ... /* Receive bytes from client */ ... /* Send data back */ /* (after adding 0x0d 0x0a to the end of it */ if( buffer[bytes_received-1] != 0x0d && buffer[bytes_received-1] != 0x0a ) { buffer[bytes_received++] = 0x0d; buffer[bytes_received++] = 0x0a; } /* * modify port in request uri from 5061 to 6080 */ if( buffer[0] == 'A' ) /* for ACK */ buffer_ptr = &buffer[32]; else buffer_ptr = &buffer[35]; *buffer_ptr++ = 0x36; *buffer_ptr++ = 0x30; *buffer_ptr++ = 0x38; *buffer_ptr++ = 0x30; if (sendto(sd, buffer, bytes_received, 0, (struct sockaddr *)&dest_client, client_length) != bytes_received) ... So when someone calls my 0505536xxxx number (either from the PSTN, or through VoIP), the SIP INVITE packet comes straight through to my windows98 laptop, the above udp echo program adds in the missing CRLF (if necessary), changes the port in the request URI from 5061 to 6080, and then sends it to the AT-530. The AT-530 then handles it as if the correctly formatted packet had arrived straight from the SIP server. One of the fascinating things about RFC3261 SIP, which allows the above trick to work, is that (correct me if I'm wrong, Martin) the source address and source port from which SIP messages arrive, is never actually used, unless you are doing "extra-RFC3261" things such as "NAT assistance" or using "rport" parameters in Via headers. Perhaps a similar technique could remove the "=on" from the ";lr" parameter for people using the NTT-West SVIII modem. |
|
06-19-2007, 11:51 AM | #22 | |
Member
Join Date: Mar 2006
Posts: 96
Thanks: 8 Thanked 26 Times in 19 Posts |
Quote:
I have a hunch that this might be because of the "lr=on" problem; the responses are getting there, but because of "lr=on", 202.238.94.166 rejects the messages as non-compliant. I'm thinking that Craig Peacock's "sipdebug" might show what the problem is. SIP Debug Proxy Server |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Dial plan problems with FaktorTel and VoXaLoT | Hally | Voxalot Support | 1 | 01-06-2007 09:21 AM |
dial plan for ** won't get you speed dial | d85551 | Voxalot Support | 0 | 11-30-2006 12:00 PM |
dial plan help please | muzzza | Voxalot Support | 0 | 09-01-2006 11:38 AM |
Dial Plan for Italy wanted!!! | moonshiner | Voxalot Support | 32 | 08-20-2006 10:26 PM |
Voxalot as Provider in Dial Plan | vpsaini | Voxalot Support | 2 | 06-27-2006 09:36 AM |