sample.sn 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. ## For more information about scenarios, please refer to the Programmer's Guide
  2. # user's parameters (like ANSI-C #define)
  3. %%domain ericsson.com
  4. %%user mamadou
  5. %%pwd mamadou
  6. %%proxy_ip 192.168.0.13 # IP address or FQDN
  7. %%proxy_port 5081
  8. %%proxy_trans tcp # udp, tcp, tls or sctp
  9. %%expires 100 # expires used by all dialogs
  10. %%sleep-sec 1.0 # number of seconds to wait before sending next sip message
  11. %%reg-sid
  12. %%sub-reg-sid
  13. %%sub-pres-sid
  14. # Configure the stack
  15. # Realm, IMPI and IMPU are mandatory
  16. ++cst --realm $$(domain) --impi $$(user)@$$(domain) --impu sip:$$(user)@$$(domain) --pwd $$(pwd) \
  17. --pcscf-ip $$(proxy_ip) --pcscf-port $$(proxy_port) --pcscf-trans $$(proxy_trans)\
  18. --header Privacy=header;id --header Allow=INVITE, ACK, CANCEL, BYE, MESSAGE, OPTIONS, NOTIFY, PRACK, UPDATE, REFER \
  19. --header P-Access-Network-Info=ADSL;utran-cell-id-3gpp=00000000 \
  20. --header User-Agent=IM-client/OMA1.0 doubango/v1.0.0 # last should not have backslash
  21. # Run the engine
  22. ++r
  23. # REGISTER
  24. ++reg --xp $$(expires) >>(reg-sid) \
  25. --header Myheader-name=Myheader-value \
  26. # sleep
  27. ++sleep --sec $$(sleep-sec)
  28. # subscribe to reg event package
  29. ++sub --to sip:$$(user)@$$(domain) --xp $$(expires) --header Event=reg --header Accept=application/reginfo+xml \
  30. --header Allow-Events=refer, presence, presence.winfo, xcap-diff, conference >>(sub-reg-sid)
  31. #subscribe to presence event package (alice)
  32. ++sub --to sip:alice@$$(domain) --xp $$(expires) --header Event=presence --header Supported=eventlist\
  33. --header Accept=multipart/related, application/rlmi+xml, application/pidf+xml, application/rpid+xml, application/xcap-diff+xml, message/external-body \
  34. --header Allow-Events=refer, presence, presence.winfo, xcap-diff, conference >>(sub-pres-sid)
  35. # sleep
  36. ++sleep --sec $$(sleep-sec)
  37. # unsunscribe (reg and pres)
  38. ++hu --sid $$(sub-reg-sid)
  39. ++hu --sid $$(sub-pres-sid)
  40. # sleep
  41. ++sleep --sec $$(sleep-sec)
  42. # unregister
  43. ++hu --sid $$(reg-sid)
  44. # sleep
  45. ++sleep --sec $$(sleep-sec)
  46. # Exit the application
  47. ++e