[Asterisk-Users] getting cid from spa3k pstn to *

Randy Bush randy at psg.com
Wed Nov 3 15:40:29 MST 2004


i am still going crazy with this one.  i can not get callerid from a call
received on the spa3k pstn to asterisk.  THIS USED TO WORK!

in order to get the cid from the spa3k to *, i need to turn on
PSTN / PSTN-To-VoIP Gateway Setup / PSTN CID For VoIP CID: = YES

the sip.conf entry looks like
    [spa3k]
    type=friend
    host=dynamic
    port=5061
    auth=md5
    secret=hidden
    qualify=1000
    dtmfmode=rfc2833
    canreinvite=yes
    context=spa3k-ext

this produces a sip exchange as follows:

    No.     Time        Source                Destination           Protocol Info
	  1 0.000000    spa3k asterisk.foo.edu         SIP/SDP  Request: INVITE sip:105 at asterisk.foo.edu, with session description

    Frame 1 (1095 bytes on wire, 1095 bytes captured)
    Ethernet II, Src: 00:90:69:6d:e8:00, Dst: 00:30:48:80:b3:72
    Internet Protocol, Src Addr: spa3k (spa3k), Dst Addr: asterisk.foo.edu (asterisk-ip-ad)
    User Datagram Protocol, Src Port: 5061 (5061), Dst Port: 5060 (5060)
    Session Initiation Protocol
	Request-Line: INVITE sip:105 at asterisk.foo.edu SIP/2.0
	Message Header
	    Via: SIP/2.0/UDP spa3k:5061;branch=z9hG4bK-f9456447
	    From: CallerName            <sip:2065551212 at asterisk.foo.edu>;tag=54e649b356424567o1
		SIP Display info: CallerName            
		SIP from address: sip:2065551212 at asterisk.foo.edu
		SIP tag: 54e649b356424567o1
	    To: <sip:105 at asterisk.foo.edu>
		SIP to address: sip:105 at asterisk.foo.edu
	    Remote-Party-ID: CallerName            <sip:2065551212 at asterisk.foo.edu>;screen=yes;party=calling
	    Call-ID: 51efe8a3-2d73b337 at spa3k
	    CSeq: 101 INVITE
	    Max-Forwards: 70
	    Contact: biwa 0431 <sip:biwaa1-in at spa3k:5061>
	    Expires: 240
	    User-Agent: Sipura/SPA3000-2.0.11(GWa)
	    Content-Length: 430
	    Allow: ACK, BYE, CANCEL, INFO, INVITE, NOTIFY, OPTIONS, REFER
	    Supported: x-sipura
	    Content-Type: application/sdp
	Message body
	    Session Description Protocol

    No.     Time        Source                Destination           Protocol Info
	  2 0.000514    asterisk.foo.edu         spa3k SIP      Status: 407 Proxy Authentication Required

    Frame 2 (520 bytes on wire, 520 bytes captured)
    Ethernet II, Src: 00:30:48:80:b3:72, Dst: 00:20:fc:1e:ce:3a
    Internet Protocol, Src Addr: asterisk.foo.edu (asterisk-ip-ad), Dst Addr: spa3k (spa3k)
    User Datagram Protocol, Src Port: 5060 (5060), Dst Port: 5061 (5061)
    Session Initiation Protocol
	Status-Line: SIP/2.0 407 Proxy Authentication Required
	Message Header
	    Via: SIP/2.0/UDP spa3k:5061;branch=z9hG4bK-f9456447
	    From: CallerName            <sip:2065551212 at asterisk.foo.edu>;tag=54e649b356424567o1
		SIP Display info: CallerName            
		SIP from address: sip:2065551212 at asterisk.foo.edu
		SIP tag: 54e649b356424567o1
	    To: <sip:105 at asterisk.foo.edu>;tag=as741941ff
		SIP to address: sip:105 at asterisk.foo.edu
		SIP tag: as741941ff
	    Call-ID: 51efe8a3-2d73b337 at spa3k
	    CSeq: 101 INVITE
	    User-Agent: Asterisk PBX
	    Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER
	    Contact: <sip:105 at asterisk-ip-ad>
	    Proxy-Authenticate: Digest realm="asterisk", nonce="263c07e5"
	    Content-Length: 0

    No.     Time        Source                Destination           Protocol Info
	  3 0.090441    spa3k asterisk.foo.edu         SIP      Request: ACK sip:105 at asterisk.foo.edu

    Frame 3 (453 bytes on wire, 453 bytes captured)
    Ethernet II, Src: 00:90:69:6d:e8:00, Dst: 00:30:48:80:b3:72
    Internet Protocol, Src Addr: spa3k (spa3k), Dst Addr: asterisk.foo.edu (asterisk-ip-ad)
    User Datagram Protocol, Src Port: 5061 (5061), Dst Port: 5060 (5060)
    Session Initiation Protocol
	Request-Line: ACK sip:105 at asterisk.foo.edu SIP/2.0
	Message Header
	    Via: SIP/2.0/UDP spa3k:5061;branch=z9hG4bK-f9456447
	    From: CallerName            <sip:2065551212 at asterisk.foo.edu>;tag=54e649b356424567o1
		SIP Display info: CallerName            
		SIP from address: sip:2065551212 at asterisk.foo.edu
		SIP tag: 54e649b356424567o1
	    To: <sip:105 at asterisk.foo.edu>;tag=as741941ff
		SIP to address: sip:105 at asterisk.foo.edu
		SIP tag: as741941ff
	    Call-ID: 51efe8a3-2d73b337 at spa3k
	    CSeq: 101 ACK
	    Max-Forwards: 70
	    Contact: biwa 0431 <sip:biwaa1-in at spa3k:5061>
	    User-Agent: Sipura/SPA3000-2.0.11(GWa)
	    Content-Length: 0

    No.     Time        Source                Destination           Protocol Info
	  4 0.135913    spa3k asterisk.foo.edu         SIP/SDP  Request: INVITE sip:105 at asterisk.foo.edu, with session description

    Frame 4 (1265 bytes on wire, 1265 bytes captured)
    Ethernet II, Src: 00:90:69:6d:e8:00, Dst: 00:30:48:80:b3:72
    Internet Protocol, Src Addr: spa3k (spa3k), Dst Addr: asterisk.foo.edu (asterisk-ip-ad)
    User Datagram Protocol, Src Port: 5061 (5061), Dst Port: 5060 (5060)
    Session Initiation Protocol
	Request-Line: INVITE sip:105 at asterisk.foo.edu SIP/2.0
	Message Header
	    Via: SIP/2.0/UDP spa3k:5061;branch=z9hG4bK-e2744867
	    From: CallerName            <sip:2065551212 at asterisk.foo.edu>;tag=54e649b356424567o1
		SIP Display info: CallerName            
		SIP from address: sip:2065551212 at asterisk.foo.edu
		SIP tag: 54e649b356424567o1
	    To: <sip:105 at asterisk.foo.edu>
		SIP to address: sip:105 at asterisk.foo.edu
	    Remote-Party-ID: CallerName            <sip:2065551212 at asterisk.foo.edu>;screen=yes;party=calling
	    Call-ID: 51efe8a3-2d73b337 at spa3k
	    CSeq: 102 INVITE
	    Max-Forwards: 70
	    Proxy-Authorization: Digest username="biwaa1-in",realm="asterisk",nonce="263c07e5",uri="sip:105 at asterisk.foo.edu",algorithm=MD5,response="f8e02292686b3b5cb2117186b1474ba9"
	    Contact: biwa 0431 <sip:biwaa1-in at spa3k:5061>
	    Expires: 240
	    User-Agent: Sipura/SPA3000-2.0.11(GWa)
	    Content-Length: 430
	    Allow: ACK, BYE, CANCEL, INFO, INVITE, NOTIFY, OPTIONS, REFER
	    Supported: x-sipura
	    Content-Type: application/sdp
	Message body
	    Session Description Protocol

    No.     Time        Source                Destination           Protocol Info
	  5 0.136261    asterisk.foo.edu         spa3k SIP      Status: 403 Forbidden

    Frame 5 (437 bytes on wire, 437 bytes captured)
    Ethernet II, Src: 00:30:48:80:b3:72, Dst: 00:20:fc:1e:ce:3a
    Internet Protocol, Src Addr: asterisk.foo.edu (asterisk-ip-ad), Dst Addr: spa3k (spa3k)
    User Datagram Protocol, Src Port: 5060 (5060), Dst Port: 5061 (5061)
    Session Initiation Protocol
	Status-Line: SIP/2.0 403 Forbidden
	Message Header
	    Via: SIP/2.0/UDP spa3k:5061;branch=z9hG4bK-e2744867
	    From: CallerName            <sip:2065551212 at asterisk.foo.edu>;tag=54e649b356424567o1
		SIP Display info: CallerName            
		SIP from address: sip:2065551212 at asterisk.foo.edu
		SIP tag: 54e649b356424567o1
	    To: <sip:105 at asterisk.foo.edu>;tag=as741941ff
		SIP to address: sip:105 at asterisk.foo.edu
		SIP tag: as741941ff
	    Call-ID: 51efe8a3-2d73b337 at spa3k
	    CSeq: 102 INVITE
	    User-Agent: Asterisk PBX
	    Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER
	    Contact: <sip:105 at asterisk-ip-ad>
	    Content-Length: 0

    No.     Time        Source                Destination           Protocol Info
	  6 0.383761    spa3k asterisk.foo.edu         SIP      Request: ACK sip:105 at asterisk.foo.edu

    Frame 6 (623 bytes on wire, 623 bytes captured)
    Ethernet II, Src: 00:90:69:6d:e8:00, Dst: 00:30:48:80:b3:72
    Internet Protocol, Src Addr: spa3k (spa3k), Dst Addr: asterisk.foo.edu (asterisk-ip-ad)
    User Datagram Protocol, Src Port: 5061 (5061), Dst Port: 5060 (5060)
    Session Initiation Protocol
	Request-Line: ACK sip:105 at asterisk.foo.edu SIP/2.0
	Message Header
	    Via: SIP/2.0/UDP spa3k:5061;branch=z9hG4bK-e2744867
	    From: CallerName            <sip:2065551212 at asterisk.foo.edu>;tag=54e649b356424567o1
		SIP Display info: CallerName            
		SIP from address: sip:2065551212 at asterisk.foo.edu
		SIP tag: 54e649b356424567o1
	    To: <sip:105 at asterisk.foo.edu>;tag=as741941ff
		SIP to address: sip:105 at asterisk.foo.edu
		SIP tag: as741941ff
	    Call-ID: 51efe8a3-2d73b337 at spa3k
	    CSeq: 102 ACK
	    Max-Forwards: 70
	    Proxy-Authorization: Digest username="biwaa1-in",realm="asterisk",nonce="263c07e5",uri="sip:105 at asterisk.foo.edu",algorithm=MD5,response="c33e3a4bab8eef38ca12b9ddf192b796"
	    Contact: biwa 0431 <sip:biwaa1-in at spa3k:5061>
	    User-Agent: Sipura/SPA3000-2.0.11(GWa)
	    Content-Length: 0

    No.     Time        Source                Destination           Protocol Info
	  7 7.079655    asterisk.foo.edu         spa3k SIP      Request: OPTIONS sip:spa3k

    Frame 7 (463 bytes on wire, 463 bytes captured)
    Ethernet II, Src: 00:30:48:80:b3:72, Dst: 00:20:fc:1e:ce:3a
    Internet Protocol, Src Addr: asterisk.foo.edu (asterisk-ip-ad), Dst Addr: spa3k (spa3k)
    User Datagram Protocol, Src Port: 5060 (5060), Dst Port: 5060 (5060)
    Session Initiation Protocol
	Request-Line: OPTIONS sip:spa3k SIP/2.0
	Message Header
	    Via: SIP/2.0/UDP asterisk-ip-ad:5060;branch=z9hG4bK1b040c15
	    From: "Unknown" <sip:Unknown at asterisk-ip-ad>;tag=as3f547347
		SIP Display info: "Unknown" 
		SIP from address: sip:Unknown at asterisk-ip-ad
		SIP tag: as3f547347
	    To: <sip:spa3k>
		SIP to address: sip:spa3k
	    Contact: <sip:Unknown at asterisk-ip-ad>
	    Call-ID: 159ec16b69ac62e334905b487158eeed at asterisk-ip-ad
	    CSeq: 102 OPTIONS
	    User-Agent: Asterisk PBX
	    Date: Mon, 01 Nov 2004 17:34:49 GMT
	    Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER
	    Content-Length: 0

    No.     Time        Source                Destination           Protocol Info
	  8 7.079766    asterisk.foo.edu         spa3k SIP      Request: OPTIONS sip:spa3k:5061

    Frame 8 (473 bytes on wire, 473 bytes captured)
    Ethernet II, Src: 00:30:48:80:b3:72, Dst: 00:20:fc:1e:ce:3a
    Internet Protocol, Src Addr: asterisk.foo.edu (asterisk-ip-ad), Dst Addr: spa3k (spa3k)
    User Datagram Protocol, Src Port: 5060 (5060), Dst Port: 5061 (5061)
    Session Initiation Protocol
	Request-Line: OPTIONS sip:spa3k:5061 SIP/2.0
	Message Header
	    Via: SIP/2.0/UDP asterisk-ip-ad:5060;branch=z9hG4bK29909a71
	    From: "Unknown" <sip:Unknown at asterisk-ip-ad>;tag=as67500153
		SIP Display info: "Unknown" 
		SIP from address: sip:Unknown at asterisk-ip-ad
		SIP tag: as67500153
	    To: <sip:spa3k:5061>
		SIP to address: sip:spa3k:5061
	    Contact: <sip:Unknown at asterisk-ip-ad>
	    Call-ID: 2b80a2980a32bf7809b8648328ced971 at asterisk-ip-ad
	    CSeq: 102 OPTIONS
	    User-Agent: Asterisk PBX
	    Date: Mon, 01 Nov 2004 17:34:49 GMT
	    Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER
	    Content-Length: 0

    No.     Time        Source                Destination           Protocol Info
	  9 7.173099    spa3k asterisk.foo.edu         SIP      Status: 404 Not Found

    Frame 9 (361 bytes on wire, 361 bytes captured)
    Ethernet II, Src: 00:90:69:6d:e8:00, Dst: 00:30:48:80:b3:72
    Internet Protocol, Src Addr: spa3k (spa3k), Dst Addr: asterisk.foo.edu (asterisk-ip-ad)
    User Datagram Protocol, Src Port: 5060 (5060), Dst Port: 5060 (5060)
    Session Initiation Protocol
	Status-Line: SIP/2.0 404 Not Found
	Message Header
	    To: <sip:spa3k>;tag=828c8dcf8cd9e760i0
		SIP to address: sip:spa3k
		SIP tag: 828c8dcf8cd9e760i0
	    From: "Unknown" <sip:Unknown at asterisk-ip-ad>;tag=as3f547347
		SIP Display info: "Unknown" 
		SIP from address: sip:Unknown at asterisk-ip-ad
		SIP tag: as3f547347
	    Call-ID: 159ec16b69ac62e334905b487158eeed at asterisk-ip-ad
	    CSeq: 102 OPTIONS
	    Via: SIP/2.0/UDP asterisk-ip-ad:5060;branch=z9hG4bK1b040c15
	    Server: Sipura/SPA3000-2.0.11(GWa)
	    Content-Length: 0

