Alexandre Lision | 8af73cb | 2013-12-10 14:11:20 -0500 | [diff] [blame] | 1 | # $Id$ |
| 2 | import inc_sip as sip |
| 3 | import inc_sdp as sdp |
| 4 | |
| 5 | # Handling of incoming tel: URI. |
| 6 | complete_msg = \ |
| 7 | """INVITE tel:+2065551212 SIP/2.0 |
| 8 | Via: SIP/2.0/UDP $LOCAL_IP:$LOCAL_PORT;rport;x-route-tag="tgrp:cococisco1";branch=z9hG4bK61E05 |
| 9 | From: <tel:12345>$FROM_TAG |
| 10 | To: <tel:+2065551212> |
| 11 | Date: Thu, 12 Feb 2009 18:32:33 GMT |
| 12 | Call-ID: 58F8F7D6-F86A11DD-8013D591-5694EF79 |
| 13 | Supported: 100rel,timer,resource-priority |
| 14 | Min-SE: 86400 |
| 15 | Cisco-Guid: 1492551325-4167700957-2148586897-1452601209 |
| 16 | User-Agent: Cisco-SIPGateway/IOS-12.x |
| 17 | Allow: INVITE, OPTIONS, BYE, CANCEL, ACK, PRACK, UPDATE, REFER, SUBSCRIBE, NOTIFY, INFO, REGISTER |
| 18 | CSeq: 101 INVITE |
| 19 | Max-Forwards: 70 |
| 20 | Timestamp: 1234463553 |
| 21 | Contact: <tel:+1234;ext=1> |
| 22 | Contact: <sip:tester@$LOCAL_IP:$LOCAL_PORT> |
| 23 | Record-Route: <sip:tester@$LOCAL_IP:$LOCAL_PORT;lr> |
| 24 | Expires: 180 |
| 25 | Allow-Events: telephone-event |
| 26 | Content-Type: application/sdp |
| 27 | Content-Disposition: session;handling=required |
| 28 | Content-Length: 265 |
| 29 | |
| 30 | v=0 |
| 31 | o=CiscoSystemsSIP-GW-UserAgent 1296 9529 IN IP4 X.X.X.X |
| 32 | s=SIP Call |
| 33 | c=IN IP4 $LOCAL_IP |
| 34 | t=0 0 |
| 35 | m=audio 18676 RTP/AVP 0 101 19 |
| 36 | c=IN IP4 $LOCAL_IP |
| 37 | a=rtpmap:0 PCMU/8000 |
| 38 | a=rtpmap:101 telephone-event/8000 |
| 39 | a=fmtp:101 0-16 |
| 40 | a=rtpmap:19 CN/8000 |
| 41 | a=ptime:20 |
| 42 | """ |
| 43 | |
| 44 | sendto_cfg = sip.SendtoCfg( "tel: URI", "--null-audio --auto-answer 200", |
| 45 | "", 200, complete_msg=complete_msg) |
| 46 | |