note that the From: has the cid, as does the Remote-Party-ID:.  and the
Contact: has the spa3k's id and display name.  and
the From: and/or Remote-Party-ID: cause asterisk respond with 407 Proxy
Authentication Required, and things do not improve from there

if i set the spa3k config to have
PSTN / PSTN-To-VoIP Gateway Setup / PSTN CID For VoIP CID: = NO

    Frame 1 (1072 bytes on wire, 1072 bytes captured)
    Ethernet II, Src: 00:90:69:6d:e8:00, Dst: 00:30:48:80:b3:72
    Internet Protocol, Src Addr: 42.666.11.7 (42.666.11.7), Dst Addr: 666.42.7.11 (666.42.7.11)
    User Datagram Protocol, Src Port: 5061 (5061), Dst Port: 5060 (5060)
    Session Initiation Protocol
	Request-Line: INVITE sip:105 at my.asterisk.su SIP/2.0
	    Method: INVITE
	    Resent Packet: False
	Message Header
	    Via: SIP/2.0/UDP 42.666.11.7:5061;branch=z9hG4bK-f5998d8a
	    From: spa3k pstn <sip:spa3k at my.asterisk.su>;tag=8fc58211a0dc60f2o1
	    To: <sip:105 at my.asterisk.su>
	    Remote-Party-ID: spa3k pstn <sip:spa3k at my.asterisk.su>;screen=yes;party=calling
	    Call-ID: daed83bd-b2b66b36 at 42.666.11.7
	    CSeq: 101 INVITE
	    Max-Forwards: 70
	    Contact: spa3k pstn <sip:biwaa1 at 42.666.11.7:5061>
	    Expires: 240
	    User-Agent: Sipura/SPA3000-2.0.11(GWa)
	    Content-Length: 430
	    Allow: ACK, BYE, CANCEL, INFO, INVITE, NOTIFY, OPTIONS, REFER
	    Supported: x-sipura
	    Content-Type: application/sdp
	Message body
	    Session Description Protocol

the connection completes, but asterisk does not have the pstn caller id.

randy




More information about the asterisk-users mailing list